Make the use of preserved_libs optional by setting the options variable.
authorJorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto@gentoo.org>
Sun, 31 Mar 2013 02:23:11 +0000 (02:23 +0000)
committerJorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto@gentoo.org>
Sun, 14 Apr 2013 17:30:11 +0000 (17:30 +0000)
catalyst
files/catalyst.conf
targets/support/unmerge.sh

index c29c814f734c885886c88375e475e2e0559d4b40..d211b99142e0b6b4a0ec339e3c4034fde553433c 100755 (executable)
--- a/catalyst
+++ b/catalyst
@@ -147,6 +147,9 @@ def parse_config(myconfig):
        if "pkgcache" in string.split(conf_values["options"]):
                print "Package cache support enabled."
                conf_values["PKGCACHE"]="1"
+       if "preserve_libs" in string.split(conf_values["options"]);
+               print "Preserving libs during unmerge."
+               conf_values["PRESERVE_LIBS"]="1"
 
        if "purge" in string.split(conf_values["options"]):
                print "Purge support enabled."
index b74c546cc1722a95d44e6030415f7e67fb8d7399..57606ca6fc8fb9a94ca37cd39f6c0ebea4a3a07c 100644 (file)
@@ -59,6 +59,8 @@ hash_function="crc32"
 #      build stops in livecd-stage2)
 # pkgcache = keeps a tbz2 of every built package (useful if your build stops
 #      prematurely)
+# preserve_libs = enables portage to preserve used libs when unmerging packages
+#   (used on installcd-stage2 and stage4 targets)
 # seedcache = use the build output of a previous target if it exists to speed up
 #      the copy
 # snapcache = cache the snapshot so that it can be bind-mounted into the chroot.
index 907113e3b12b0ad2f13e0752b13ed50158f413eb..0c0c03743cc0be30d917a04fbeb5aa0b15bbf75e 100644 (file)
@@ -2,7 +2,8 @@
 
 source /tmp/chroot-functions.sh
 
-FEATURES="${clst_myfeatures} preserve-libs"
+# If the user enabled PRESERVE_LIBS in options, tell portage to preserve them.
+[ -n "${clst_PRESERVE_LIBS}" ] && FEATURES="${clst_myfeatures} preserve-libs"
 run_merge -C ${clst_packages}
 
 exit 0