summaryrefslogtreecommitdiff
path: root/test/integration
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/Packages-bug-590438-broken-provides-thanks-to-remove-order67
-rw-r--r--test/integration/framework201
-rwxr-xr-xtest/integration/run-tests8
-rw-r--r--test/integration/status-bug-590438-broken-provides-thanks-to-remove-order97
-rwxr-xr-xtest/integration/test-bug-590041-prefer-non-virtual-packages51
-rwxr-xr-xtest/integration/test-bug-590438-broken-provides-thanks-to-remove-order98
6 files changed, 522 insertions, 0 deletions
diff --git a/test/integration/Packages-bug-590438-broken-provides-thanks-to-remove-order b/test/integration/Packages-bug-590438-broken-provides-thanks-to-remove-order
new file mode 100644
index 000000000..75a769e1a
--- /dev/null
+++ b/test/integration/Packages-bug-590438-broken-provides-thanks-to-remove-order
@@ -0,0 +1,67 @@
+Package: gawk
+Priority: optional
+Section: interpreters
+Installed-Size: 2084
+Maintainer: Arthur Loiret <aloiret@debian.org>
+Architecture: i386
+Version: 1:3.1.7.dfsg-5
+Provides: awk
+Pre-Depends: libc6 (>= 2.3)
+Filename: pool/main/g/gawk/gawk_3.1.7.dfsg-5_i386.deb
+Size: 766008
+MD5sum: 6459a02cfc1b9eafb3c0415e4ff4e252
+SHA1: ac033488dae4b7e8167d610e490319c047edf7e4
+SHA256: a2337dfe1cc82aeae46f2c722e5cc7be9ecefdea4aaf13f540cfe70bd8b1d627
+Description-de: GNU awk, eine Mustererkennungs- und Verarbeitungssprache
+Homepage: http://www.gnu.org/software/gawk/
+Tag: devel::interpreter, implemented-in::c, interface::commandline, role::program, scope::utility, suite::gnu, use::filtering, use::scanning, works-with::text
+
+Package: aawk
+Priority: optional
+Section: interpreters
+Installed-Size: 2084
+Maintainer: Arthur Loiret <aloiret@debian.org>
+Architecture: i386
+Version: 1:3.1.7.dfsg-5
+Provides: awk
+Pre-Depends: libc6 (>= 2.3)
+Filename: pool/main/a/aawk/aawk_3.1.7.dfsg-5_i386.deb
+Size: 766008
+MD5sum: 6459a02cfc1b9eafb3c0415e4ff4e252
+SHA1: ac033488dae4b7e8167d610e490319c047edf7e4
+SHA256: a2337dfe1cc82aeae46f2c722e5cc7be9ecefdea4aaf13f540cfe70bd8b1d627
+Description-de: GNU awk, eine Mustererkennungs- und Verarbeitungssprache
+Homepage: http://www.gnu.org/software/gawk/
+Tag: devel::interpreter, implemented-in::c, interface::commandline, role::program, scope::utility, suite::gnu, use::filtering, use::scanning, works-with::text
+
+Package: gawk2
+Priority: optional
+Section: interpreters
+Installed-Size: 2084
+Maintainer: Arthur Loiret <aloiret@debian.org>
+Architecture: i386
+Version: 1:3.1.7.dfsg-5
+Provides: awk
+Pre-Depends: libc6 (>= 2.3)
+Depends: coolstuff
+Filename: pool/main/g/gawk/gawk_3.1.7.dfsg-5_i386.deb
+Size: 766008
+MD5sum: 6459a02cfc1b9eafb3c0415e4ff4e252
+SHA1: ac033488dae4b7e8167d610e490319c047edf7e4
+SHA256: a2337dfe1cc82aeae46f2c722e5cc7be9ecefdea4aaf13f540cfe70bd8b1d627
+Description-de: GNU awk, eine Mustererkennungs- und Verarbeitungssprache
+Homepage: http://www.gnu.org/software/gawk/
+Tag: devel::interpreter, implemented-in::c, interface::commandline, role::program, scope::utility, suite::gnu, use::filtering, use::scanning, works-with::text
+
+Package: coolstuff
+Priority: optional
+Section: cool
+Installed-Size: 10
+Maintainer: David Kalnischkies <kalnischkies+debian@gmail.com>
+Architecture: all
+Version: 1-1
+Filename: pool/main/c/coolstuff/coolstuff_1-1_all.deb
+Size: 7608
+MD5sum: 6459aa2efc139eafb323ac3f4f5aeb22
+Description: We all need cool stuff
+
diff --git a/test/integration/framework b/test/integration/framework
new file mode 100644
index 000000000..b4e9302e8
--- /dev/null
+++ b/test/integration/framework
@@ -0,0 +1,201 @@
+#!/bin/sh -- # no runable script, just for vi
+
+# we all like colorful messages
+CERROR="" # red
+CWARNING="" # yellow
+CMSG="" # green
+CINFO="" # light blue
+CDEBUG="" # blue
+CNORMAL="" # default system console color
+CDONE="" # green
+CPASS="" # green
+CFAIL="" # red
+CCMD="" # pink
+
+msgdie() { echo "${CERROR}E: $1${CNORMAL}" >&2; exit 1; }
+msgwarn() { echo "${CWARNING}W: $1${CNORMAL}" >&2; }
+msgmsg() { echo "${CMSG}$1${CNORMAL}" >&2; }
+msginfo() { echo "${CINFO}I: $1${CNORMAL}" >&2; }
+msgdebug() { echo "${CDEBUG}D: $1${CNORMAL}" >&2; }
+msgdone() { echo "${CDONE}DONE${CNORMAL}" >&2; }
+msgnwarn() { echo -n "${CWARNING}W: $1${CNORMAL}" >&2; }
+msgnmsg() { echo -n "${CMSG}$1${CNORMAL}" >&2; }
+msgninfo() { echo -n "${CINFO}I: $1${CNORMAL}" >&2; }
+msgndebug() { echo -n "${CDEBUG}D: $1${CNORMAL}" >&2; }
+msgtest() { echo -n "${CINFO}$1 ${CCMD}$(echo "$2" | sed -e 's/^aptc/apt-c/' -e 's/^aptg/apt-g/' -e 's/^aptf/apt-f/')${CINFO} …${CNORMAL} " >&2; }
+msgpass() { echo "${CPASS}PASS${CNORMAL}" >&2; }
+msgskip() { echo "${CWARNING}SKIP${CNORMAL}" >&2; }
+msgfail() { echo "${CFAIL}FAIL${CNORMAL}" >&2; }
+
+# enable / disable Debugging
+msginfo() { true; }
+msgdebug() { true; }
+msgninfo() { true; }
+msgndebug() { true; }
+msgdone() { if [ "$1" = "debug" -o "$1" = "info" ]; then true; else echo "${CDONE}DONE${CNORMAL}" >&2; fi }
+
+runapt() {
+ msgdebug "Executing: ${CCMD}$*${CDEBUG} "
+ APT_CONFIG=aptconfig.conf LD_LIBRARY_PATH=${BUILDDIRECTORY} ${BUILDDIRECTORY}/$*
+}
+aptconfig() { runapt apt-config $*; }
+aptcache() { runapt apt-cache $*; }
+aptget() { runapt apt-get $*; }
+aptftparchive() { runapt apt-ftparchive $*; }
+
+setupenvironment() {
+ local TMPWORKINGDIRECTORY=$(mktemp -d)
+ local TESTDIR=$(readlink -f $(dirname $0))
+ msgninfo "Preparing environment for ${CCMD}$0${CINFO} in ${TMPWORKINGDIRECTORY}… "
+ BUILDDIRECTORY="${TESTDIR}/../../build/bin"
+ test -x "${BUILDDIRECTORY}/apt-get" || msgdie "You need to build tree first"
+ local OLDWORKINGDIRECTORY=$(pwd)
+ trap "cd /; rm -rf $TMPWORKINGDIRECTORY; cd $OLDWORKINGDIRECTORY" 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM
+ cd $TMPWORKINGDIRECTORY
+ mkdir rootdir aptarchive
+ cd rootdir
+ mkdir -p etc/apt/apt.conf.d etc/apt/sources.list.d etc/apt/trusted.gpg.d etc/apt/preferences.d var/cache var/lib/dpkg
+ mkdir -p var/cache/apt/archives/partial var/lib/apt/lists/partial
+ local STATUSFILE=$(echo "$(basename $0)" | sed 's/^test-/status-/')
+ if [ -f "${TESTDIR}/${STATUSFILE}" ]; then
+ cp "${TESTDIR}/${STATUSFILE}" var/lib/dpkg/status
+ else
+ touch var/lib/dpkg/status
+ fi
+ mkdir -p usr/lib/apt
+ ln -s ${BUILDDIRECTORY}/methods usr/lib/apt/methods
+ cd ..
+ local PACKAGESFILE=$(echo "$(basename $0)" | sed 's/^test-/Packages-/')
+ if [ -f "${TESTDIR}/${PACKAGESFILE}" ]; then
+ cp "${TESTDIR}/${PACKAGESFILE}" aptarchive/Packages
+ else
+ touch var/lib/dpkg/status
+ fi
+ echo "RootDir \"${TMPWORKINGDIRECTORY}/rootdir\";" > aptconfig.conf
+ echo "Debug::NoLocking \"true\";" >> aptconfig.conf
+ echo "APT::Get::Show-User-Simulation-Note \"false\";" >> aptconfig.conf
+ export LC_ALL=C
+ msgdone "info"
+}
+
+configarchitecture() {
+ local CONFFILE=rootdir/etc/apt/apt.conf.d/01multiarch.conf
+ echo "APT::Architecture \"$1\";" > $CONFFILE
+ shift
+ while [ -n "$1" ]; do
+ echo "APT::Architectures:: \"$1\";" >> $CONFFILE
+ shift
+ done
+}
+
+buildflataptarchive() {
+ msginfo "Build APT archive for ${CCMD}$0${CINFO}…"
+ cd aptarchive
+ APTARCHIVE=$(readlink -f .)
+ if [ -f Packages ]; then
+ msgninfo "\tPackages file… "
+ cat Packages | gzip > Packages.gz
+ cat Packages | bzip2 > Packages.bz2
+ cat Packages | lzma > Packages.lzma
+ msgdone "info"
+ fi
+ if [ -f Sources ]; then
+ msgninfo "\tSources file… "
+ cat Sources | gzip > Sources.gz
+ cat Sources | bzip2 > Sources.bz2
+ cat Sources | lzma > Sources.lzma
+ msgdone "info"
+ fi
+ cd ..
+ aptftparchive release . > Release
+}
+
+setupflataptarchive() {
+ buildflataptarchive
+ APTARCHIVE=$(readlink -f ./aptarchive)
+ if [ -f ${APTARCHIVE}/Packages ]; then
+ msgninfo "\tadd deb sources.list line… "
+ echo "deb file://$APTARCHIVE /" > rootdir/etc/apt/sources.list.d/apt-test-archive-deb.list
+ msgdone "info"
+ else
+ rm -f rootdir/etc/apt/sources.list.d/apt-test-archive-deb.list
+ fi
+ if [ -f ${APTARCHIVE}/Sources ]; then
+ msgninfo "\tadd deb-src sources.list line… "
+ echo "deb-src file://$APTARCHIVE /" > rootdir/etc/apt/sources.list.d/apt-test-archive-deb-src.list
+ msgdone "info"
+ else
+ rm -f rootdir/etc/apt/sources.list.d/apt-test-archive-deb-src.list
+ fi
+ aptget update -qq
+}
+
+diff() {
+ local DIFFTEXT="$($(which diff) -u $* | sed -e '/^---/ d' -e '/^+++/ d' -e '/^@@/ d')"
+ if [ -n "$DIFFTEXT" ]; then
+ echo
+ echo "$DIFFTEXT"
+ return 1
+ else
+ return 0
+ fi
+}
+
+testequal() {
+ local COMPAREFILE=$(mktemp)
+ echo "$1" > $COMPAREFILE
+ shift
+ msgtest "Test for equality of" "$*"
+ $* 2>&1 | diff $COMPAREFILE - && msgpass || msgfail
+ rm $COMPAREFILE
+}
+
+testequalor2() {
+ local COMPAREFILE1=$(mktemp)
+ local COMPAREFILE2=$(mktemp)
+ local COMPAREAGAINST=$(mktemp)
+ echo "$1" > $COMPAREFILE1
+ echo "$2" > $COMPAREFILE2
+ shift 2
+ msgtest "Test for equality OR of" "$*"
+ $* 2>&1 1> $COMPAREAGAINST
+ (diff $COMPAREFILE1 $COMPAREAGAINST 1> /dev/null ||
+ diff $COMPAREFILE2 $COMPAREAGAINST 1> /dev/null) && msgpass ||
+ ( echo "\n${CINFO}Diff against OR 1${CNORMAL}" "$(diff $COMPAREFILE1 $COMPAREAGAINST)" \
+ "\n${CINFO}Diff against OR 2${CNORMAL}" "$(diff $COMPAREFILE2 $COMPAREAGAINST)" &&
+ msgfail )
+ rm $COMPAREFILE1 $COMPAREFILE2 $COMPAREAGAINST
+}
+
+testshowvirtual() {
+ local VIRTUAL="E: Can't select versions from package '$1' as it purely virtual"
+ local PACKAGE="$1"
+ shift
+ while [ -n "$1" ]; do
+ VIRTUAL="${VIRTUAL}
+E: Can't select versions from package '$1' as it purely virtual"
+ PACKAGE="${PACKAGE} $1"
+ shift
+ done
+ msgtest "Test for virtual packages" "apt-cache show $PACKAGE"
+ VIRTUAL="${VIRTUAL}
+E: No packages found"
+ local COMPAREFILE=$(mktemp)
+ local ARCH=$(dpkg-architecture -qDEB_HOST_ARCH_CPU)
+ eval `apt-config shell ARCH APT::Architecture`
+ echo "$VIRTUAL" | sed -e "s/:$ARCH//" -e 's/:all//' > $COMPAREFILE
+ aptcache show $PACKAGE 2>&1 | diff $COMPAREFILE - && msgpass || msgfail
+ rm $COMPAREFILE
+}
+
+testnopackage() {
+ msgtest "Test for non-existent packages" "apt-cache show $*"
+ local SHOWPKG="$(aptcache show $* 2>&1 | grep '^Package: ')"
+ if [ -n "$SHOWPKG" ]; then
+ echo
+ echo "$SHOWPKG"
+ msgfail
+ return 1
+ fi
+ msgpass
+}
diff --git a/test/integration/run-tests b/test/integration/run-tests
new file mode 100755
index 000000000..cb74f21e7
--- /dev/null
+++ b/test/integration/run-tests
@@ -0,0 +1,8 @@
+#!/bin/sh
+set -e
+
+local DIR=$(readlink -f $(dirname $0))
+for testcase in $(run-parts --list $DIR | grep '/test-'); do
+ echo "\033[1;32mRun Testcase \033[1;35m$(basename ${testcase})\033[0m"
+ ${testcase}
+done
diff --git a/test/integration/status-bug-590438-broken-provides-thanks-to-remove-order b/test/integration/status-bug-590438-broken-provides-thanks-to-remove-order
new file mode 100644
index 000000000..c2c03c0e4
--- /dev/null
+++ b/test/integration/status-bug-590438-broken-provides-thanks-to-remove-order
@@ -0,0 +1,97 @@
+Package: libc-bin
+Status: install ok installed
+Priority: required
+Section: libs
+Installed-Size: 1516
+Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
+Architecture: i386
+Source: eglibc
+Version: 2.11.2-2
+Replaces: libc0.1, libc0.3, libc6, libc6.1
+Breaks: libc0.1 (<< 2.10), libc0.3 (<< 2.10), libc6 (<< 2.10), libc6.1 (<< 2.10)
+Filename: pool/main/e/eglibc/libc-bin_2.11.2-2_i386.deb
+Size: 703542
+MD5sum: f554ec34c092bb8e52e3d917bec7b46c
+SHA1: 4d5ba53b50937b1d50e3234e45335de5ea97b84b
+SHA256: 4f1e6430a730321209bb6b9cf89ba8a72c95f5c93f3e263a982251b3cc8beb14
+Description-de: Die »Embedded GNU C Library«: Binärdateien
+Homepage: http://www.eglibc.org
+Tag: devel::lang:c, devel::packaging, implemented-in::c, interface::commandline, role::program, scope::utility, special::auto-inst-parts, suite::gnu, works-with::text, works-with::unicode
+
+Package: libc6
+Status: install ok installed
+Priority: required
+Section: libs
+Installed-Size: 9340
+Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
+Architecture: i386
+Source: eglibc
+Version: 2.11.2-2
+Provides: glibc-2.11-1
+Depends: libc-bin (= 2.11.2-2), libgcc1
+Recommends: libc6-i686
+Suggests: glibc-doc, debconf | debconf-2.0, locales
+Conflicts: tzdata (<< 2007k-1), tzdata-etch
+Breaks: locales (<< 2.11), locales-all (<< 2.11), nscd (<< 2.11)
+Filename: pool/main/e/eglibc/libc6_2.11.2-2_i386.deb
+Size: 3877166
+MD5sum: 3d8fe972a359ad362ac1957c2687e5c2
+SHA1: cd901f3265254e40ad198b935877f546eeaa8403
+SHA256: e1bc3da1e11f9b742d05f927362e2079482db4186ff45af9f937d284e112e7e5
+Description-de: Die »Embedded GNU C Library«: Laufzeitbibliotheken
+Homepage: http://www.eglibc.org
+Tag: devel::lang:c, devel::library, implemented-in::c, protocol::ipv6, role::shared-lib, suite::gnu
+
+Package: mawk
+Status: install ok installed
+Priority: required
+Section: utils
+Installed-Size: 228
+Maintainer: Steve Langasek <vorlon@debian.org>
+Architecture: i386
+Version: 1.3.3-15
+Provides: awk
+Pre-Depends: libc6 (>= 2.1)
+Filename: pool/main/m/mawk/mawk_1.3.3-15_i386.deb
+Size: 81430
+MD5sum: e0f9e9903a862a52b5f107d560c4d8e0
+SHA1: cca3b3ea3a57b9c3c136fb538a4fb06a99d1a33e
+SHA256: 7449b10ffb6a8636a249ad6866188cad0040a6a446fb4a3a71d81fd136297ee6
+Description-de: Eine Muster- und Textverarbeitungssprache
+Tag: devel::interpreter, implemented-in::c, interface::commandline, role::program, scope::utility, use::filtering, use::scanning, works-with::text
+
+Package: gcc-4.5-base
+Status: install ok installed
+Priority: required
+Section: libs
+Installed-Size: 172
+Maintainer: Debian GCC Maintainers <debian-gcc@lists.debian.org>
+Architecture: i386
+Source: gcc-4.5
+Version: 4.5.0-8
+Filename: pool/main/g/gcc-4.5/gcc-4.5-base_4.5.0-8_i386.deb
+Size: 117894
+MD5sum: f5850c42681fcfee3429a1b43da68433
+SHA1: 0548343feba69c4c01d5dbf147393d8dc27605ac
+SHA256: 04b60f5fe24b7397e3be233051615ff9addb66d4581578f67fde76f5d7f69f7a
+Description: The GNU Compiler Collection (base package)
+Homepage: http://gcc.gnu.org/
+
+Package: libgcc1
+Status: install ok installed
+Priority: required
+Section: libs
+Installed-Size: 148
+Maintainer: Debian GCC Maintainers <debian-gcc@lists.debian.org>
+Architecture: i386
+Source: gcc-4.5 (4.5.0-8)
+Version: 1:4.5.0-8
+Depends: gcc-4.5-base (= 4.5.0-8), libc6 (>= 2.2.4)
+Filename: pool/main/g/gcc-4.5/libgcc1_4.5.0-8_i386.deb
+Size: 52190
+MD5sum: beda956a1dcdeffed11072c2d0f3eb83
+SHA1: 7117ec43eec7982a030fcc9a12d4772de3fcdba0
+SHA256: 1d10bd532adce8683b475fcc60c22300f717ef19bf84dc5bf43b07e504f85dcb
+Description: GCC support library
+Homepage: http://gcc.gnu.org/
+
diff --git a/test/integration/test-bug-590041-prefer-non-virtual-packages b/test/integration/test-bug-590041-prefer-non-virtual-packages
new file mode 100755
index 000000000..aa9e487e1
--- /dev/null
+++ b/test/integration/test-bug-590041-prefer-non-virtual-packages
@@ -0,0 +1,51 @@
+#!/bin/sh
+set -e
+
+. $(readlink -f $(dirname $0))/framework
+setupenvironment
+configarchitecture "i386" "armel"
+
+pkglibc6="Package: libc6
+Architecture: armel
+Version: 2.11.2-2~0.3
+Description: Embedded GNU C Library: Shared libraries
+Filename: pool/main/e/eglibc/libc6_2.11.2-2_armel.deb
+Installed-Size: 9740
+MD5sum: f5b878ce5fb8aa01a7927fa1460df537
+Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
+Priority: required
+SHA1: 0464d597dfbf949e8c17a42325b1f93fb4914afd
+SHA256: faca4a3d9ccff57568abf41f6cb81ddd835be7b5d8b0161e2d5f9a7f26aae3c0
+Section: libs
+Size: 4178958
+"
+
+pkglibdb1="Package: libdb1
+Architecture: i386
+Version: 2.1.3-13~0.3
+Replaces: libc6 (<< 2.2.5-13~0.3)
+Description: The Berkeley database routines [glibc 2.0/2.1 compatibility]
+Filename: pool/main/d/db1-compat/libdb1-compat_2.1.3-13_armel.deb
+Installed-Size: 136
+MD5sum: 4043f176ab2b40b0c01bc1211b8c103c
+Maintainer: Colin Watson <cjwatson@debian.org>
+Priority: extra
+SHA1: b9396fdd2e3e8d1d4ba9e74e7346075852d85666
+SHA256: f17decaa28d1db3eeb9eb17bebe50d437d293a509bcdd7cdfd3ebb56f5de3cea
+Section: oldlibs
+Size: 44168
+"
+
+cat <<-EOF >aptarchive/Packages
+$pkglibc6
+$pkglibdb1
+EOF
+
+setupflataptarchive
+
+testshowvirtual libc6:i386
+testequal "$pkglibc6" aptcache show libc6:armel
+testequal "$pkglibc6" aptcache show libc6
+testequal "$pkglibdb1" aptcache show libdb1:i386
+testnopackage libdb1:armel
+testequal "$pkglibdb1" aptcache show libdb1
diff --git a/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order b/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order
new file mode 100755
index 000000000..17ce50295
--- /dev/null
+++ b/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order
@@ -0,0 +1,98 @@
+#!/bin/sh
+set -e
+
+local TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+
+setupenvironment
+configarchitecture "i386"
+setupflataptarchive
+
+pkgbasefile="Package: base-files
+Status: install ok installed
+Essential: yes
+Priority: required
+Section: admin
+Installed-Size: 472
+Maintainer: Santiago Vila <sanvila@debian.org>
+Architecture: i386
+Version: 5.8
+Replaces: base, dpkg (<= 1.15.0), miscutils
+Provides: base
+Filename: pool/main/b/base-files/base-files_5.8_i386.deb
+Size: 73986
+MD5sum: 8489687ce10e656babd467c9ee389349
+Description-de: Verschiedene Dateien für das Basis-System von Debian"
+
+predependsgawk() {
+# rm rootdir/var/cache/apt/*.bin
+ cp $TESTDIR/$(echo "$(basename $0)" | sed 's/test-/status-/') rootdir/var/lib/dpkg/status
+ echo "$pkgbasefile
+Pre-Depends: $1
+" >> rootdir/var/lib/dpkg/status
+ testequal "Inst gawk (1:3.1.7.dfsg-5 localhost [i386])
+Conf gawk (1:3.1.7.dfsg-5 localhost [i386])
+Remv mawk [1.3.3-15]" aptget install gawk mawk- -sqq -o PreDepends=$(echo "$1" | sed 's/ //g')
+}
+
+predependsgawk "gawk | mawk"
+predependsgawk "mawk | gawk"
+
+predependsgawk "aawk | mawk | gawk"
+predependsgawk "aawk | gawk | mawk"
+
+predependsgawk "gawk | awk"
+predependsgawk "aawk | gawk | awk"
+
+predependsgawk "mawk | awk"
+
+predependsgawk "awk | gawk"
+predependsgawk "awk | gawk | aawk"
+
+predependsgawk "awk | mawk"
+
+predependsgawk "aawk | awk"
+predependsgawk "awk | aawk"
+
+predependsgawk "awk"
+
+predependsgawk2() {
+# rm rootdir/var/cache/apt/*.bin
+ cp $TESTDIR/$(echo "$(basename $0)" | sed 's/test-/status-/') rootdir/var/lib/dpkg/status
+ echo "$pkgbasefile
+Pre-Depends: $1
+" >> rootdir/var/lib/dpkg/status
+ testequalor2 "Inst coolstuff (1-1 localhost [all])
+Conf coolstuff (1-1 localhost [all])
+Inst gawk2 (1:3.1.7.dfsg-5 localhost [i386])
+Conf gawk2 (1:3.1.7.dfsg-5 localhost [i386])
+Remv mawk [1.3.3-15]" "Inst coolstuff (1-1 localhost [all])
+Inst gawk2 (1:3.1.7.dfsg-5 localhost [i386])
+Conf coolstuff (1-1 localhost [all])
+Conf gawk2 (1:3.1.7.dfsg-5 localhost [i386])
+Remv mawk [1.3.3-15]" aptget install gawk2 mawk- -sqq -o PreDepends=$(echo "$1" | sed 's/ //g')
+}
+
+predependsgawk2 "gawk2 | mawk"
+predependsgawk2 "mawk | gawk2"
+
+predependsgawk2 "aawk | mawk | gawk2"
+predependsgawk2 "aawk | gawk2 | mawk"
+
+predependsgawk2 "gawk2 | awk"
+predependsgawk2 "aawk | gawk2 | awk"
+
+predependsgawk2 "mawk | awk"
+
+predependsgawk2 "awk | gawk2"
+predependsgawk2 "awk | gawk2 | aawk"
+
+predependsgawk2 "awk | mawk"
+
+predependsgawk2 "aawk | awk"
+predependsgawk2 "awk | aawk"
+
+predependsgawk2 "awk"
+
+
+# aptget install gawk2 mawk- -s #-o Debug::pkgOrderList=1 #-o Debug::pkgPackageManager=1