summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
authorChris Lamb <chris@chris-lamb.co.uk>2008-08-14 01:38:24 +0100
committerDaniel Baumann <daniel@debian.org>2008-08-14 05:44:23 +0200
commitbdd2f385c4dd3d4900dcb9373501a6454d66b02e (patch)
treee478e80b7dc85e574814e0f2d2d82bc93641e1d4 /helpers
parent8004d56ce360f4c26150b32a19c3d1017781fac5 (diff)
downloadvyos-live-build-bdd2f385c4dd3d4900dcb9373501a6454d66b02e.tar.gz
vyos-live-build-bdd2f385c4dd3d4900dcb9373501a6454d66b02e.zip
Prevent (harmless) duplicate entries appearing in /etc/apt/preferences
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
Diffstat (limited to 'helpers')
-rwxr-xr-xhelpers/lh_chroot_apt5
1 files changed, 5 insertions, 0 deletions
diff --git a/helpers/lh_chroot_apt b/helpers/lh_chroot_apt
index 8564bf4d2..766875f87 100755
--- a/helpers/lh_chroot_apt
+++ b/helpers/lh_chroot_apt
@@ -114,6 +114,11 @@ case "${1}" in
if Find_files config/chroot_local-packages/*.deb
then
+ if [ ! -f config/chroot_apt/preferences ] && [ "${1}" = "install-binary" ]
+ then
+ rm -f chroot/etc/apt/preferences
+ fi
+
echo >> chroot/etc/apt/preferences
echo "Package: *" >> chroot/etc/apt/preferences
echo "Pin: release o=chroot_local-packages" >> chroot/etc/apt/preferences