From 86a0dd9f6c83effa3a3dc85095ccb7514eafcd6f Mon Sep 17 00:00:00 2001 From: Brian Dolbec Date: Mon, 27 May 2013 17:18:43 -0700 Subject: [PATCH] Make the use of preserved_libs optional by setting the options variable. Ported from commits: 462348d88b3a5fa783f322c64131025581ecc220 f6ad384914a00099eea2a0f66232728c479ec628 in the master branch. AUTHOR: Jorge Manuel B. S. Vicetto (jmbsvicetto) (Sun 14 Apr 2013 08:22:34 PM PDT) --- catalyst/defaults.py | 1 + etc/catalyst.conf | 2 ++ targets/support/unmerge.sh | 3 ++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/catalyst/defaults.py b/catalyst/defaults.py index 15244ed9..d327a1b5 100644 --- a/catalyst/defaults.py +++ b/catalyst/defaults.py @@ -107,5 +107,6 @@ option_messages = { "purge": "Purge support enabled.", "seedcache": "Seed cache support enabled.", "snapcache": "Snapshot cache support enabled.", + 'preserve_libs': "Preserving libs during unmerge.", #"tarball": "Tarball creation enabled.", } diff --git a/etc/catalyst.conf b/etc/catalyst.conf index a6ca66d0..a65413cd 100644 --- a/etc/catalyst.conf +++ b/etc/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 100755 --- 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 -- 2.26.2