summaryrefslogtreecommitdiff
path: root/helpers/lh_chroot_apt
diff options
context:
space:
mode:
Diffstat (limited to 'helpers/lh_chroot_apt')
-rwxr-xr-xhelpers/lh_chroot_apt19
1 files changed, 19 insertions, 0 deletions
diff --git a/helpers/lh_chroot_apt b/helpers/lh_chroot_apt
index 5ba5b0083..ffba6d7f0 100755
--- a/helpers/lh_chroot_apt
+++ b/helpers/lh_chroot_apt
@@ -106,6 +106,17 @@ case "${1}" in
;;
esac
+ # Configuring apt preferences
+ if [ -f config/chroot_apt/preferences ]
+ then
+ if [ -f chroot/etc/apt/preferences ]
+ then
+ mv chroot/etc/apt/preferences chroot/etc/apt/prefereces.orig
+ fi
+
+ cp config/chroot_apt/preferences chroot/etc/apt/preferences
+ fi
+
# Creating stage file
Create_stagefile .stage/chroot_apt
;;
@@ -137,6 +148,14 @@ case "${1}" in
# Deconfiguring aptitude secure
rm -f chroot/etc/apt/apt.conf.d/00secure
+ # Deconfiguring apt preferences
+ if [ -f config/chroot_apt/preferences.orig ]
+ then
+ mv chroot/etc/apt/preferences.orig chroot/etc/apt/preferences
+ else
+ rm -f chroot/etc/apt/preferences
+ fi
+
# Removing stage file
rm -f .stage/chroot_apt
;;