mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 00:59:48 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
c0aa58f461
commit
92e40ec859
@@ -28,7 +28,6 @@ extract_rootfs()
|
||||
native_sysroot=$3
|
||||
target_sysroot=$2
|
||||
PSEUDO_COMMAND="$native_sysroot/usr/bin/pseudo"
|
||||
PSEUDO_OPTS="-P $natvie_sysroot/usr"
|
||||
TAR_OPTS="-xjf"
|
||||
PSEUDO_OPTS="-P $native_sysroot/usr"
|
||||
|
||||
@@ -46,9 +45,10 @@ extract_rootfs()
|
||||
mkdir -p "$target_sysroot"
|
||||
fi
|
||||
|
||||
mkdir -p "$target_sysroot/var/pseudo"
|
||||
touch "$target_sysroot/var/pseudo/pseudo.pid"
|
||||
PSEUDO_LOCALSTATEDIR="$target_sysroot/var/pseudo"
|
||||
pseudo_state_dir="$target_sysroot/../$(basename "$target_sysroot").pseudo_state"
|
||||
mkdir -p "$pseudo_state_dir"
|
||||
touch "$pseudo_state_dir/pseudo.pid"
|
||||
PSEUDO_LOCALSTATEDIR="$pseudo_state_dir"
|
||||
export PSEUDO_LOCALSTATEDIR
|
||||
|
||||
echo_info "Extracting rootfs: $1, using pseudo..."
|
||||
|
||||
Reference in New Issue
Block a user