support/check-host-rpath: remove trailing '/' in host dir
authorYann E. MORIN <yann.morin.1998@free.fr>
Tue, 1 Dec 2015 22:19:06 +0000 (23:19 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Wed, 2 Dec 2015 22:28:14 +0000 (23:28 +0100)
Despite the comment saying so, the trailing '/' in the host directory is
not removed. Note however that it is properly removed from extracted
RPATH tags.

This is not visible when the host directory is our default $(O)/host
location, but breaks for user-supplied external host directory, when
the user leaves a trailing slash in the path.

Fix that.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Peter Korsgaard <jacmet@uclibc.org>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
support/scripts/check-host-rpath

index dc9e17fe576ffda5954b3edb721b8f76b4b93040..48d69dae632912f787b41e57334ee3c9e596142f 100755 (executable)
@@ -14,7 +14,7 @@ main() {
     local file ret
 
     # Remove duplicate and trailing '/' for proper match
-    hostdir="$( sed -r -e 's:/+:/:g;' <<<"${hostdir}" )"
+    hostdir="$( sed -r -e 's:/+:/:g; s:/$::;' <<<"${hostdir}" )"
 
     ret=0
     while read file; do