summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-10-14 21:47:35 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:22:27 +0100
commit58bbe26622be988a1b2e4575fbb206ed92fb9efb (patch)
tree1c8c39d2e11ff42e87984ad7e54c3db275394f84 /helpers
parenta40fb341ea42559224113f583303313e4463f7b6 (diff)
downloadlive-build-58bbe26622be988a1b2e4575fbb206ed92fb9efb.zip
live-build-58bbe26622be988a1b2e4575fbb206ed92fb9efb.tar.gz
Adding support for a local /etc/apt/preferences file in config/chroot_apt/preferences.
Diffstat (limited to 'helpers')
-rwxr-xr-xhelpers/lh_chroot_apt19
-rwxr-xr-xhelpers/lh_config1
2 files changed, 20 insertions, 0 deletions
diff --git a/helpers/lh_chroot_apt b/helpers/lh_chroot_apt
index 5ba5b00..ffba6d7 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
;;
diff --git a/helpers/lh_config b/helpers/lh_config
index 3ffb6f4..7c20e1b 100755
--- a/helpers/lh_config
+++ b/helpers/lh_config
@@ -764,6 +764,7 @@ LH_SECTIONS="${LH_SECTIONS}"
EOF
# Creating lh_chroot_* configuration
+mkdir -p config/chroot_apt
mkdir -p config/chroot_local-hooks
mkdir -p config/chroot_local-includes
mkdir -p config/chroot_local-packages