From 8f8169ac464249c8a2b35b13f9c5278d4c9e5a46 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 28 Jul 2010 21:47:42 +0200 Subject: auto-install Packages and status file of the testcase --- test/integration/framework | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/test/integration/framework b/test/integration/framework index 97dce1e19..7e0d4b902 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -45,8 +45,9 @@ 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=$(readlink -f $(dirname $0)/../../build/bin) + 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 @@ -55,10 +56,21 @@ setupenvironment() { 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 - touch var/lib/dpkg/status + 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 -- cgit v1.2.3 From 966640d8fd2feac29909a22415955b3ce5779dcd Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 28 Jul 2010 21:53:17 +0200 Subject: * apt-pkg/orderlist.cc: - try to install another or-group member in DepRemove before breaking the or group (Closes: #590438) --- apt-pkg/orderlist.cc | 77 ++++++++++++++++- debian/changelog | 5 +- ...g-590438-broken-provides-thanks-to-remove-order | 35 ++++++++ ...g-590438-broken-provides-thanks-to-remove-order | 97 ++++++++++++++++++++++ ...g-590438-broken-provides-thanks-to-remove-order | 59 +++++++++++++ 5 files changed, 271 insertions(+), 2 deletions(-) create mode 100644 test/integration/Packages-bug-590438-broken-provides-thanks-to-remove-order create mode 100644 test/integration/status-bug-590438-broken-provides-thanks-to-remove-order create mode 100755 test/integration/test-bug-590438-broken-provides-thanks-to-remove-order diff --git a/apt-pkg/orderlist.cc b/apt-pkg/orderlist.cc index 55f9cb9cc..cb55147c3 100644 --- a/apt-pkg/orderlist.cc +++ b/apt-pkg/orderlist.cc @@ -886,13 +886,16 @@ bool pkgOrderList::DepRemove(DepIterator D) continue; /* We wish to see if the dep on the parent package is okay - in the removed (install) state of the target pkg. */ + in the removed (install) state of the target pkg. */ + bool tryFixDeps = false; if (CheckDep(D) == true) { // We want to catch loops with the code below. if (IsFlag(D.ParentPkg(),AddPending) == false) continue; } + else + tryFixDeps = true; // This is the loop detection if (IsFlag(D.ParentPkg(),Added) == true || @@ -903,6 +906,78 @@ bool pkgOrderList::DepRemove(DepIterator D) continue; } + if (tryFixDeps == true) + { + for (pkgCache::DepIterator F = D.ParentPkg().CurrentVer().DependsList(); + F.end() == false; ++F) + { + if (F->Type != pkgCache::Dep::Depends && F->Type != pkgCache::Dep::PreDepends) + continue; + // Check the Providers + if (F.TargetPkg()->ProvidesList != 0) + { + pkgCache::PrvIterator Prov = F.TargetPkg().ProvidesList(); + for (; Prov.end() == false; ++Prov) + { + pkgCache::PkgIterator const P = Prov.OwnerPkg(); + if (IsFlag(P, InList) == true && + IsFlag(P, AddPending) == true && + IsFlag(P, Added) == false && + Cache[P].InstallVer == 0) + break; + } + if (Prov.end() == false) + for (pkgCache::PrvIterator Prv = F.TargetPkg().ProvidesList(); + Prv.end() == false; ++Prv) + { + pkgCache::PkgIterator const P = Prv.OwnerPkg(); + if (IsFlag(P, InList) == true && + IsFlag(P, AddPending) == false && + Cache[P].InstallVer != 0 && + VisitNode(P) == true) + { + tryFixDeps = false; + break; + } + } + if (tryFixDeps == false) + break; + } + + // Check for Or groups + if ((F->CompareOp & pkgCache::Dep::Or) != pkgCache::Dep::Or) + continue; + // Lets see if the package is part of the Or group + pkgCache::DepIterator S = F; + for (; S.end() == false; ++S) + { + if (S.TargetPkg() == D.TargetPkg()) + break; + if ((S->CompareOp & pkgCache::Dep::Or) != pkgCache::Dep::Or || + CheckDep(S)) // Or group is satisfied by another package + for (;S.end() == false; ++S); + } + if (S.end() == true) + continue; + // skip to the end of the or group + for (;S.end() == false && (S->CompareOp & pkgCache::Dep::Or) == pkgCache::Dep::Or; ++S); + ++S; + // The soon to be removed is part of the Or group + // start again in the or group and find something which will serve as replacement + for (; F.end() == false && F != S; ++F) + { + if (F.TargetPkg() == D.TargetPkg() || + IsFlag(F.TargetPkg(), InList) == false || + VisitNode(F.TargetPkg()) == false) + continue; + tryFixDeps = false; + break; + } + if (tryFixDeps == false) + break; + } + } + // Skip over missing files if (IsMissing(D.ParentPkg()) == true) continue; diff --git a/debian/changelog b/debian/changelog index 345a46579..86b154dab 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,8 +14,11 @@ apt (0.7.26~exp11) experimental; urgency=low - prefer non-virtual packages in FindPreferredPkg (Closes: #590041) * test/integration/*: - add with bug#590041 testcase a small test "framework" + * apt-pkg/orderlist.cc: + - try to install another or-group member in DepRemove before + breaking the or group (Closes: #590438) - -- David Kalnischkies Mon, 26 Jul 2010 12:40:44 +0200 + -- David Kalnischkies Wed, 28 Jul 2010 21:41:35 +0200 apt (0.7.26~exp10) experimental; urgency=low 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..16bf008f6 --- /dev/null +++ b/test/integration/Packages-bug-590438-broken-provides-thanks-to-remove-order @@ -0,0 +1,35 @@ +Package: gawk +Priority: optional +Section: interpreters +Installed-Size: 2084 +Maintainer: Arthur Loiret +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 +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 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 +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 +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 +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 +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 +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-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..bb10c4f73 --- /dev/null +++ b/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order @@ -0,0 +1,59 @@ +#!/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 +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" + +predependstest() { +# 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') +} + +predependstest "gawk | mawk" +predependstest "mawk | gawk" + +predependstest "aawk | mawk | gawk" +predependstest "aawk | gawk | mawk" + +predependstest "gawk | awk" +predependstest "aawk | gawk | awk" + +predependstest "mawk | awk" + +predependstest "awk | gawk" +predependstest "awk | gawk | aawk" + +predependstest "awk | mawk" + +predependstest "aawk | awk" +predependstest "awk | aawk" + +predependstest "awk" + +# aptget install gawk mawk- -sqq -o Debug::pkgOrderList=1 #-o Debug::pkgPackageManager=1 -- cgit v1.2.3 From 685625bd308f62a382aaf61f1621a18b9441edfd Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 29 Jul 2010 12:26:26 +0200 Subject: configure also the replacement before remove by adding Immediate flag --- apt-pkg/orderlist.cc | 2 + debian/changelog | 3 +- ...g-590438-broken-provides-thanks-to-remove-order | 32 ++++++++++ test/integration/framework | 16 +++++ ...g-590438-broken-provides-thanks-to-remove-order | 69 +++++++++++++++++----- 5 files changed, 106 insertions(+), 16 deletions(-) diff --git a/apt-pkg/orderlist.cc b/apt-pkg/orderlist.cc index cb55147c3..602b63d3b 100644 --- a/apt-pkg/orderlist.cc +++ b/apt-pkg/orderlist.cc @@ -936,6 +936,7 @@ bool pkgOrderList::DepRemove(DepIterator D) Cache[P].InstallVer != 0 && VisitNode(P) == true) { + Flag(P, Immediate); tryFixDeps = false; break; } @@ -970,6 +971,7 @@ bool pkgOrderList::DepRemove(DepIterator D) IsFlag(F.TargetPkg(), InList) == false || VisitNode(F.TargetPkg()) == false) continue; + Flag(F.TargetPkg(), Immediate); tryFixDeps = false; break; } diff --git a/debian/changelog b/debian/changelog index 86b154dab..b836aaab8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,8 +17,9 @@ apt (0.7.26~exp11) experimental; urgency=low * apt-pkg/orderlist.cc: - try to install another or-group member in DepRemove before breaking the or group (Closes: #590438) + - configure also the replacement before remove by adding Immediate flag - -- David Kalnischkies Wed, 28 Jul 2010 21:41:35 +0200 + -- David Kalnischkies Thu, 29 Jul 2010 12:24:49 +0200 apt (0.7.26~exp10) experimental; urgency=low 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 index 16bf008f6..75a769e1a 100644 --- a/test/integration/Packages-bug-590438-broken-provides-thanks-to-remove-order +++ b/test/integration/Packages-bug-590438-broken-provides-thanks-to-remove-order @@ -33,3 +33,35 @@ 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 +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 +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 index 7e0d4b902..7b323fdb5 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -149,6 +149,22 @@ testequal() { $* 2>&1 | diff $COMPAREFILE - && msgpass || msgfail } +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 ) +} + testshowvirtual() { local VIRTUAL="E: Can't select versions from package '$1' as it purely virtual" local PACKAGE="$1" 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 index bb10c4f73..17ce50295 100755 --- a/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order +++ b/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order @@ -24,7 +24,7 @@ Size: 73986 MD5sum: 8489687ce10e656babd467c9ee389349 Description-de: Verschiedene Dateien für das Basis-System von Debian" -predependstest() { +predependsgawk() { # rm rootdir/var/cache/apt/*.bin cp $TESTDIR/$(echo "$(basename $0)" | sed 's/test-/status-/') rootdir/var/lib/dpkg/status echo "$pkgbasefile @@ -35,25 +35,64 @@ 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') } -predependstest "gawk | mawk" -predependstest "mawk | gawk" +predependsgawk "gawk | mawk" +predependsgawk "mawk | gawk" -predependstest "aawk | mawk | gawk" -predependstest "aawk | gawk | mawk" +predependsgawk "aawk | mawk | gawk" +predependsgawk "aawk | gawk | mawk" -predependstest "gawk | awk" -predependstest "aawk | gawk | awk" +predependsgawk "gawk | awk" +predependsgawk "aawk | gawk | awk" -predependstest "mawk | awk" +predependsgawk "mawk | awk" -predependstest "awk | gawk" -predependstest "awk | gawk | aawk" +predependsgawk "awk | gawk" +predependsgawk "awk | gawk | aawk" -predependstest "awk | mawk" +predependsgawk "awk | mawk" -predependstest "aawk | awk" -predependstest "awk | aawk" +predependsgawk "aawk | awk" +predependsgawk "awk | aawk" -predependstest "awk" +predependsgawk "awk" -# aptget install gawk mawk- -sqq -o Debug::pkgOrderList=1 #-o Debug::pkgPackageManager=1 +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 -- cgit v1.2.3