]> code.ossystems Code Review - openembedded-core.git/commitdiff
populate-extfs.sh: fix to handle /var/lib/opkg/alternatives/[[ correctly
authorChen Qi <Qi.Chen@windriver.com>
Thu, 19 Jun 2014 02:11:32 +0000 (10:11 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 24 Jun 2014 09:57:32 +0000 (10:57 +0100)
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 <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/populate-extfs.sh

index 7de720b115a8c1f75b714586a5056f576a5917f9..da3954ea7d417c4043a9171ac5c9a1bc42edc23c 100644 (file)
@@ -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"