From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dan.rpsys.net (5751f4a1.skybroadband.com [87.81.244.161]) by mail.openembedded.org (Postfix) with ESMTP id D198971DD7 for ; Wed, 1 Feb 2017 12:01:02 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id v11C0xGS011539; Wed, 1 Feb 2017 12:00:59 GMT Received: from dan.rpsys.net ([127.0.0.1]) by localhost (dan.rpsys.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id sfIz9ODrQEpy; Wed, 1 Feb 2017 12:00:59 +0000 (GMT) Received: from hex ([192.168.3.34]) (authenticated bits=0) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id v11C0u1v011536 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 1 Feb 2017 12:00:58 GMT Message-ID: <1485950456.14144.25.camel@linuxfoundation.org> From: Richard Purdie To: Jussi Kukkonen Date: Wed, 01 Feb 2017 12:00:56 +0000 In-Reply-To: References: <1485943415-8260-1-git-send-email-jussi.kukkonen@intel.com> <1485948194.14144.23.camel@linuxfoundation.org> X-Mailer: Evolution 3.18.5.2-0ubuntu3.1 Mime-Version: 1.0 Cc: Patches and discussions about the oe-core layer Subject: Re: [PATCH] sstate: Fix make_relative_symlink() for RSS X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Feb 2017 12:01:11 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit On Wed, 2017-02-01 at 13:44 +0200, Jussi Kukkonen wrote: > On 1 February 2017 at 13:23, Richard Purdie dation.org> wrote: > > On Wed, 2017-02-01 at 12:03 +0200, Jussi Kukkonen wrote: > > > Recipe-specific sysroots broke make_relative_symlink(), which > > > turns absolute symlinks in sysroots into relative ones. Use the > > > difference between the (in-sysroot) paths to construct the > > relative > > > symlink. > > > > > > This fixes links in openssl-native, fontconfig-native and bzip2- > > > native. > > > > > > Signed-off-by: Jussi Kukkonen > > > --- > > > > > > sstate is not an area I'm familiar with, please take a good look. > > > > > > As far as I could see outputpath (based on state[2]) was never > > really > > > needed so I did not use it in the new version. > > > > I don't think we can hardcode workdir into here as for tasks like > > do_deploy, this makes no sense. I think we removed most of the > > absolute > > links from the deploy tasks so we currently don't need this, at > > least > > in the common case but the sstate code is meant to be generic. > > > > I am wondering if we need to pass in anything at all, can't we just > > call relpath on the original path and turn it into a relative one > > directly without referencing it back to TMPDIR/WORKDIR? > > > The actual file path during do_populate_sysroot is something like >   /mnt/extra-ssd/tmp/work/x86_64-linux/openssl-native/1.0.2j- > r0/sysroot-destdir/mnt/extra-ssd/tmp/work/x86_64-linux/openssl- > native/1.0.2j-r0/recipe-sysroot-native/usr/lib/ssl/certs > > and the link before make_relative_symlink() points to  >   /mnt/extra-ssd/tmp/work/x86_64-linux/openssl-native/1.0.2j- > r0/recipe-sysroot-native/etc/ssl/certs > > Assuming those are correct, I don't see how to do this without > referencing WORKDIR or TMPDIR? Good point, I knew I was missing something. How about passing in walkroot/state[1] into the function, then you can subtract that from the actual file, then run relpath between the (srcpath - walkroot) and the link? Cheers, Richard