From 77517cffdeb1d6ff27c6fea5abaaaf75c08367c6 Mon Sep 17 00:00:00 2001 From: David Cassany Date: Tue, 7 Aug 2018 16:10:11 +0200 Subject: [PATCH 1/2] Fix baseStripUnusedLibs config method This commit arguments handling of the baseStripUnusedLibs that was not prepared to handle quoted variable containing a list. Fixes #798 --- kiwi/config/functions.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/kiwi/config/functions.sh b/kiwi/config/functions.sh index be4bfeae..55e308e7 100644 --- a/kiwi/config/functions.sh +++ b/kiwi/config/functions.sh @@ -552,18 +552,17 @@ function baseStripUnusedLibs { # /.../ # add exceptions # ---- - while [ ! -z "$1" ];do + for j in $1; do for i in \ - /lib*/$1* /usr/lib*/$1* \ - /lib/x86_64-linux-gnu/$1* /usr/lib/x86_64-linux-gnu/$1* \ - /usr/X11R6/lib*/$1* + /lib*/$j* /usr/lib*/$j* \ + /lib/x86_64-linux-gnu/$j* /usr/lib/x86_64-linux-gnu/$j* \ + /usr/X11R6/lib*/$j* do if [ -e "$i" ];then needlibs[$count]=$i count=$((count + 1)) fi done - shift done # /.../ # find unused libs and remove it, dl loaded libs From bf556a96adbf02de50c1b9cd124b924fc5e25b23 Mon Sep 17 00:00:00 2001 From: David Cassany Date: Wed, 8 Aug 2018 09:46:22 +0200 Subject: [PATCH 2/2] use more meaningful variable names --- kiwi/config/functions.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/kiwi/config/functions.sh b/kiwi/config/functions.sh index 55e308e7..6b5e90a6 100644 --- a/kiwi/config/functions.sh +++ b/kiwi/config/functions.sh @@ -552,14 +552,14 @@ function baseStripUnusedLibs { # /.../ # add exceptions # ---- - for j in $1; do - for i in \ - /lib*/$j* /usr/lib*/$j* \ - /lib/x86_64-linux-gnu/$j* /usr/lib/x86_64-linux-gnu/$j* \ - /usr/X11R6/lib*/$j* + for libname in $1; do + for libfile in \ + /lib*/$libname* /usr/lib*/$libname* \ + /lib/x86_64-linux-gnu/$libname* /usr/lib/x86_64-linux-gnu/$libname* \ + /usr/X11R6/lib*/$libname* do - if [ -e "$i" ];then - needlibs[$count]=$i + if [ -e "$libfile" ];then + needlibs[$count]=$libfile count=$((count + 1)) fi done