From 8277c71747758e2ba0815a6f5cd11c9e0c9c90ce Mon Sep 17 00:00:00 2001 From: Chen Qi Date: Thu, 19 Jun 2014 10:11:32 +0800 Subject: populate-extfs.sh: fix to handle /var/lib/opkg/alternatives/[[ correctly There was a patch trying to fix this problem by using 'dirname', but it caused some build failures, thus got reverted. The problem is that $DIR might be empty and we should first do the check before trying to use $(dirname $DIR). [YOCTO #5712] Signed-off-by: Chen Qi Signed-off-by: Richard Purdie --- meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/populate-extfs.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/populate-extfs.sh b/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/populate-extfs.sh index 7de720b115..da3954ea7d 100644 --- a/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/populate-extfs.sh +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/populate-extfs.sh @@ -23,12 +23,13 @@ DEBUGFS="debugfs" find $SRCDIR | while read FILE; do TGT="${FILE##*/}" DIR="${FILE#$SRCDIR}" - DIR="${DIR%$TGT}" # Skip the root dir [ ! -z "$DIR" ] || continue [ ! -z "$TGT" ] || continue + DIR="$(dirname $DIR)" + if [ "$DIR" != "$CWD" ]; then echo "cd $DIR" CWD="$DIR" -- cgit 1.2.3-korg