summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/installer
diff options
context:
space:
mode:
authorPeter Seebach <peter.seebach@windriver.com>2012-08-27 13:32:30 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-08-29 16:02:10 -0700
commit92e40ec8599d567f3907837c616b83e089c2b544 (patch)
tree4e0173fa06524583fd17ca26aa042ce6a1bc0c9b /meta/recipes-devtools/installer
parentc0aa58f4611d0a9e3cc41c09770f536b3ed6eb66 (diff)
downloadpoky-92e40ec8599d567f3907837c616b83e089c2b544.tar.gz
runqemu-export-rootfs and friends: don't put pseudo db in target fs
In a few places, we have scripts which use <rootfs>/var/pseudo for the pseudo state directory controlling a given filesystem. This seems possibly risky because it means that stuff running under qemu or whatnot could wipe out the data being used to handle that rootfs. Move this to: <rootfs>/../$(basename_rootfs).pseudo_state to avoid problems. This also solves at least one case (not directly hit by yocto's tree) wherein you could end up trying to remove a rootfs while pseudo was using a database inside that rootfs, and thus the remove would fail. (From OE-Core rev: aa5d6bd006d3b4eede21d8987451876ed3385ab8) Signed-off-by: Peter Seebach <peter.seebach@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/installer')
-rwxr-xr-xmeta/recipes-devtools/installer/adt-installer/scripts/extract_rootfs8
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/recipes-devtools/installer/adt-installer/scripts/extract_rootfs b/meta/recipes-devtools/installer/adt-installer/scripts/extract_rootfs
index 62dc170c8a..d1a595b268 100755
--- a/meta/recipes-devtools/installer/adt-installer/scripts/extract_rootfs
+++ b/meta/recipes-devtools/installer/adt-installer/scripts/extract_rootfs
@@ -28,7 +28,6 @@ extract_rootfs()
28 native_sysroot=$3 28 native_sysroot=$3
29 target_sysroot=$2 29 target_sysroot=$2
30 PSEUDO_COMMAND="$native_sysroot/usr/bin/pseudo" 30 PSEUDO_COMMAND="$native_sysroot/usr/bin/pseudo"
31 PSEUDO_OPTS="-P $natvie_sysroot/usr"
32 TAR_OPTS="-xjf" 31 TAR_OPTS="-xjf"
33 PSEUDO_OPTS="-P $native_sysroot/usr" 32 PSEUDO_OPTS="-P $native_sysroot/usr"
34 33
@@ -46,9 +45,10 @@ extract_rootfs()
46 mkdir -p "$target_sysroot" 45 mkdir -p "$target_sysroot"
47 fi 46 fi
48 47
49 mkdir -p "$target_sysroot/var/pseudo" 48 pseudo_state_dir="$target_sysroot/../$(basename "$target_sysroot").pseudo_state"
50 touch "$target_sysroot/var/pseudo/pseudo.pid" 49 mkdir -p "$pseudo_state_dir"
51 PSEUDO_LOCALSTATEDIR="$target_sysroot/var/pseudo" 50 touch "$pseudo_state_dir/pseudo.pid"
51 PSEUDO_LOCALSTATEDIR="$pseudo_state_dir"
52 export PSEUDO_LOCALSTATEDIR 52 export PSEUDO_LOCALSTATEDIR
53 53
54 echo_info "Extracting rootfs: $1, using pseudo..." 54 echo_info "Extracting rootfs: $1, using pseudo..."