Patchwork [dora,1/2] populate-extfs.sh: fix to handle /var/lib/opkg/alternatives/[[ correctly

login
register
mail settings
Submitter Qi.Chen@windriver.com
Date June 19, 2014, 2:11 a.m.
Message ID <c94a169e23f798b8cb640471079f670290bea8b7.1403143738.git.Qi.Chen@windriver.com>
Download mbox | patch
Permalink /patch/74043/
State New
Headers show

Comments

Qi.Chen@windriver.com - June 19, 2014, 2:11 a.m.
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>
---
 .../e2fsprogs/e2fsprogs-1.42.8/populate-extfs.sh   |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch

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 7de720b..da3954e 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"