summaryrefslogtreecommitdiff
path: root/test/integration/framework
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2021-01-09 00:57:30 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2021-09-04 15:35:15 +0200
commit61d4ee5347f2c802f84c6ec44448fc16e45949ec (patch)
tree563be76abeaf4fdac5ebbe366e3cbe88117f1d55 /test/integration/framework
parent8ff4e226af55a9feb168477a2b1a99f9c5152e54 (diff)
Ensure dpkg -C works correctly in our testcases
Gbp-Dch: Ignore
Diffstat (limited to 'test/integration/framework')
-rw-r--r--test/integration/framework10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/integration/framework b/test/integration/framework
index 8c9abfbe4..42445508e 100644
--- a/test/integration/framework
+++ b/test/integration/framework
@@ -204,6 +204,9 @@ aptinternalplanner() { runapt "${APTINTERNALPLANNER}" "$@"; }
dpkg() {
"${TMPWORKINGDIRECTORY}/rootdir/usr/bin/dpkg" "$@"
}
+dpkgquery() {
+ command dpkg-query --admindir="${TMPWORKINGDIRECTORY}/rootdir/var/lib/dpkg" "$@"
+}
dpkg_version() {
command perl -MDpkg -E 'say $Dpkg::PROGVERSION'
}
@@ -372,7 +375,8 @@ setupenvironment() {
mkdir -p usr/bin var/cache var/lib var/log var/crash tmp
mkdir -p var/lib/dpkg/info var/lib/dpkg/updates var/lib/dpkg/triggers
mkdir -p usr/lib/apt/solvers usr/lib/apt/planners
- touch var/lib/dpkg/available
+ touch var/lib/dpkg/available var/lib/dpkg/lock
+ echo '1' > var/lib/dpkg/info/format
ln -s "${METHODSDIR}" usr/lib/apt/methods
ln -s "${APTDUMPSOLVER}" usr/lib/apt/solvers/dump
ln -s "${APTDUMPSOLVER}" usr/lib/apt/planners/dump
@@ -1049,10 +1053,12 @@ Version: $VERSION" >> "$FILE"
test -z "$DEPENDENCIES" || printf "%b\n" "$DEPENDENCIES" >> "$FILE"
printf "%b\n" "Description: $DESCRIPTION" >> "$FILE"
echo >> "$FILE"
- if [ "$(dpkg-query -W --showformat='${Multi-Arch}')" = 'same' ]; then
+ if [ "$(dpkgquery -W --showformat='${Multi-Arch}' "${NAME}:${arch}" 2>/dev/null)" = 'same' ]; then
echo -n > "${INFO}/${NAME}:${arch}.list"
+ echo -n > "${INFO}/${NAME}:${arch}.md5sums"
else
echo -n > "${INFO}/${NAME}.list"
+ echo -n > "${INFO}/${NAME}.md5sums"
fi
done
}