summaryrefslogtreecommitdiff
path: root/test/integration/framework
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-07-28 09:19:45 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2011-07-28 09:19:45 +0200
commit0b7d641cf12761c3dcc5edb4031adfc9709963e4 (patch)
tree5d12281c5f482e6f85636f57ef86a2dc92e8713c /test/integration/framework
parent7d79339f811aeebacb3f841bac6075fdfbadd03f (diff)
parented6ba81db1b2832089ea443cf0030ab3f15fda97 (diff)
* merged latest fixes from debian-sid
* apt-pkg/contrib/sha1.cc: - fix illegally casts of on-stack buffer to a type requiring more alignment than it has resulting in segfaults on sparc (Closes: #634696) * apt-pkg/contrib/cdromutl.cc: - fix escape problem when looking for the mounted devices * apt-pkg/contrib/strutl.{h,cc}, test/libapt/strutil_test.cc: - add new DeEscapeString() similar to DeQuoteString but unescape character escapes like \0XX and \xXX (plus added test) * refresh po/* * cmdline/apt-get.cc: - fix missing download progress in apt-get download - do not require unused partial dirs in 'source' (Closes: #633510) - buildconflicts effect all architectures - implement MultiarchCross for build-dep and source (Closes: #632221) * cmdline/apt-key: - use a tmpfile instead of /etc/apt/secring.gpg (Closes: #632596) * debian/apt.postinst: - remove /etc/apt/secring.gpg if it is an empty file * doc/apt-cache.8.xml: - apply madison typofix from John Feuerstein, thanks! (Closes: #633455) * apt-pkg/policy.cc: - emit an error on unknown APT::Default-Release value (Closes: #407511) * apt-pkg/aptconfiguration.cc: - ensure that native architecture is if not specified otherwise the first architecture in the Architectures vector * apt-pkg/deb/deblistparser.cc: - Strip only :any and :native if MultiArch should be stripped as it is save to ignore them in non-MultiArch contexts but if the dependency is a specific architecture (and not the native) do not strip
Diffstat (limited to 'test/integration/framework')
-rw-r--r--test/integration/framework45
1 files changed, 42 insertions, 3 deletions
diff --git a/test/integration/framework b/test/integration/framework
index 96cdb5f5e..fa451cf4f 100644
--- a/test/integration/framework
+++ b/test/integration/framework
@@ -151,6 +151,7 @@ setupenvironment() {
configarchitecture() {
local CONFFILE=rootdir/etc/apt/apt.conf.d/01multiarch.conf
+ rm -f $CONFFILE
echo "APT::Architecture \"$1\";" > $CONFFILE
shift
while [ -n "$1" ]; do
@@ -429,6 +430,27 @@ Filename: pool/main/${NAME}/${NAME}_${VERSION}_${arch}.deb" >> $FILE
done
}
+insertsource() {
+ local RELEASE="$1"
+ local NAME="$2"
+ local ARCH="$3"
+ local VERSION="$4"
+ local DEPENDENCIES="$5"
+ local ARCHS=""
+ local SPATH="aptarchive/dists/${RELEASE}/main/source"
+ mkdir -p $SPATH
+ local FILE="${SPATH}/Sources"
+ echo "Package: $NAME
+Binary: $NAME
+Version: $VERSION
+Maintainer: Joe Sixpack <joe@example.org>
+Architecture: $ARCH" >> $FILE
+ test -z "$DEPENDENCIES" || echo "$DEPENDENCIES" >> $FILE
+ echo "Files:
+ d41d8cd98f00b204e9800998ecf8427e 0 ${NAME}_${VERSION}.dsc
+ d41d8cd98f00b204e9800998ecf8427e 0 ${NAME}_${VERSION}.tar.gz" >> $FILE
+}
+
insertinstalledpackage() {
local NAME="$1"
local ARCH="$2"
@@ -481,6 +503,10 @@ buildaptarchivefromfiles() {
generatereleasefiles
}
+# can be overridden by testcases for their pleasure
+getcodenamefromsuite() { echo -n "$1"; }
+getreleaseversionfromsuite() { true; }
+
generatereleasefiles() {
msgninfo "\tGenerate Release files… "
local DATE="${1:-now}"
@@ -489,9 +515,22 @@ generatereleasefiles() {
aptftparchive -qq release $dir -o APT::FTPArchive::Release::Patterns::='Translation-*' > $dir/Index
done
for dir in $(find ./aptarchive/dists -mindepth 1 -maxdepth 1 -type d); do
- local CODENAME="$(echo "$dir" | cut -d'/' -f 4)"
- aptftparchive -qq release $dir -o APT::FTPArchive::Release::Suite="${CODENAME}" -o APT::FTPArchive::Release::Codename="${CODENAME}" | sed -e '/0 Release$/ d' > $dir/Release # remove the self reference
- if [ "$CODENAME" = "experimental" -o "$CODENAME" = "experimental2" ]; then
+ 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
+ fi
+ if [ "$SUITE" = "experimental" -o "$SUITE" = "experimental2" ]; then
sed -i '/^Date: / a\
NotAutomatic: yes' $dir/Release
fi