[OE-core] [PATCH V4 08/10] populate-volatile.sh: use 'cp -a' to avoid potential problem
Qi.Chen at windriver.com
Qi.Chen at windriver.com
Wed Aug 7 08:08:56 UTC 2013
From: Chen Qi <Qi.Chen at windriver.com>
Previously, dead links in target directory will not be copied.
This is incorrect as dead links are not uncommon in our rootfs.
So we use '-a' option instead.
Signed-off-by: Chen Qi <Qi.Chen at windriver.com>
---
.../initscripts-1.0/populate-volatile.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
index 827fd7d..b1c0245 100755
--- a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
+++ b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
@@ -76,7 +76,8 @@ link_file() {
if [ -L \"$2\" ]; then
[ \"\$(readlink -f \"$2\")\" != \"\$(readlink -f \"$1\")\" ] && { rm -f \"$2\"; ln -sf \"$1\" \"$2\"; };
elif [ -d \"$2\" ]; then
- for f in $2/* $2/.[^.]*; do [ -e \$f ] && cp -rf \$f $1; done;
+ cp -a $2/* $1
+ cp -a $2/.[!.]* $1
rm -rf \"$2\";
ln -sf \"$1\" \"$2\";
else
--
1.7.9.5
More information about the Openembedded-core
mailing list