externalsrc: Change absolute symlinks to relative ones
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 externalsrc: Change absolute symlinks to relative ones
In 3eee8e99 sstate got changed to refuse absolute symlinks. Externalsrc creates absolute symlinks for oe-logs and oe-workdir which causes errors at do_populate_sysroot.
Changing symlinks to relative paths will make externalsrc comply with sstate changesi and will avoid those errors.
Signed-off-by Jens Erdmann <[email protected]>
--- meta/classes/externalsrc.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/externalsrc.bbclass +1 -1
@@ -136,7 +136,7 @@ python externalsrc_configure_prefunc() { for symlink in symlinks: symsplit = symlink.split(':', 1) lnkfile = os.path.join(s_dir, symsplit[0]) - target = d.expand(symsplit[1]) + target = os.path.relpath(d.expand(symsplit[1]), s_dir) if len(symsplit) > 1: if os.path.islink(lnkfile): # Link already exists, leave it if it points to the right location already
--
2.7.4
Hi Jens,
Quoted 5 lines · Jens
In
3eee8e99sstate got changed to refuse absolute symlinks. Externalsrc creates absolute symlinks for oe-logs and oe-workdir which causes errors atdo_populate_sysroot.
Changing symlinks to relative paths will make externalsrc comply with sstate changesi and will avoid those errors.
This implies that you (or more precisely, the build system of whatever your recipe is building) is installing these symlinks to ${D} from the source tree
- I would recommend avoiding that, since those symlinks are of no use on the target or indeed the sysroot, and making them relative means they will definitely be broken when moved elsewhere in any case.
Which recipe(s) are you experiencing this issue with? If they are custom ones, how is what happens during do_install defined there?
Cheers,
Paul
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre
PATCH 1/1 externalsrc: Change absolute symlinks to relative ones
Quoted 7 lines
Quoted 6 lines
In
3eee8e99sstate got changed to refuse absolute symlinks. Externalsrc creates absolute symlinks for oe-logs and oe-workdir which causes errors atdo_populate_sysroot.
Changing symlinks to relative paths will make externalsrc comply with sstate changesi and will avoid those errors.
Quoted 8 lines
This implies that you (or more precisely, the build system of whatever your recipe is building) is installing these symlinks to ${D} from the source tree
- I would recommend avoiding that, since those symlinks are of no use on the target or indeed the sysroot, and making them relative means they will definitely be broken when moved elsewhere in any case.Which recipe(s) are you experiencing this issue with? If they are custom ones, how is what happens during
do_installdefined there?
Hi Paul,
Thanks for your reply. The problem occured after altering custom recipes with devtool. We worked on a native and on a nonnative recipe and got following messages:
NOTE: api-gen-native: compiling from external source tree /home/erdmann/yocto/build/workspace/sources/api-gen-native
ERROR: api-gen-native-1.0.0+git999-r0 do_populate_sysroot: sstate found an absolute path symlink /home/erdmann/yocto/build/tmp/work/x86_64-linux/api-gen-native/1.0.0+git999-r0/sysroot-destdir/home/erdmann/yocto/build/tmp/work/x86_64-linux/api-gen-native/1.0.0+git999-r0/recipe-sysroot-native/usr/lib/api-gen-native/oe-workdir pointing at /home/erdmann/yocto/build/tmp/work/x86_64-linux/api-gen-native/1.0.0+git999-r0. Please replace this with a relative link.
ERROR: api-gen-native-1.0.0+git999-r0 do_populate_sysroot: sstate found an absolute path symlink /home/erdmann/yocto/build/tmp/work/x86_64-linux/api-gen-native/1.0.0+git999-r0/sysroot-destdir/home/erdmann/yocto/build/tmp/work/x86_64-linux/api-gen-native/1.0.0+git999-r0/recipe-sysroot-native/usr/lib/api-gen-native/oe-logs pointing at /home/erdmann/yocto/build/tmp/work/x86_64-linux/api-gen-native/1.0.0+git999-r0/temp. Please replace this with a relative link.
I tried to double check and am quite conviced we did not try to install these symlinks. I hope these informations draw a more clear picture of the problem which lead to this attempt to fix this.
Regards,
Jens Erdmann
Quoted 7 lines · Jens
Quoted 2 lines
Which recipe(s) are you experiencing this issue with? If they are custom ones, how is what happens during
do_installdefined there?Thanks for your reply. The problem occured after altering custom recipes with devtool. We worked on a native and on a nonnative recipe and got following messages:
Quoted 7 lines
NOTE: api-gen-native: compiling from external source tree
/home/erdmann/yocto/build/workspace/sources/api-gen-native
ERROR: api-gen-native-1.0.0+git999-r0do_populate_sysroot: sstate found an absolute path symlink/home/erdmann/yocto/build/tmp/work/x86_64-linux/api-gen-native/1.0.0+git999-r0/sysroot-destdir/home/erdmann/yocto/build/tmp/work/x86_64-linux/api-gen-native/1.0.0+git999-r0/recipe-sysroot-native/usr/lib/api-gen-native/oe-workdirpointing at/home/erdmann/yocto/build/tmp/work/x86_64-linux/api-gen-native/1.0.0+git999-r0. Please replace this with a relative link.
ERROR: api-gen-native-1.0.0+git999-r0do_populate_sysroot: sstate found an absolute path symlink/home/erdmann/yocto/build/tmp/work/x86_64-linux/api-gen-native/1.0.0+git999-r0/sysroot-destdir/home/erdmann/yocto/build/tmp/work/x86_64-linux/api-gen-native/1.0.0+git999-r0/recipe-sysroot-native/usr/lib/api-gen-native/oe-logspointing at/home/erdmann/yocto/build/tmp/work/x86_64-linux/api-gen-native/1.0.0+git999-r0/temp. Please replace this with a relative link.I tried to double check and am quite conviced we did not try to install these symlinks. I hope these informations draw a more clear picture of the problem which lead to this attempt to fix this.
I'd need to see exactly how do_install is working to be sure - generally, anything that do_populate_sysroot is able to process must have been installed during do_install. I would imagine what's happening is that ${B}==${S} and the entire contents of ${S} is being installed to ${D} and thus if the symlinks are present in the source tree, they get installed.
Even in the absence of this issue I would recommend that you check what's going on during do_install because if what I described above is the case, it's possible it is installing a whole bunch of files that it shouldn't be.
Cheers,
Paul
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre
Quoted 3 lines
Even in the absence of this issue I would recommend that you check what's going on during
do_installbecause if what I described above is the case, it's possible it is installing a whole bunch of files that it shouldn't be.
Hi Paul,
Thanks for your help. You were absolutly right. We had a problem caused by the transition changing a recipe to be a native one, which messed up our do_install. Thank you very much.
Regards,
Jens Erdmann