summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2009-08-29 12:45:32 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2009-08-29 12:45:32 +0200
commitb43af876ed0901eabfb7fe93276eb9272cacf22d (patch)
tree28be7f5d599a2ff2c3c376e158fe8b2f57049cac /apt-pkg
parent86d9e9635a23c7ecfe2de7f440a6acce320067bc (diff)
parent6abe26994fd82bef9bc357055d1dc4feee261a4d (diff)
merge with lp:~mvo/apt/debian-sid with the bugfix release 0.7.23.1 in it.
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/acquire-item.cc26
-rw-r--r--apt-pkg/pkgcache.cc12
2 files changed, 19 insertions, 19 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index 94341c81a..afb3daad3 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -596,21 +596,21 @@ void pkgAcqIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf) /*{{{*/
if(Desc.URI.substr(nameLen) != *t)
continue;
- // we want to try it with the next extension
+ // we want to try it with the next extension (and make sure to
+ // not skip over the end)
t++;
+ if (t == types.end())
+ break;
- if (t != types.end())
- {
- Desc.URI = Desc.URI.substr(0, nameLen) + *t;
-
- new pkgAcqIndex(Owner, RealURI, Desc.Description, Desc.ShortDesc,
- ExpectedHash, string(".").append(*t));
-
- Status = StatDone;
- Complete = false;
- Dequeue();
- return;
- }
+ // queue new download
+ Desc.URI = Desc.URI.substr(0, nameLen) + *t;
+ new pkgAcqIndex(Owner, RealURI, Desc.Description, Desc.ShortDesc,
+ ExpectedHash, string(".").append(*t));
+
+ Status = StatDone;
+ Complete = false;
+ Dequeue();
+ return;
}
// on decompression failure, remove bad versions in partial/
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index 2a9756c45..b0ce6e598 100644
--- a/apt-pkg/pkgcache.cc
+++ b/apt-pkg/pkgcache.cc
@@ -275,13 +275,13 @@ pkgCache::PkgIterator::OkState pkgCache::PkgIterator::State() const
return NeedsUnpack;
if (Pkg->CurrentState == pkgCache::State::UnPacked ||
- Pkg->CurrentState == pkgCache::State::HalfConfigured ||
- //we don't need to care for triggers awaiting packages
- //dpkg will deal with them automatically when the
- //trigger pending action is run (those packages are usually
- //in half-configured or triggers-pending state)
+ Pkg->CurrentState == pkgCache::State::HalfConfigured)
+ // we leave triggers alone complettely. dpkg deals with
+ // them in a hard-to-predict manner and if they get
+ // resolved by dpkg before apt run dpkg --configure on
+ // the TriggersPending package dpkg returns a error
//Pkg->CurrentState == pkgCache::State::TriggersAwaited
- Pkg->CurrentState == pkgCache::State::TriggersPending)
+ //Pkg->CurrentState == pkgCache::State::TriggersPending)
return NeedsConfigure;
if (Pkg->CurrentState == pkgCache::State::HalfInstalled ||