X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/b8242321065c0f0e498ffcf6ba92675a19011dd4..68151307d42ed64cd6258f94a0d748abe9efb8e0:/test/integration/framework diff --git a/test/integration/framework b/test/integration/framework index bebcbf342..fe6f82ac9 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -219,10 +219,10 @@ gdb() { runapt command gdb --quiet -ex run "$CMD" --args "$CMD" "$@" } lastmodification() { - date -u -d "@$(stat -c '%Y' "${TMPWORKINGDIRECTORY}/$1")" '+%a, %d %b %Y %H:%M:%S GMT' + date -u -d "@$(stat -c '%Y' "${TMPWORKINGDIRECTORY}/$1")" -R } releasefiledate() { - grep "^${2:-Date}:" "$1" | cut -d' ' -f 2- | sed -e 's#UTC#GMT#' + grep "^${2:-Date}:" "$1" | cut -d' ' -f 2- } exitwithstatus() { @@ -403,6 +403,7 @@ EOF fi echo "Acquire::https::CaInfo \"${TMPWORKINGDIRECTORY}/rootdir/etc/webserver.pem\";" > rootdir/etc/apt/apt.conf.d/99https echo "Apt::Cmd::Disable-Script-Warning \"1\";" > rootdir/etc/apt/apt.conf.d/apt-binary + export APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=no echo 'Acquire::Connect::AddrConfig "false";' > rootdir/etc/apt/apt.conf.d/connect-addrconfig configcompression '.' 'gz' #'bz2' 'lzma' 'xz' @@ -432,6 +433,10 @@ EOF # most tests just need one signed Release file, not both export APT_DONT_SIGN='Release.gpg' + if [ -r "${TESTDIRECTORY}/extra-environment" ]; then + . "${TESTDIRECTORY}/extra-environment" + fi + msgdone "info" } @@ -1015,13 +1020,13 @@ NotAutomatic: yes' "$dir/Release" fi if [ -n "$DATE" -a "$DATE" != "now" ]; then for release in $(find ./aptarchive -name 'Release'); do - sed -i "s/^Date: .*$/Date: $(date -u -d "$DATE" '+%a, %d %b %Y %H:%M:%S %Z')/" "$release" + sed -i "s/^Date: .*$/Date: $(date -u -d "$DATE" -R)/" "$release" touch -d "$DATE" "$release" done fi if [ -n "$VALIDUNTIL" ]; then sed -i "/^Date: / a\ -Valid-Until: $(date -u -d "$VALIDUNTIL" '+%a, %d %b %Y %H:%M:%S %Z')" $(find ./aptarchive -name 'Release') +Valid-Until: $(date -u -d "$VALIDUNTIL" -R)" $(find ./aptarchive -name 'Release') fi msgdone "info" } @@ -1153,7 +1158,7 @@ signreleasefiles() { } redatereleasefiles() { - local DATE="$(date -u -d "$1" '+%a, %d %b %Y %H:%M:%S %Z')" + local DATE="$(date -u -d "$1" -R)" for release in $(find aptarchive/ -name 'Release'); do sed -i "s/^Date: .*$/Date: ${DATE}/" "$release" touch -d "$DATE" "$release"