[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 01/12] ltmain.in: Handle trailing slashes on install commands cor
From: |
Richard Purdie |
Subject: |
[PATCH 01/12] ltmain.in: Handle trailing slashes on install commands correctly |
Date: |
Mon, 25 Oct 2021 15:33:26 +0100 |
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 96b37003..3d5dcd0a 100644
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -2378,8 +2378,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.25.1
- [PATCH 00/12] Yocto Project libtool patch queue, Richard Purdie, 2021/10/25
- [PATCH 04/12] ltmain.sh: Fix sysroot paths being encoded into RPATHs, Richard Purdie, 2021/10/25
- [PATCH 01/12] ltmain.in: Handle trailing slashes on install commands correctly,
Richard Purdie <=
- [PATCH 12/12] libtool.m4: For reproducibility stop encoding hostname in libtool script, Richard Purdie, 2021/10/25
- [PATCH 05/12] ltmain.in: Don't encode RATHS which match default linker paths, Richard Purdie, 2021/10/25
- [PATCH 02/12] libtool.m4: Rename the --with-sysroot option to avoid conflict with gcc/binutils, Richard Purdie, 2021/10/25
- [PATCH 09/12] Makefile.am: make sure autoheader run before autoconf, Richard Purdie, 2021/10/25
- [PATCH 08/12] libtool: Check for static libs for internal compiler libraries, Richard Purdie, 2021/10/25
- [PATCH 03/12] ltmain.in: Add missing sysroot to library path, Richard Purdie, 2021/10/25
- [PATCH 06/12] libtool.m4: Handle "/" as a sysroot correctly, Richard Purdie, 2021/10/25
- [PATCH 11/12] ltmain.in: Handle prefix-map compiler options correctly, Richard Purdie, 2021/10/25
- [PATCH 10/12] Makefile.am: make sure autoheader run before automake, Richard Purdie, 2021/10/25
- [PATCH 07/12] libtool: Fix support for NIOS2 processor, Richard Purdie, 2021/10/25