summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2014-06-19 10:11:32 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-06-24 11:04:18 +0100
commit8c346a66b5a4ed787ad3d1950d959706a75e1997 (patch)
tree07ea2dcf3d4ed0b023c8efd06d31406ee79ad0df
parent09d260e3e510c4e24d66ecd01a106e199fb1866a (diff)
downloadpoky-8c346a66b5a4ed787ad3d1950d959706a75e1997.tar.gz
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] (From OE-Core rev: 8277c71747758e2ba0815a6f5cd11c9e0c9c90ce) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/populate-extfs.sh3
1 files changed, 2 insertions, 1 deletions
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"
23 find $SRCDIR | while read FILE; do 23 find $SRCDIR | while read FILE; do
24 TGT="${FILE##*/}" 24 TGT="${FILE##*/}"
25 DIR="${FILE#$SRCDIR}" 25 DIR="${FILE#$SRCDIR}"
26 DIR="${DIR%$TGT}"
27 26
28 # Skip the root dir 27 # Skip the root dir
29 [ ! -z "$DIR" ] || continue 28 [ ! -z "$DIR" ] || continue
30 [ ! -z "$TGT" ] || continue 29 [ ! -z "$TGT" ] || continue
31 30
31 DIR="$(dirname $DIR)"
32
32 if [ "$DIR" != "$CWD" ]; then 33 if [ "$DIR" != "$CWD" ]; then
33 echo "cd $DIR" 34 echo "cd $DIR"
34 CWD="$DIR" 35 CWD="$DIR"