summaryrefslogtreecommitdiff
path: root/scripts/build/chroot_archives
diff options
context:
space:
mode:
authorJan Blunck <jblunck@vyatta.com>2013-09-18 10:48:21 +0200
committerJan Blunck <jblunck@vyatta.com>2013-09-18 10:48:21 +0200
commitddb8ad5daee4f33bb07e7f7d54232890d776d304 (patch)
tree4cc3aaaf54c9f0ecc7fc482697df35fec67c596d /scripts/build/chroot_archives
parent4d9c77d20e517c5dc195183978a2c91d9ba577de (diff)
downloadvyos-live-build-ddb8ad5daee4f33bb07e7f7d54232890d776d304.tar.gz
vyos-live-build-ddb8ad5daee4f33bb07e7f7d54232890d776d304.zip
Selectively remove chroot-only APT configuration and preferences instead of wiping everything.
Diffstat (limited to 'scripts/build/chroot_archives')
-rwxr-xr-xscripts/build/chroot_archives22
1 files changed, 18 insertions, 4 deletions
diff --git a/scripts/build/chroot_archives b/scripts/build/chroot_archives
index 226bad652..d45aa527e 100755
--- a/scripts/build/chroot_archives
+++ b/scripts/build/chroot_archives
@@ -673,10 +673,6 @@ EOF
fi
fi
- # probably too bold, needs refinment (FIXME)
- rm -f chroot/etc/apt/conf.d/*
- rm -f chroot/etc/apt/preferences.d/*
-
# Removing chroot-only apt sources
for FILE in config/archives/*.list.chroot
do
@@ -686,6 +682,24 @@ EOF
fi
done
+ # Removing chroot-only apt configuration
+ for FILE in config/archives/*.conf.chroot
+ do
+ if [ -e "${FILE}" ]
+ then
+ rm -f "chroot/etc/apt/conf.d/$(basename ${FILE} .chroot)"
+ fi
+ done
+
+ # Removing chroot-only apt preferences
+ for FILE in config/archives/*.pref.chroot
+ do
+ if [ -e "${FILE}" ]
+ then
+ rm -f "chroot/etc/apt/preferences.d/$(basename ${FILE} .chroot)"
+ fi
+ done
+
# Adding local apt sources (binary)
for FILE in config/archives/*.list config/archives/*.list.binary
do