[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 02/12] ltmain.in: Handle trailing slashes on install commands
From: |
Sam James |
Subject: |
[PATCH v2 02/12] ltmain.in: Handle trailing slashes on install commands correctly |
Date: |
Sat, 16 Apr 2022 18:58:15 +0100 |
From: Richard Purdie <richard.purdie@linuxfoundation.org>
A command like:
libtool --mode=install /usr/bin/install -c gck-roots-store-standalone.la
'/image/usr/lib/gnome-keyring/standalone/'
where the path ends with a trailing slash currently fails. This occurs in
software like gnome-keyring or pulseaudio and is because the comparision
code doesn't see the paths as equal. Strip both paths to ensure this works
reliably.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
build-aux/ltmain.in | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
index d3a03a53..bc0a3950 100644
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -2381,8 +2381,14 @@ func_mode_install ()
func_append dir "$objdir"
if test -n "$relink_command"; then
+ # Strip any trailing slash from the destination.
+ func_stripname '' '/' "$libdir"
+ destlibdir=$func_stripname_result
+ func_stripname '' '/' "$destdir"
+ s_destdir=$func_stripname_result
+
# Determine the prefix the user has applied to our future dir.
- inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
+ inst_prefix_dir=`$ECHO "X$s_destdir" | $Xsed -e "s%$destlibdir\$%%"`
# Don't allow the user to place us outside of our expected
# location b/c this prevents finding dependent libraries that
--
2.35.1
- [PATCH v2 00/12] Rebased version of Yocto patches, Sam James, 2022/04/16
- [PATCH v2 02/12] ltmain.in: Handle trailing slashes on install commands correctly,
Sam James <=
- [PATCH v2 04/12] ltmain.in: Don't encode RATHS which match default linker paths, Sam James, 2022/04/16
- [PATCH v2 03/12] libtool.m4: For reproducibility stop encoding hostname in libtool script, Sam James, 2022/04/16
- [PATCH v2 05/12] libtool.m4: Rename the --with-sysroot option to avoid conflict with gcc/binutils, Sam James, 2022/04/16
- [PATCH v2 07/12] libtool: Check for static libs for internal compiler libraries, Sam James, 2022/04/16
- [PATCH v2 11/12] Makefile.am: make sure autoheader run before automake, Sam James, 2022/04/16
- [PATCH v2 06/12] Makefile.am: make sure autoheader run before autoconf, Sam James, 2022/04/16
- [PATCH v2 12/12] libtool: Fix support for NIOS2 processor, Sam James, 2022/04/16
- [PATCH v2 08/12] ltmain.in: Add missing sysroot to library path, Sam James, 2022/04/16
- [PATCH v2 10/12] ltmain.in: Handle prefix-map compiler options correctly, Sam James, 2022/04/16