1 |
From: "Jorge Manuel B. S. Vicetto (jmbsvicetto)" <jmbsvicetto@g.o> |
2 |
|
3 |
--- |
4 |
catalyst | 3 +++ |
5 |
files/catalyst.conf | 2 ++ |
6 |
targets/support/unmerge.sh | 3 ++- |
7 |
3 files changed, 7 insertions(+), 1 deletion(-) |
8 |
|
9 |
diff --git a/catalyst b/catalyst |
10 |
index 9f8dd30..f885dd4 100755 |
11 |
--- a/catalyst |
12 |
+++ b/catalyst |
13 |
@@ -147,6 +147,9 @@ def parse_config(myconfig): |
14 |
if "pkgcache" in string.split(conf_values["options"]): |
15 |
print "Package cache support enabled." |
16 |
conf_values["PKGCACHE"]="1" |
17 |
+ if "preserve_libs" in string.split(conf_values["options"]); |
18 |
+ print "Preserving libs during unmerge." |
19 |
+ conf_values["PRESERVE_LIBS"]="1" |
20 |
|
21 |
if "purge" in string.split(conf_values["options"]): |
22 |
print "Purge support enabled." |
23 |
diff --git a/files/catalyst.conf b/files/catalyst.conf |
24 |
index f88f105..2983acc 100644 |
25 |
--- a/files/catalyst.conf |
26 |
+++ b/files/catalyst.conf |
27 |
@@ -59,6 +59,8 @@ hash_function="crc32" |
28 |
# build stops in livecd-stage2) |
29 |
# pkgcache = keeps a tbz2 of every built package (useful if your build stops |
30 |
# prematurely) |
31 |
+# preserve_libs = enables portage to preserve used libs when unmerging packages |
32 |
+# (used on installcd-stage2 and stage4 targets) |
33 |
# seedcache = use the build output of a previous target if it exists to speed up |
34 |
# the copy |
35 |
# snapcache = cache the snapshot so that it can be bind-mounted into the chroot. |
36 |
diff --git a/targets/support/unmerge.sh b/targets/support/unmerge.sh |
37 |
index 907113e..0c0c037 100644 |
38 |
--- a/targets/support/unmerge.sh |
39 |
+++ b/targets/support/unmerge.sh |
40 |
@@ -2,7 +2,8 @@ |
41 |
|
42 |
source /tmp/chroot-functions.sh |
43 |
|
44 |
-FEATURES="${clst_myfeatures} preserve-libs" |
45 |
+# If the user enabled PRESERVE_LIBS in options, tell portage to preserve them. |
46 |
+[ -n "${clst_PRESERVE_LIBS}" ] && FEATURES="${clst_myfeatures} preserve-libs" |
47 |
run_merge -C ${clst_packages} |
48 |
|
49 |
exit 0 |
50 |
-- |
51 |
1.8.1.5 |