summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/deb/deblistparser.cc2
-rw-r--r--apt-pkg/pkgcache.cc9
-rw-r--r--apt-pkg/pkgcachegen.cc3
-rw-r--r--cmdline/apt-get.cc3
4 files changed, 13 insertions, 4 deletions
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index b3d95164a..1948aedf3 100644
--- a/apt-pkg/deb/deblistparser.cc
+++ b/apt-pkg/deb/deblistparser.cc
@@ -158,7 +158,7 @@ bool debListParser::NewVersion(pkgCache::VerIterator Ver)
the architecture bound versions coming in and out on regular basis. */
if (strcmp(Ver.Arch(true),"all") == 0)
return true;
- else
+ else if (Ver.Pseudo() == true)
{
// our pseudo packages have no size to not confuse the fetcher
Ver->Size = 0;
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index 04a2c7234..d4268b31c 100644
--- a/apt-pkg/pkgcache.cc
+++ b/apt-pkg/pkgcache.cc
@@ -657,8 +657,13 @@ bool pkgCache::VerIterator::Automatic() const
are a problem everytime we need to download/install something. */
bool pkgCache::VerIterator::Pseudo() const
{
- return (S->MultiArch == pkgCache::Version::All &&
- strcmp(Arch(true),"all") != 0);
+ if (S->MultiArch == pkgCache::Version::All &&
+ strcmp(Arch(true),"all") != 0)
+ {
+ GrpIterator const Grp = ParentPkg().Group();
+ return (Grp->LastPackage != Grp->FirstPackage);
+ }
+ return false;
}
/*}}}*/
// VerIterator::NewestFile - Return the newest file version relation /*{{{*/
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc
index c1b546a00..6d103c6b6 100644
--- a/apt-pkg/pkgcachegen.cc
+++ b/apt-pkg/pkgcachegen.cc
@@ -117,7 +117,8 @@ bool pkgCacheGenerator::MergeList(ListParser &List,
std::vector<string> genArch;
if (List.ArchitectureAll() == true) {
genArch = APT::Configuration::getArchitectures();
- genArch.push_back("all");
+ if (genArch.size() != 1)
+ genArch.push_back("all");
} else
genArch.push_back(List.Architecture());
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 93065004c..343226bc3 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -585,6 +585,9 @@ void Stats(ostream &out,pkgDepCache &Dep)
unsigned long ReInstall = 0;
for (pkgCache::PkgIterator I = Dep.PkgBegin(); I.end() == false; I++)
{
+ if (pkgCache::VerIterator(Dep, Dep[I].CandidateVer).Pseudo() == true)
+ continue;
+
if (Dep[I].NewInstall() == true)
Install++;
else