snapshot builds: Add check-valid-until=no in sources.list
When building against the snapshot server, adjust the sources.list entry such that 'apt-get update' (in the live environment) will not complain about the expired release file
This commit is contained in:
parent
937e5379f2
commit
9d0ed5e5cb
|
@ -28,8 +28,8 @@ Create_apt_sources_list ()
|
||||||
DISTRIBUTION=${LB_DISTRIBUTION_CHROOT}
|
DISTRIBUTION=${LB_DISTRIBUTION_CHROOT}
|
||||||
;;
|
;;
|
||||||
binary)
|
binary)
|
||||||
PARENT_MIRROR=${LB_PARENT_MIRROR_BINARY}
|
PARENT_MIRROR="${LB_PARENT_MIRROR_BINARY}"
|
||||||
MIRROR=${LB_MIRROR_BINARY}
|
MIRROR="${LB_MIRROR_BINARY}"
|
||||||
PARENT_MIRROR_SECURITY=${LB_PARENT_MIRROR_BINARY_SECURITY}
|
PARENT_MIRROR_SECURITY=${LB_PARENT_MIRROR_BINARY_SECURITY}
|
||||||
MIRROR_SECURITY=${LB_MIRROR_BINARY_SECURITY}
|
MIRROR_SECURITY=${LB_MIRROR_BINARY_SECURITY}
|
||||||
PARENT_DISTRIBUTION=${LB_PARENT_DISTRIBUTION_BINARY}
|
PARENT_DISTRIBUTION=${LB_PARENT_DISTRIBUTION_BINARY}
|
||||||
|
|
|
@ -410,15 +410,21 @@ case ${BUILD_LATEST} in
|
||||||
# Use the timestamp of the current Debian archive
|
# Use the timestamp of the current Debian archive
|
||||||
get_snapshot_from_archive
|
get_snapshot_from_archive
|
||||||
MIRROR=http://deb.debian.org/debian/
|
MIRROR=http://deb.debian.org/debian/
|
||||||
|
MIRROR_BINARY=${MIRROR}
|
||||||
|
MODIFY_APT_OPTIONS=0
|
||||||
;;
|
;;
|
||||||
"snapshot")
|
"snapshot")
|
||||||
# Use the timestamp of the latest mirror snapshot
|
# Use the timestamp of the latest mirror snapshot
|
||||||
get_snapshot_from_snapshot_debian_org
|
get_snapshot_from_snapshot_debian_org
|
||||||
MIRROR=http://snapshot.debian.org/archive/debian/${SNAPSHOT_TIMESTAMP}
|
MIRROR=http://snapshot.debian.org/archive/debian/${SNAPSHOT_TIMESTAMP}
|
||||||
|
MIRROR_BINARY="[check-valid-until=no] ${MIRROR}"
|
||||||
|
MODIFY_APT_OPTIONS=1
|
||||||
;;
|
;;
|
||||||
"no")
|
"no")
|
||||||
# The value of SNAPSHOT_TIMESTAMP was provided on the command line
|
# The value of SNAPSHOT_TIMESTAMP was provided on the command line
|
||||||
MIRROR=http://snapshot.debian.org/archive/debian/${SNAPSHOT_TIMESTAMP}
|
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"
|
echo "E: A new option to BUILD_LATEST has been added"
|
||||||
|
@ -460,7 +466,7 @@ fi
|
||||||
output_echo "Running lb config."
|
output_echo "Running lb config."
|
||||||
lb config \
|
lb config \
|
||||||
--mirror-bootstrap ${MIRROR} \
|
--mirror-bootstrap ${MIRROR} \
|
||||||
--mirror-binary ${MIRROR} \
|
--mirror-binary "${MIRROR_BINARY}" \
|
||||||
--security false \
|
--security false \
|
||||||
--updates false \
|
--updates false \
|
||||||
--distribution ${DEBIAN_VERSION} \
|
--distribution ${DEBIAN_VERSION} \
|
||||||
|
@ -474,9 +480,11 @@ lb config \
|
||||||
${GENERATE_SOURCE} \
|
${GENERATE_SOURCE} \
|
||||||
2>&1 | tee $LB_OUTPUT
|
2>&1 | tee $LB_OUTPUT
|
||||||
|
|
||||||
# Insider knowledge of live-build:
|
if [ ${MODIFY_APT_OPTIONS} -ne 0 ]; then
|
||||||
# Add '-o Acquire::Check-Valid-Until=false', to allow for rebuilds of older timestamps
|
# Insider knowledge of live-build:
|
||||||
sed -i -e '/^APT_OPTIONS=/s/--yes/--yes -o Acquire::Check-Valid-Until=false/' config/common
|
# 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
|
if [ ! -z "${PACKAGES}" ]; then
|
||||||
echo "${PACKAGES}" >config/package-lists/desktop.list.chroot
|
echo "${PACKAGES}" >config/package-lists/desktop.list.chroot
|
||||||
|
|
Loading…
Reference in New Issue