summaryrefslogtreecommitdiff
path: root/apt-private/private-output.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2014-04-11 14:39:28 +0200
committerMichael Vogt <mvo@debian.org>2014-04-11 14:39:28 +0200
commit473ccfb9454e2707c2145ec49e671b78dc775e0c (patch)
treeeb3981929f6b51a856fd9c3f307ab729a061a0e7 /apt-private/private-output.cc
parent4cd4a2e7033a2af214be1d830b56fab719088b7a (diff)
parentc8259fcde18ad9e08fffb04bf06ed64b87b1ac6a (diff)
Merge remote-tracking branch 'mvo/bugfix/apt-list-rc-pkgs' 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();
}
/*}}}*/