aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Kohler <bkohler@gmail.com>2017-09-20 08:13:59 -0500
committerBrian Dolbec <dolsen@gentoo.org>2017-11-29 09:31:44 -0800
commit4295fce1791067d7589b8f7f12cb5270bb86bcca (patch)
tree0492cf39c4961a23c77ec0caa718e5821e3a62d4
parenttargets stage3-chroot.sh: Update the emerge options (diff)
downloadcatalyst-4295fce1791067d7589b8f7f12cb5270bb86bcca.tar.gz
catalyst-4295fce1791067d7589b8f7f12cb5270bb86bcca.tar.bz2
catalyst-4295fce1791067d7589b8f7f12cb5270bb86bcca.zip
introduce depclean.sh and add it to livecd-stage2 (first test)
-rwxr-xr-xtargets/livecd-stage2/livecd-stage2-controller.sh11
-rwxr-xr-xtargets/support/depclean.sh9
2 files changed, 15 insertions, 5 deletions
diff --git a/targets/livecd-stage2/livecd-stage2-controller.sh b/targets/livecd-stage2/livecd-stage2-controller.sh
index 10ee98e6..845d6d55 100755
--- a/targets/livecd-stage2/livecd-stage2-controller.sh
+++ b/targets/livecd-stage2/livecd-stage2-controller.sh
@@ -186,11 +186,12 @@ case $1 in
${clst_shdir}/support/bootloader-setup.sh $1
;;
- unmerge)
- shift
- export clst_packages="$*"
- exec_in_chroot ${clst_shdir}/support/unmerge.sh
- ;;
+ unmerge)
+ exec_in_chroot ${clst_shdir}/support/depclean.sh
+ shift
+ export clst_packages="$*"
+ exec_in_chroot ${clst_shdir}/support/unmerge.sh
+ ;;
target_image_setup)
shift
diff --git a/targets/support/depclean.sh b/targets/support/depclean.sh
new file mode 100755
index 00000000..aa66c9fd
--- /dev/null
+++ b/targets/support/depclean.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+source /tmp/chroot-functions.sh
+
+# If the user enabled PRESERVE_LIBS in options, tell portage to preserve them.
+[ -n "${clst_PRESERVE_LIBS}" ] && FEATURES="${clst_myfeatures} preserve-libs"
+run_merge --depclean --with-bdeps=n
+
+exit 0