summaryrefslogtreecommitdiff
path: root/test/integration/framework
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-09-05 14:50:30 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-09-05 14:50:30 +0200
commit884a4c0a3a6cba654e77478a086f26539bc5bd32 (patch)
tree97c2aeedf0e53478784e9d797108fe30e0e84669 /test/integration/framework
parent05b64a6f78e3bf39142808a3dae41a2c4618f6b0 (diff)
* apt-pkg/indexrecords.cc:
- fix Acquire::Max-ValidTime option by interpreting it really as seconds as specified in the manpage and not as days
Diffstat (limited to 'test/integration/framework')
-rw-r--r--test/integration/framework31
1 files changed, 18 insertions, 13 deletions
diff --git a/test/integration/framework b/test/integration/framework
index 45c1f156a..322cf2875 100644
--- a/test/integration/framework
+++ b/test/integration/framework
@@ -515,8 +515,9 @@ getcodenamefromsuite() { echo -n "$1"; }
getreleaseversionfromsuite() { true; }
generatereleasefiles() {
+ # $1 is the Date header and $2 is the ValidUntil header to be set
+ # both should be given in notation date/touch can understand
msgninfo "\tGenerate Release files… "
- local DATE="${1:-now}"
if [ -e aptarchive/dists ]; then
for dir in $(find ./aptarchive/dists -mindepth 3 -maxdepth 3 -type d -name 'i18n'); do
aptftparchive -qq release $dir -o APT::FTPArchive::Release::Patterns::='Translation-*' > $dir/Index
@@ -525,27 +526,31 @@ generatereleasefiles() {
local SUITE="$(echo "$dir" | cut -d'/' -f 4)"
local CODENAME="$(getcodenamefromsuite $SUITE)"
local VERSION="$(getreleaseversionfromsuite $SUITE)"
- if [ -z "$VERSION" ]; then
- aptftparchive -qq release $dir \
- -o APT::FTPArchive::Release::Suite="${SUITE}" \
- -o APT::FTPArchive::Release::Codename="${CODENAME}" \
- | sed -e '/0 Release$/ d' > $dir/Release # remove the self reference
- else
- aptftparchive -qq release $dir \
- -o APT::FTPArchive::Release::Suite="${SUITE}" \
- -o APT::FTPArchive::Release::Codename="${CODENAME}" \
- -o APT::FTPArchive::Release::Version="${VERSION}" \
- | sed -e '/0 Release$/ d' > $dir/Release # remove the self reference
+ if [ -n "$VERSION" ]; then
+ VERSION="-o APT::FTPArchive::Release::Version='${VERSION}'"
fi
+ aptftparchive -qq release $dir \
+ -o APT::FTPArchive::Release::Suite="${SUITE}" \
+ -o APT::FTPArchive::Release::Codename="${CODENAME}" \
+ -o APT::FTPArchive::Release::Label="Testcases" \
+ ${VERSION} \
+ | sed -e '/0 Release$/ d' > $dir/Release # remove the self reference
if [ "$SUITE" = "experimental" -o "$SUITE" = "experimental2" ]; then
sed -i '/^Date: / a\
NotAutomatic: yes' $dir/Release
fi
+ if [ -n "$1" -a "$1" != "now" ]; then
+ sed -i "s/^Date: .*$/Date: $(date -d "$1" '+%a, %d %b %Y %H:%M:%S %Z')/" $dir/Release
+ fi
+ if [ -n "$2" ]; then
+ sed -i "/^Date: / a\
+Valid-Until: $(date -d "$2" '+%a, %d %b %Y %H:%M:%S %Z')" $dir/Release
+ fi
done
else
aptftparchive -qq release ./aptarchive | sed -e '/0 Release$/ d' > aptarchive/Release # remove the self reference
fi
- if [ "$DATE" != "now" ]; then
+ if [ -n "$1" -a "$1" != "now" ]; then
for release in $(find ./aptarchive -name 'Release'); do
touch -d "$1" $release
done