[oe] [PATCH v2] package.bbclass: copy dotfiles in root D to PKGD

Graham Gower graham.gower at gmail.com
Mon Oct 18 09:03:03 UTC 2010


On 18 October 2010 18:13, Frans Meulenbroeks
<fransmeulenbroeks at gmail.com> wrote:
> 2010/10/18 Graham Gower <graham.gower at gmail.com>:
>>>> On Fri, Oct 8, 2010 at 6:34 AM, Michael Smith <msmith at cbnco.com> wrote:
>>>>
>>>>> Use shutil.copytree() to copy D ("image") to PKGD ("package"). The
>>>>> previous system("cp %s/* ...") missed dotfiles/dirs at the top-level.
>>
>> I expect this problem could be fixed by adding an extra line, e.g.
>> os.system('cp -pPR %s/.??* %s/' % (dest, dvar))
>>
>> -Graham
>
> Do you mean as an addition to the copytree, or as an addition to the old code?

I meant as an addition if/when the commit is reverted.


> Seems adding an additional os.system kind-a beats using the
> shutil.copytree as we then still have the os.system to do the cp
> I guess the best way forward is to revert the patch and extend the
> os.system call with your patter.
> E.g. something like:
> -       os.system('cp -pPR %s/* %s/' % (dest, dvar))
> +       os.system('cp -pPR %s/* %s/.??* %s/' % (dest, dest, dvar))
>
> cp may have mutliple sources if the output is a dir.

Beautiful. I would give such a thing my ack.

-Graham




More information about the Openembedded-devel mailing list