From: Jorge Manuel B. S. Vicetto (jmbsvicetto) Date: Sun, 31 Mar 2013 02:23:11 +0000 (+0000) Subject: Make the use of preserved_libs optional by setting the options variable. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=462348d88b3a5fa783f322c64131025581ecc220;p=catalyst.git Make the use of preserved_libs optional by setting the options variable. --- diff --git a/catalyst b/catalyst index c29c814f..d211b991 100755 --- 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." diff --git a/files/catalyst.conf b/files/catalyst.conf index b74c546c..57606ca6 100644 --- a/files/catalyst.conf +++ b/files/catalyst.conf @@ -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. diff --git a/targets/support/unmerge.sh b/targets/support/unmerge.sh index 907113e3..0c0c0374 100644 --- a/targets/support/unmerge.sh +++ b/targets/support/unmerge.sh @@ -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