Browse Source

* apt-pkg/orderlist.cc:

- try fixing before removing even if the fix is hidden in
    a provides, hidden in the #590438 testcase
debian/1.8.y
David Kalnischkies 12 years ago
parent
commit
543b0abfa5
  1. 34
      apt-pkg/orderlist.cc
  2. 3
      debian/changelog
  3. 4
      test/integration/test-bug-590438-broken-provides-thanks-to-remove-order

34
apt-pkg/orderlist.cc

@ -967,13 +967,33 @@ bool pkgOrderList::DepRemove(DepIterator D)
// 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;
Flag(F.TargetPkg(), Immediate);
tryFixDeps = false;
break;
if (IsFlag(F.TargetPkg(), InList) == true &&
IsFlag(F.TargetPkg(), AddPending) == false &&
Cache[F.TargetPkg()].InstallVer != 0 &&
VisitNode(F.TargetPkg()) == true)
{
Flag(F.TargetPkg(), Immediate);
tryFixDeps = false;
break;
}
else if (F.TargetPkg()->ProvidesList != 0)
{
pkgCache::PrvIterator Prv = F.TargetPkg().ProvidesList();
for (; Prv.end() == false; ++Prv)
{
if (IsFlag(Prv.OwnerPkg(), InList) == true &&
IsFlag(Prv.OwnerPkg(), AddPending) == false &&
Cache[Prv.OwnerPkg()].InstallVer != 0 &&
VisitNode(Prv.OwnerPkg()) == true)
{
Flag(Prv.OwnerPkg(), Immediate);
tryFixDeps = false;
break;
}
}
if (Prv.end() == false)
break;
}
}
if (tryFixDeps == false)
break;

3
debian/changelog

@ -8,6 +8,9 @@ apt (0.8.9) UNRELEASED; urgency=low
[ David Kalnischkies ]
* apt-pkg/aptconfiguration.cc:
- respect the none-force even in LANG=C (Closes: #602573)
* apt-pkg/orderlist.cc:
- try fixing before removing even if the fix is hidden in
a provides, hidden in the #590438 testcase
-- David Kalnischkies <kalnischkies@gmail.com> Sat, 06 Nov 2010 12:50:20 +0100

4
test/integration/test-bug-590438-broken-provides-thanks-to-remove-order

@ -25,7 +25,7 @@ MD5sum: 8489687ce10e656babd467c9ee389349
Description-de: Verschiedene Dateien für das Basis-System von Debian"
predependsgawk() {
# rm rootdir/var/cache/apt/*.bin
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
@ -57,7 +57,7 @@ predependsgawk "awk | aawk"
predependsgawk "awk"
predependsgawk2() {
# rm rootdir/var/cache/apt/*.bin
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

Loading…
Cancel
Save