summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-cache.cc2
-rw-r--r--cmdline/apt-get.cc14
2 files changed, 13 insertions, 3 deletions
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc
index cd806286c..275daa187 100644
--- a/cmdline/apt-cache.cc
+++ b/cmdline/apt-cache.cc
@@ -1587,6 +1587,8 @@ bool Policy(CommandLine &CmdL)
}
for (; Pkg.end() != true; Pkg = Grp.NextPkg(Pkg)) {
+ if (strcmp(Pkg.Arch(),"all") == 0)
+ continue;
if (myArch == Pkg.Arch())
cout << Pkg.Name() << ":" << endl;
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 2597a6acb..93065004c 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -233,7 +233,7 @@ bool ShowList(ostream &out,string Title,string List,string VersionsList)
if it is not the main architecture */
string ShowPkg(pkgCache::PkgIterator const Pkg) {
string p = Pkg.Name();
- if (_config->Find("APT::Architecture") != Pkg.Arch())
+ if (strcmp(Pkg.Arch(),"all") != 0 && _config->Find("APT::Architecture") != Pkg.Arch())
p.append(":").append(Pkg.Arch());
return p;
}
@@ -385,6 +385,8 @@ void ShowNew(ostream &out,CacheFile &Cache)
{
pkgCache::PkgIterator I(Cache,Cache.List[J]);
if (Cache[I].NewInstall() == true) {
+ if (Cache[I].CandidateVerIter(Cache).Pseudo() == true)
+ continue;
List += ShowPkg(I) + " ";
VersionsList += string(Cache[I].CandVersion) + "\n";
}
@@ -407,6 +409,8 @@ void ShowDel(ostream &out,CacheFile &Cache)
pkgCache::PkgIterator I(Cache,Cache.List[J]);
if (Cache[I].Delete() == true)
{
+ if (Cache[I].CandidateVerIter(Cache).Pseudo() == true)
+ continue;
if ((Cache[I].iFlags & pkgDepCache::Purge) == pkgDepCache::Purge)
List += ShowPkg(I) + "* ";
else
@@ -455,7 +459,9 @@ void ShowUpgraded(ostream &out,CacheFile &Cache)
// Not interesting
if (Cache[I].Upgrade() == false || Cache[I].NewInstall() == true)
continue;
-
+ if (Cache[I].CandidateVerIter(Cache).Pseudo() == true)
+ continue;
+
List += ShowPkg(I) + " ";
VersionsList += string(Cache[I].CurVersion) + " => " + Cache[I].CandVersion + "\n";
}
@@ -476,7 +482,9 @@ bool ShowDowngraded(ostream &out,CacheFile &Cache)
// Not interesting
if (Cache[I].Downgrade() == false || Cache[I].NewInstall() == true)
continue;
-
+ if (Cache[I].CandidateVerIter(Cache).Pseudo() == true)
+ continue;
+
List += ShowPkg(I) + " ";
VersionsList += string(Cache[I].CurVersion) + " => " + Cache[I].CandVersion + "\n";
}