mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 01:19:52 +00:00
meta: use ln -rs instead of lnr
lnr is a script in oe-core that creates relative symlinks, with the same behaviour as `ln --relative --symlink`. It was added back in 2014[1] as not all of the supported host distributions at the time shipped coreutils 8.16, the first release with --relative. However the oldest coreutils release in the supported distributions is now 8.22 in CentOS 7, so lnr can be deprecated and users switched to ln. [1] 6ae3b85eaffd1b0b6914422e8de7c1230723157d (From OE-Core rev: 1ca455a98de4c713f58df0a537d4c982d256cd68) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
974df2f61c
commit
c0583c6bfc
@@ -622,20 +622,20 @@ deltask do_package_write_rpm
|
||||
create_merged_usr_symlinks() {
|
||||
root="$1"
|
||||
install -d $root${base_bindir} $root${base_sbindir} $root${base_libdir}
|
||||
lnr $root${base_bindir} $root/bin
|
||||
lnr $root${base_sbindir} $root/sbin
|
||||
lnr $root${base_libdir} $root/${baselib}
|
||||
ln -rs $root${base_bindir} $root/bin
|
||||
ln -rs $root${base_sbindir} $root/sbin
|
||||
ln -rs $root${base_libdir} $root/${baselib}
|
||||
|
||||
if [ "${nonarch_base_libdir}" != "${base_libdir}" ]; then
|
||||
install -d $root${nonarch_base_libdir}
|
||||
lnr $root${nonarch_base_libdir} $root/lib
|
||||
ln -rs $root${nonarch_base_libdir} $root/lib
|
||||
fi
|
||||
|
||||
# create base links for multilibs
|
||||
multi_libdirs="${@d.getVar('MULTILIB_VARIANTS')}"
|
||||
for d in $multi_libdirs; do
|
||||
install -d $root${exec_prefix}/$d
|
||||
lnr $root${exec_prefix}/$d $root/$d
|
||||
ln -rs $root${exec_prefix}/$d $root/$d
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
@@ -626,7 +626,7 @@ install_tools() {
|
||||
for script in $scripts; do
|
||||
for scriptfn in `find ${SDK_OUTPUT}/${SDKPATH}/${scriptrelpath} -maxdepth 1 -executable -name "$script"`; do
|
||||
targetscriptfn="${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/$(basename $scriptfn)"
|
||||
test -e ${targetscriptfn} || lnr ${scriptfn} ${targetscriptfn}
|
||||
test -e ${targetscriptfn} || ln -rs ${scriptfn} ${targetscriptfn}
|
||||
done
|
||||
done
|
||||
# We can't use the same method as above because files in the sysroot won't exist at this point
|
||||
@@ -634,7 +634,7 @@ install_tools() {
|
||||
unfsd_path="${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/unfsd"
|
||||
if [ "${SDK_INCLUDE_TOOLCHAIN}" = "1" -a ! -e $unfsd_path ] ; then
|
||||
binrelpath=${@os.path.relpath(d.getVar('STAGING_BINDIR_NATIVE'), d.getVar('TMPDIR'))}
|
||||
lnr ${SDK_OUTPUT}/${SDKPATH}/tmp/$binrelpath/unfsd $unfsd_path
|
||||
ln -rs ${SDK_OUTPUT}/${SDKPATH}/tmp/$binrelpath/unfsd $unfsd_path
|
||||
fi
|
||||
touch ${SDK_OUTPUT}/${SDKPATH}/.devtoolbase
|
||||
|
||||
|
||||
Reference in New Issue
Block a user