summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2009-01-11 17:05:30 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:09:39 +0100
commit4185bfed45d1ec5bb7bd65536ee1e8ace12539bf (patch)
tree9c1ada5300ad0d035019b7903acfe973e73de965
parent425d51e38b63e3e55558d95e56518a4a53c01a26 (diff)
downloadlive-build-4185bfed45d1ec5bb7bd65536ee1e8ace12539bf.zip
live-build-4185bfed45d1ec5bb7bd65536ee1e8ace12539bf.tar.gz
Moving removal of apt packages lists from minimal and stripped hook to lh_chroot_sources, thanks to Ben Armstrong <synrg@debian.org>.
-rwxr-xr-xhelpers/lh_chroot_sources13
-rwxr-xr-xhooks/minimal8
-rwxr-xr-xhooks/stripped8
3 files changed, 12 insertions, 17 deletions
diff --git a/helpers/lh_chroot_sources b/helpers/lh_chroot_sources
index a862764..6a93aab 100755
--- a/helpers/lh_chroot_sources
+++ b/helpers/lh_chroot_sources
@@ -404,10 +404,21 @@ case "${1}" in
Apt update
fi
- # Cleaning apt packages cache
+ # Cleaning apt package cache
rm -rf chroot/var/cache/apt
mkdir -p chroot/var/cache/apt/archives/partial
+ for LIST in ${LH_PACKAGES_LISTS}
+ do
+ case "${LIST}" in
+ stripped|minimal)
+ # Cleaning apt package lists
+ rm -rf chroot/var/lib/apt/lists
+ mkdir -p chroot/var/lib/apt/lists/partial
+ ;;
+ esac
+ done
+
# Remove local package repository
rm -rf chroot/root/local-packages
diff --git a/hooks/minimal b/hooks/minimal
index ff02ddc..2562ef2 100755
--- a/hooks/minimal
+++ b/hooks/minimal
@@ -25,14 +25,6 @@ find . -name *~ -print0 | xargs -0 rm -f
rm -rf /var/cache/man/*
-# Cleaning apt lists
-rm -rf /var/lib/apt/lists
-mkdir -p /var/lib/apt/lists/partial
-
-# Cleaning apt cache
-rm -rf /var/cache/apt
-mkdir -p /var/cache/apt/archives/partial
-
# Truncating logs
for FILE in $(find /var/log/ -type f)
do
diff --git a/hooks/stripped b/hooks/stripped
index e4811f4..629c79d 100755
--- a/hooks/stripped
+++ b/hooks/stripped
@@ -35,14 +35,6 @@ rm -rf /usr/share/linda/*
rm -rf /usr/share/zoneinfo/*
rm -rf /var/cache/man/*
-# Cleaning apt lists
-rm -rf /var/lib/apt/lists
-mkdir -p /var/lib/apt/lists/partial
-
-# Cleaning apt cache
-rm -rf /var/cache/apt
-mkdir -p /var/cache/apt/archives/partial
-
# Truncating logs
for FILE in $(find /var/log/ -type f)
do