diff --git a/scripts/daily_iso_build.sh b/scripts/daily_iso_build.sh index 19d88de..0b155b1 100755 --- a/scripts/daily_iso_build.sh +++ b/scripts/daily_iso_build.sh @@ -12,10 +12,12 @@ done CUR_DATE=$(date -u +%Y%m%d) LOG_FILE="/var/log/molecule/autobuild-${CUR_DATE}-${$}.log" +BUILDING_DAILY=1 # to make ISO remaster spec files working (pre_iso_script) export CUR_DATE export ETP_NONINTERACTIVE=1 +export BUILDING_DAILY echo "DO_PUSH=${DO_PUSH}" echo "DRY_RUN=${DRY_RUN}" diff --git a/scripts/remaster_post.sh b/scripts/remaster_post.sh index 6479d30..26dae0d 100755 --- a/scripts/remaster_post.sh +++ b/scripts/remaster_post.sh @@ -2,6 +2,9 @@ PKGS_DIR="/sabayon/pkgcache" CHROOT_PKGS_DIR="${CHROOT_DIR}/var/lib/entropy/client/packages" +# load common stuff +. /sabayon/scripts/remaster_post_common.sh + # make sure to not leak /proc umount "${CHROOT_DIR}/proc" &> /dev/null umount "${CHROOT_DIR}/proc" &> /dev/null diff --git a/scripts/remaster_post_common.sh b/scripts/remaster_post_common.sh new file mode 100755 index 0000000..29eb0d0 --- /dev/null +++ b/scripts/remaster_post_common.sh @@ -0,0 +1,9 @@ +# switch to sabayon-weekly repository if the ISO is not a DAILY one +# BUILDING_DAILY is set in scripts/daily_iso_build.sh +if [ -z "${BUILDING_DAILY}" ]; then + # only the first occurence + local repo_conf="${CHROOT_DIR}/etc/entropy/repositories.conf" + sed -i "/^repository =/ s/sabayonlinux.org/sabayon-weekly/" "${repo_conf}" || exit 1 + sed -i "/^officialrepositoryid/ s/sabayonlinux.org/sabayon-weekly/" "${repo_conf}" || exit 1 + sed -i "/^official-repository-id/ s/sabayonlinux.org/sabayon-weekly/" "${repo_conf}" || exit 1 +fi