summaryrefslogtreecommitdiff
path: root/apt-private/private-output.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2014-04-22 16:21:05 +0200
committerMichael Vogt <mvo@debian.org>2014-04-22 16:21:05 +0200
commita298a1dc595c548e6c10b48b8e69d987e5be1c42 (patch)
tree75bbda565cefad82c558605da697ad91c820f165 /apt-private/private-output.cc
parent6f34deead51a1c200589994a4cf46b7d79a45e69 (diff)
parenta268c98635f96a5ebb432c14f3c5ba6bbd605281 (diff)
Merge remote-tracking branch 'upstream/debian/sid' into debian/sid
Diffstat (limited to 'apt-private/private-output.cc')
-rw-r--r--apt-private/private-output.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/apt-private/private-output.cc b/apt-private/private-output.cc
index bbd8545ad..757999167 100644
--- a/apt-private/private-output.cc
+++ b/apt-private/private-output.cc
@@ -146,6 +146,10 @@ static std::string GetArchitecture(pkgCacheFile &CacheFile, pkgCache::PkgIterato
pkgCache::VerIterator inst = P.CurrentVer();
pkgCache::VerIterator cand = policy->GetCandidateVer(P);
+ // this may happen for packages in dpkg "deinstall ok config-file" state
+ if (inst.IsGood() == false && cand.IsGood() == false)
+ return P.VersionList().Arch();
+
return inst ? inst.Arch() : cand.Arch();
}
/*}}}*/