From 1db6e241f2d2e2c3d39bb25c660e669fc5e2404b Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Thu, 6 Sep 2018 18:25:50 +0200 Subject: [PATCH] Separate regen of squashfs and add enman phase on remaster_generic_inner_chroot_scripts --- scripts/pre_iso_script_livecd.sh | 2 +- .../remaster_generic_inner_chroot_script.sh | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/scripts/pre_iso_script_livecd.sh b/scripts/pre_iso_script_livecd.sh index 604b25b..8d2017c 100755 --- a/scripts/pre_iso_script_livecd.sh +++ b/scripts/pre_iso_script_livecd.sh @@ -2,7 +2,7 @@ LIVECD_SQUASHFS="${CDROOT_DIR}/livecd.squashfs" -if [ -n "${DRACUT}" ] && [ -f "${LIVECD_SQUASHFS}" ]; then +if [ -n "${DRACUT}" ] && [ -n "${DRACUT_SQUASHFS}" ] && [ -f "${LIVECD_SQUASHFS}" ]; then squash_dir=$(TMPDIR="/var/tmp" mktemp -d --suffix="dracut") mkdir -p "${squash_dir}/LiveOS" mkdir -p "${CDROOT_DIR}/LiveOS" diff --git a/scripts/remaster_generic_inner_chroot_script.sh b/scripts/remaster_generic_inner_chroot_script.sh index 6afebab..59e1401 100755 --- a/scripts/remaster_generic_inner_chroot_script.sh +++ b/scripts/remaster_generic_inner_chroot_script.sh @@ -25,6 +25,17 @@ safe_run() { # make sure there is no stale pid file around that prevents entropy from running rm -f /run/entropy/entropy.lock +# Add additional enman repositories: +# For customized images +if [ -n "${SABAYON_ENMAN_REPOS}" ] ; then + safe_run equo i app-admin/enman || exit 1 + + for repos in ${SABAYON_ENMAN_REPOS} ; do + echo "Adding enman repos ${repos}..." + safe_run enman add ${repos} || exit 1 + done +fi + FORCE_EAPI=2 safe_run equo update || exit 1 for repo in $(equo repo list -q); do @@ -32,4 +43,15 @@ for repo in $(equo repo list -q); do equo repo mirrorsort "${repo}" # ignore errors done +# Unmask packages (used on custom ISO) +if [ -n "${SABAYON_UNMASK_PKGS}" ] ; then + touch /etc/entropy/packages/package.unmask + equo unmask ${SABAYON_EXTRA_PKGS} +fi + +# Add custom packages required from user for source rootfs. +if [ -n "${SABAYON_EXTRA_PKGS}" ] ; then + safe_run equo i ${SABAYON_EXTRA_PKGS[@]} +fi + exit 0