summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-09-02 12:22:33 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-09-02 12:22:33 +0200
commit158fda31be7d4ae1c80a56223faa8d01efc25acc (patch)
tree468d0433194fa68455033a18490afabaf3ff0a85
parent4cb0cd1648e4a2623cb00a11b2db2649e286706d (diff)
add wrapper around dpkg to be able to use it easily in the tests
-rw-r--r--test/integration/framework7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/integration/framework b/test/integration/framework
index 8efe47330..ba5f9dfa3 100644
--- a/test/integration/framework
+++ b/test/integration/framework
@@ -72,6 +72,9 @@ aptconfig() { runapt apt-config $*; }
aptcache() { runapt apt-cache $*; }
aptget() { runapt apt-get $*; }
aptftparchive() { runapt apt-ftparchive $*; }
+dpkg() {
+ $(which dpkg) --root=${TMPWORKINGDIRECTORY}/rootdir --force-not-root --force-bad-path --log=${TMPWORKINGDIRECTORY}/rootdir/var/log/dpkg.log $*
+}
setupenvironment() {
TMPWORKINGDIRECTORY=$(mktemp -d)
@@ -228,6 +231,10 @@ buildaptarchive() {
createaptftparchiveconfig() {
local ARCHS="$(find pool/ -name '*.deb' | grep -oE '_[a-z0-9-]+\.deb$' | sort | uniq | sed -e '/^_all.deb$/ d' -e 's#^_\([a-z0-9-]*\)\.deb$#\1#' | tr '\n' ' ')"
+ if [ -z "$ARCHS" ]; then
+ # the pool is empty, so we will operate on faked packages - let us use the configured archs
+ ARCHS="$(aptconfig dump | grep APT::Architecture | cut -d'"' -f 2 | sed '/^$/ d' | sort | uniq | tr '\n' ' ')"
+ fi
echo -n 'Dir {
ArchiveDir "' >> ftparchive.conf
echo -n $(readlink -f .) >> ftparchive.conf