[prev in list] [next in list] [prev in thread] [next in thread]
List: openembedded-core
Subject: Re: [OE-core] [PATCH 1/7] classes/license: fix handling of symlinks pointed to in LIC_FILES_CHKSUM
From: Khem Raj <raj.khem () gmail ! com>
Date: 2016-10-31 22:34:16
Message-ID: 1A7D1C00-1B1C-40CF-8240-9BC100D0EA8A () gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
> On Oct 31, 2016, at 12:41 PM, Paul Eggleton <paul.eggleton@linux.intel.com> wrote:
>
> Hi Khem,
>
> Why wouldn't it be?
Was thinking out loud if the path is expanded to absolute paths then
does it get recorded into task checksums ?
>
> Cheers,
> Paul
>
> On Mon, 31 Oct 2016 12:23:04 Khem Raj wrote:
>> Is this sstate safe?
>>
>> On Oct 30, 2016 9:11 PM, "Paul Eggleton" <paul.eggleton@linux.intel.com>
>>
>> wrote:
>>> If you set LIC_FILES_CHKSUM to point to a relative symlink then you'll
>>> get "Could not copy license file" warnings in copy_license_files() since
>>> the symlink won't be valid after it's copied. If the source is a symlink
>>> then we need to dereference it first.
>>>
>>> I encountered this when I used recipetool on the sources for capnproto,
>>> where the c++ directory contains a LICENSE.txt symlink to the LICENSE
>>> file in the parent directory, and this symlink ends up being pointed to
>>> in LIC_FILES_CHKSUM.
>>>
>>> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
>>> ---
>>>
>>> meta/classes/license.bbclass | 2 ++
>>> 1 file changed, 2 insertions(+)
>>>
>>> diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
>>> index da4fc3e..660b85f 100644
>>> --- a/meta/classes/license.bbclass
>>> +++ b/meta/classes/license.bbclass
>>>
>>> @@ -351,6 +351,8 @@ def copy_license_files(lic_files_paths, destdir):
>>> dst = os.path.join(destdir, basename)
>>>
>>> if os.path.exists(dst):
>>> os.remove(dst)
>>>
>>> + if os.path.islink(src):
>>> + src = os.path.realpath(src)
>>>
>>> canlink = os.access(src, os.W_OK) and (os.stat(src).st_dev ==
>>>
>>> os.stat(destdir).st_dev)
>>>
>>> if canlink:
>>> try:
>>> --
>>> 2.5.5
>>>
>>> --
>>> _______________________________________________
>>> Openembedded-core mailing list
>>> Openembedded-core@lists.openembedded.org
>>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
> --
>
> Paul Eggleton
> Intel Open Source Technology Centre
["signature.asc" (signature.asc)]
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org
iEYEARECAAYFAlgXxu0ACgkQuwUzVZGdMxSbfwCfUjJ4b0oCReOHJFbWoGRpuTo/
W6UAn1FKip5I+Z9aAVzee5ViLIScn5Dq
=SnNk
-----END PGP SIGNATURE-----
--
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic