diff --git a/functions/sourcelist.sh b/functions/sourcelist.sh index dedcc89db..4ea304522 100755 --- a/functions/sourcelist.sh +++ b/functions/sourcelist.sh @@ -28,8 +28,8 @@ Create_apt_sources_list () DISTRIBUTION=${LB_DISTRIBUTION_CHROOT} ;; binary) - PARENT_MIRROR=${LB_PARENT_MIRROR_BINARY} - MIRROR=${LB_MIRROR_BINARY} + PARENT_MIRROR="${LB_PARENT_MIRROR_BINARY}" + MIRROR="${LB_MIRROR_BINARY}" PARENT_MIRROR_SECURITY=${LB_PARENT_MIRROR_BINARY_SECURITY} MIRROR_SECURITY=${LB_MIRROR_BINARY_SECURITY} PARENT_DISTRIBUTION=${LB_PARENT_DISTRIBUTION_BINARY} diff --git a/test/rebuild.sh b/test/rebuild.sh index 458c2e26d..6eadac94d 100755 --- a/test/rebuild.sh +++ b/test/rebuild.sh @@ -410,15 +410,21 @@ case ${BUILD_LATEST} in # Use the timestamp of the current Debian archive get_snapshot_from_archive MIRROR=http://deb.debian.org/debian/ + MIRROR_BINARY=${MIRROR} + MODIFY_APT_OPTIONS=0 ;; "snapshot") # Use the timestamp of the latest mirror snapshot get_snapshot_from_snapshot_debian_org MIRROR=http://snapshot.debian.org/archive/debian/${SNAPSHOT_TIMESTAMP} + MIRROR_BINARY="[check-valid-until=no] ${MIRROR}" + MODIFY_APT_OPTIONS=1 ;; "no") # The value of SNAPSHOT_TIMESTAMP was provided on the command line MIRROR=http://snapshot.debian.org/archive/debian/${SNAPSHOT_TIMESTAMP} + MIRROR_BINARY="[check-valid-until=no] ${MIRROR}" + MODIFY_APT_OPTIONS=1 ;; *) echo "E: A new option to BUILD_LATEST has been added" @@ -460,7 +466,7 @@ fi output_echo "Running lb config." lb config \ --mirror-bootstrap ${MIRROR} \ - --mirror-binary ${MIRROR} \ + --mirror-binary "${MIRROR_BINARY}" \ --security false \ --updates false \ --distribution ${DEBIAN_VERSION} \ @@ -474,9 +480,11 @@ lb config \ ${GENERATE_SOURCE} \ 2>&1 | tee $LB_OUTPUT -# Insider knowledge of live-build: -# Add '-o Acquire::Check-Valid-Until=false', to allow for rebuilds of older timestamps -sed -i -e '/^APT_OPTIONS=/s/--yes/--yes -o Acquire::Check-Valid-Until=false/' config/common +if [ ${MODIFY_APT_OPTIONS} -ne 0 ]; then + # Insider knowledge of live-build: + # Add '-o Acquire::Check-Valid-Until=false', to allow for rebuilds of older timestamps + sed -i -e '/^APT_OPTIONS=/s/--yes/--yes -o Acquire::Check-Valid-Until=false/' config/common +fi if [ ! -z "${PACKAGES}" ]; then echo "${PACKAGES}" >config/package-lists/desktop.list.chroot