From 6cdc4b2e18a22758fa6d42b12a8b04a5aa68551d Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Tue, 11 Jan 2022 02:07:02 -0500 Subject: wtf is this shit --- selfstrap | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/selfstrap b/selfstrap index 6e528da..fba576e 100755 --- a/selfstrap +++ b/selfstrap @@ -285,7 +285,7 @@ parse_apt_simul_line() dpkg_unpack() { - [ "$TARGET" -a -d "$TARGET" ] || die 'no $TARGET' + [ "$TARGET" -a "$TARGET" != '/' -a -d "$TARGET" ] || die 'no $TARGET' local deb="$1" multiarch="$2" SET_STATUS="$3" command PKG PKG=${deb##*/} PKG=${PKG%%_*} @@ -499,7 +499,8 @@ if [ "$REAL_APT_INSTALL" ]; then # Unpack required packages. Handles (1) # Note: populate_rootfs() already created a necessary symlink /usr/bin/awk -> /usr/bin/mawk - apt_get install -y $required_packages eatmydata + apt_extract $required_packages eatmydata + # apt_get install -y $required_packages eatmydata # This handles (2). # An alternative (used by debootstrap) is to configure base-passwd @@ -507,7 +508,7 @@ if [ "$REAL_APT_INSTALL" ]; then prepare_chroot "$TARGET" trap 'cleanup_chroot "$TARGET"' EXIT - apt_get install -y $EXTRA_PACKAGES + apt_get install -y $required_packages $EXTRA_PACKAGES else apt_extract $required_packages apt_extract $EXTRA_PACKAGES -- cgit v1.2.3