[OE-core] [jethro][PATCH v2] license.bbclass: fix host contamination warnings for license files

Jagadeesh Krishnanjanappa jkrishnanjanappa at mvista.com
Thu Nov 26 18:15:03 UTC 2015


>> WARNING: Could not copy license file
>> /data/poky-master/tmp/work/corei7-64-poky-linux/gmp/6.0.0-r0/gmp-6.0.0/COPYING.LESSERv3
>> to
>> /data/poky-master/tmp/work/corei7-64-poky-linux/gmp/6.0.0-r0/license-destdir/gmp/COPYING.LESSERv3:
>> [Errno 1] Operation not permitted:
>> '/data/poky-master/tmp/work/corei7-64-poky-linux/gmp/6.0.0-r0/license-destdir/gmp/COPYING.LESSERv3'

The above warning comes up during do_populate_lic task, and this task
is not being executed in pseudo environment. So changing ownership of
license files to root user (explicitly via "0") fails, as normal user
doesn't have permissions to do so.

In this case, use of os.getuid() and os.getgid() behaves correctly, by
giving normal user id and solving this warning. So this is one
advantage of using os.getuid() and os.getgid() over explicit "0".

Regards,
Jagadeesh

On 11/26/15, Jagadeesh Krishnanjanappa <jkrishnanjanappa at mvista.com> wrote:
>>> We get below host contamination warnings of license files for
>>> each recipe, when we try to create a separate ${PN}-lic package (which
>>> contains license files), by setting LICENSE_CREATE_PACKAGE equal to "1"
>>> in local.conf.
>>>
>>
>> WARNING: Could not copy license file
>> /data/poky-master/tmp/work/corei7-64-poky-linux/gmp/6.0.0-r0/gmp-6.0.0/COPYING.LESSERv3
>> to
>> /data/poky-master/tmp/work/corei7-64-poky-linux/gmp/6.0.0-r0/license-destdir/gmp/COPYING.LESSERv3:
>> [Errno 1] Operation not permitted:
>> '/data/poky-master/tmp/work/corei7-64-poky-linux/gmp/6.0.0-r0/license-destdir/gmp/COPYING.LESSERv3'
>>
>
> My earlier testing was done till do_package_qa  task, so could not
> capture this warning. Will check and get back.
>
> Thanks,
> Jagadeesh
>
>> Ross
>>
>



More information about the Openembedded-core mailing list