From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: Khem Raj <raj.khem@gmail.com>
Cc: Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 1/7] classes/license: fix handling of symlinks pointed to in LIC_FILES_CHKSUM
Date: Tue, 01 Nov 2016 08:41:46 +1300 [thread overview]
Message-ID: <2111229.GbldrazETl@peggleto-mobl.ger.corp.intel.com> (raw)
In-Reply-To: <CAMKF1soshS9nzHZ_OEQ9cJvZNRREnAKQKz6fXUzcJQGBD6nvHA@mail.gmail.com>
Hi Khem,
Why wouldn't it be?
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
next prev parent reply other threads:[~2016-10-31 19:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-31 3:59 [PATCH 0/7] devtool/recipetool improvements Paul Eggleton
2016-10-31 3:59 ` [PATCH 1/7] classes/license: fix handling of symlinks pointed to in LIC_FILES_CHKSUM Paul Eggleton
2016-10-31 16:56 ` Martin Jansa
2016-10-31 19:23 ` Khem Raj
2016-10-31 19:41 ` Paul Eggleton [this message]
2016-10-31 22:34 ` Khem Raj
2016-11-01 0:53 ` Christopher Larson
2016-10-31 3:59 ` [PATCH 2/7] devtool: add: show recipetool create output Paul Eggleton
2016-10-31 3:59 ` [PATCH 3/7] devtool: finish: fix error if destination layer is not in bblayers.conf Paul Eggleton
2016-10-31 3:59 ` [PATCH 4/7] devtool: finish: warn if moving recipe to unconfigured destination layer Paul Eggleton
2016-10-31 3:59 ` [PATCH 5/7] recipetool: create: separate LICENSE items with & by default Paul Eggleton
2016-10-31 3:59 ` [PATCH 6/7] oe-selftest: devtool: fix error message in _test_recipe_contents() Paul Eggleton
2016-10-31 3:59 ` [PATCH 7/7] devtool: add "rename" subcommand Paul Eggleton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2111229.GbldrazETl@peggleto-mobl.ger.corp.intel.com \
--to=paul.eggleton@linux.intel.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=raj.khem@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox