summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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