1 |
commit: 4295fce1791067d7589b8f7f12cb5270bb86bcca |
2 |
Author: Ben Kohler <bkohler <AT> gmail <DOT> com> |
3 |
AuthorDate: Wed Sep 20 13:13:59 2017 +0000 |
4 |
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Nov 29 17:31:44 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=4295fce1 |
7 |
|
8 |
introduce depclean.sh and add it to livecd-stage2 (first test) |
9 |
|
10 |
targets/livecd-stage2/livecd-stage2-controller.sh | 11 ++++++----- |
11 |
targets/support/depclean.sh | 9 +++++++++ |
12 |
2 files changed, 15 insertions(+), 5 deletions(-) |
13 |
|
14 |
diff --git a/targets/livecd-stage2/livecd-stage2-controller.sh b/targets/livecd-stage2/livecd-stage2-controller.sh |
15 |
index 10ee98e6..845d6d55 100755 |
16 |
--- a/targets/livecd-stage2/livecd-stage2-controller.sh |
17 |
+++ b/targets/livecd-stage2/livecd-stage2-controller.sh |
18 |
@@ -186,11 +186,12 @@ case $1 in |
19 |
${clst_shdir}/support/bootloader-setup.sh $1 |
20 |
;; |
21 |
|
22 |
- unmerge) |
23 |
- shift |
24 |
- export clst_packages="$*" |
25 |
- exec_in_chroot ${clst_shdir}/support/unmerge.sh |
26 |
- ;; |
27 |
+ unmerge) |
28 |
+ exec_in_chroot ${clst_shdir}/support/depclean.sh |
29 |
+ shift |
30 |
+ export clst_packages="$*" |
31 |
+ exec_in_chroot ${clst_shdir}/support/unmerge.sh |
32 |
+ ;; |
33 |
|
34 |
target_image_setup) |
35 |
shift |
36 |
|
37 |
diff --git a/targets/support/depclean.sh b/targets/support/depclean.sh |
38 |
new file mode 100755 |
39 |
index 00000000..aa66c9fd |
40 |
--- /dev/null |
41 |
+++ b/targets/support/depclean.sh |
42 |
@@ -0,0 +1,9 @@ |
43 |
+#!/bin/bash |
44 |
+ |
45 |
+source /tmp/chroot-functions.sh |
46 |
+ |
47 |
+# If the user enabled PRESERVE_LIBS in options, tell portage to preserve them. |
48 |
+[ -n "${clst_PRESERVE_LIBS}" ] && FEATURES="${clst_myfeatures} preserve-libs" |
49 |
+run_merge --depclean --with-bdeps=n |
50 |
+ |
51 |
+exit 0 |