diff options
-rw-r--r-- | doc/catalyst-spec.5.txt | 9 | ||||
-rw-r--r-- | examples/livecd-stage2_template.spec | 7 | ||||
-rwxr-xr-x | targets/livecd-stage2/livecd-stage2-controller.sh | 2 | ||||
-rwxr-xr-x | targets/support/depclean.sh | 6 |
4 files changed, 22 insertions, 2 deletions
diff --git a/doc/catalyst-spec.5.txt b/doc/catalyst-spec.5.txt index a1559faf..5e9cf87a 100644 --- a/doc/catalyst-spec.5.txt +++ b/doc/catalyst-spec.5.txt @@ -383,6 +383,15 @@ This is a list of any other files, not belonging to the above packages, that you would wish to have copied into your netboot image (example: `/lib/libresolv.so.2 /lib/libnss_compat.so.2`). +*livecd/depclean*:: +This feature controls the depclean run after fsscript and before unmerge. +The default is unset, and will run emerge --depclean --with-bdeps=n which results +in the smallest possible livecd. For some use cases it may be nice to not run depclean at all, +or to keep build deps. For those cases, the following two special cases are available: +livecd/depclean: no +livecd/depclean: keepbdeps +This setting is only supported by the livecd target. + *<target>/unmerge*:: This is a list of packages that will be unmerged after all the kernels have been built (example: `autoconf automake libtool m4 bison`). diff --git a/examples/livecd-stage2_template.spec b/examples/livecd-stage2_template.spec index a90b7aac..a19812ae 100644 --- a/examples/livecd-stage2_template.spec +++ b/examples/livecd-stage2_template.spec @@ -336,6 +336,13 @@ boot/kernel/gentoo/console: # Currently this feature will be enabled if livecd/verify is defined to *any* value, leave commented to disable. #livecd/verify: true +# This feature controls the depclean run after fsscript and before unmerge. +# The default is unset, and will run emerge --depclean --with-bdeps=n which results +# in the smallest possible livecd. For some use cases it may be nice to not run depclean at all, +# or to keep build deps. For those cases, the following two special cases are available: +# livecd/depclean: no +# livecd/depclean: keepbdeps + # This is a list of packages that will be unmerged after all the kernels have # been built. There are no checks on these packages, so be careful what you # add here. They can potentially break your CD. diff --git a/targets/livecd-stage2/livecd-stage2-controller.sh b/targets/livecd-stage2/livecd-stage2-controller.sh index 845d6d55..2f0af1f9 100755 --- a/targets/livecd-stage2/livecd-stage2-controller.sh +++ b/targets/livecd-stage2/livecd-stage2-controller.sh @@ -187,7 +187,7 @@ case $1 in ;; unmerge) - exec_in_chroot ${clst_shdir}/support/depclean.sh + [ "${clst_depclean}" != "no" ] && exec_in_chroot ${clst_shdir}/support/depclean.sh shift export clst_packages="$*" exec_in_chroot ${clst_shdir}/support/unmerge.sh diff --git a/targets/support/depclean.sh b/targets/support/depclean.sh index aa66c9fd..b3640958 100755 --- a/targets/support/depclean.sh +++ b/targets/support/depclean.sh @@ -4,6 +4,10 @@ source /tmp/chroot-functions.sh # If the user enabled PRESERVE_LIBS in options, tell portage to preserve them. [ -n "${clst_PRESERVE_LIBS}" ] && FEATURES="${clst_myfeatures} preserve-libs" -run_merge --depclean --with-bdeps=n +if [ "${clst_depclean}" = "keepbdeps" ]; then + run_merge --depclean --with-bdeps=y +else + run_merge --depclean --with-bdeps=n +fi exit 0 |