<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 1 February 2017 at 14:53, Richard Purdie <span dir="ltr">&lt;<a href="mailto:richard.purdie@linuxfoundation.org" target="_blank">richard.purdie@linuxfoundation.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, 2017-02-01 at 14:38 +0200, Jussi Kukkonen wrote:<br>
&gt; On 1 February 2017 at 14:00, Richard Purdie &lt;richard.purdie@linuxfoun<br>
<div><div class="gmail-h5">&gt; <a href="http://dation.org" rel="noreferrer" target="_blank">dation.org</a>&gt; wrote:<br>
&gt; &gt; On Wed, 2017-02-01 at 13:44 +0200, Jussi Kukkonen wrote:<br>
&gt; &gt; &gt; On 1 February 2017 at 13:23, Richard Purdie &lt;richard.purdie@linux<br>
&gt; &gt; foun<br>
&gt; &gt; &gt; <a href="http://dation.org" rel="noreferrer" target="_blank">dation.org</a>&gt; wrote:<br>
&gt; &gt; &gt; &gt; On Wed, 2017-02-01 at 12:03 +0200, Jussi Kukkonen wrote:<br>
&gt; &gt; &gt; &gt; &gt; Recipe-specific sysroots broke make_relative_symlink(), which<br>
&gt; &gt; &gt; &gt; &gt; turns absolute symlinks in sysroots into relative ones. Use<br>
&gt; &gt; the<br>
&gt; &gt; &gt; &gt; &gt; difference between the (in-sysroot) paths to construct the<br>
&gt; &gt; &gt; &gt; relative<br>
&gt; &gt; &gt; &gt; &gt; symlink.<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; This fixes links in openssl-native, fontconfig-native and<br>
&gt; &gt; bzip2-<br>
&gt; &gt; &gt; &gt; &gt; native.<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; Signed-off-by: Jussi Kukkonen &lt;<a href="mailto:jussi.kukkonen@intel.com">jussi.kukkonen@intel.com</a>&gt;<br>
&gt; &gt; &gt; &gt; &gt; ---<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; sstate is not an area I&#39;m familiar with, please take a good<br>
&gt; &gt; look.<br>
&gt; &gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; &gt; As far as I could see outputpath (based on state[2]) was<br>
&gt; &gt; never<br>
&gt; &gt; &gt; &gt; really<br>
&gt; &gt; &gt; &gt; &gt; needed so I did not use it in the new version.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; I don&#39;t think we can hardcode workdir into here as for tasks<br>
&gt; &gt; like<br>
&gt; &gt; &gt; &gt; do_deploy, this makes no sense. I think we removed most of the<br>
&gt; &gt; &gt; &gt; absolute<br>
&gt; &gt; &gt; &gt; links from the deploy tasks so we currently don&#39;t need this, at<br>
&gt; &gt; &gt; &gt; least<br>
&gt; &gt; &gt; &gt; in the common case but the sstate code is meant to be generic.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; I am wondering if we need to pass in anything at all, can&#39;t we<br>
&gt; &gt; just<br>
&gt; &gt; &gt; &gt; call relpath on the original path and turn it into a relative<br>
&gt; &gt; one<br>
&gt; &gt; &gt; &gt; directly without referencing it back to TMPDIR/WORKDIR?<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; The actual file path during do_populate_sysroot is something like<br>
&gt; &gt; &gt;   /mnt/extra-ssd/tmp/work/x86_<wbr>64-linux/openssl-native/1.0.<wbr>2j-<br>
&gt; &gt; &gt; r0/sysroot-destdir/mnt/extra-<wbr>ssd/tmp/work/x86_64-linux/<wbr>openssl-<br>
&gt; &gt; &gt; native/1.0.2j-r0/recipe-<wbr>sysroot-native/usr/lib/ssl/<wbr>certs<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; and the link before make_relative_symlink() points to <br>
&gt; &gt; &gt;   /mnt/extra-ssd/tmp/work/x86_<wbr>64-linux/openssl-native/1.0.<wbr>2j-<br>
&gt; &gt; &gt; r0/recipe-sysroot-native/etc/<wbr>ssl/certs<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Assuming those are correct, I don&#39;t see how to do this without<br>
&gt; &gt; &gt; referencing WORKDIR or TMPDIR?<br>
&gt; &gt;<br>
&gt; &gt; Good point, I knew I was missing something. How about passing in<br>
&gt; &gt; walkroot/state[1] into the function, then you can subtract that<br>
&gt; &gt; from<br>
&gt; &gt; the actual file, then run relpath between the (srcpath - walkroot)<br>
&gt; &gt; and<br>
&gt; &gt; the link?<br>
&gt;<br>
&gt; Figuring out a sysroot-based path for srcpath is indeed possible (and<br>
&gt; nicer) using state[1] but then I have:<br>
&gt;   path /usr/lib/ssl/certs<br>
<br>
</div></div>Are you sure path isn&#39;t /mnt/extra-ssd/tmp/work/x86_<wbr>64-linux/openssl-<br>
native/1.0.2j-r0/recipe-<wbr>sysroot-native/usr/lib/ssl/<wbr>certs ?<br></blockquote><div><br></div><div>state[1] really is the whole thing until and including &quot;recipe-sysroot-native&quot;:</div><div>  /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<br></div><div>removing that prefix from path leaves me with</div><div>  /usr/lib/ssl/certs</div><div><br></div><div><br></div></div></div></div>