Skip to content

Commit 992bb78

Browse files
rootfs: isolate build workspace from source tree
Problem - ROOTFS_DIR was bound to $WORKDIR/rootfs while the script itself resides under rootfs/scripts/ in the same repository. - The preprocessing stage performs `rm -rf "$ROOTFS_DIR"`; when invoked from qcom-build-utils/, that path overlaps the source tree and can remove the script directory used by subsequent invocations. Root cause - The working rootfs output directory and the repository source directory shared the same basename (rootfs) and filesystem root. Implementation - Rename the runtime extraction/build directory from $WORKDIR/rootfs to $WORKDIR/rootfs_work. Operational impact - Prevents destructive collision between generated rootfs state and checked-in script sources. - Enables repeated invocations in a single CI job (e.g. multi-kernel loops) without losing rootfs/scripts/build-rootfs.sh mid-run. Scope - Path-safety fix only; no package-selection or install-order behavior changes. Signed-off-by: Bjordis Collaku <bcollaku@qti.qualcomm.com>
1 parent 920b5e7 commit 992bb78

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

rootfs/scripts/build-rootfs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ fi
139139

140140
WORKDIR=$(pwd)
141141
MNT_DIR="$WORKDIR/mnt"
142-
ROOTFS_DIR="$WORKDIR/rootfs"
142+
ROOTFS_DIR="$WORKDIR/rootfs_work"
143143
ROOTFS_IMG="rootfs.img"
144144
mkdir -p "$MNT_DIR" "$ROOTFS_DIR"
145145

0 commit comments

Comments
 (0)