summaryrefslogtreecommitdiff
path: root/cmdline/apt-get.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-02-12 00:04:31 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-02-12 00:04:31 +0100
commit803ea2a87f81252b2c0d541b8502ed206ce57c84 (patch)
treef6d5f02637a7bcd62330c1a51bca42a34378c0b1 /cmdline/apt-get.cc
parentc5dac10c3dd6d8f54d97d3105803d07fa891fcd4 (diff)
Add yet another pseudo package which isn't as pseudo as the others:
Arch all packages are now represented by arch depending packages which all depend on a package with the same name and the special arch "all". This packages has NO dependencies, but beside this the same information. It is the only package which has a size, the arch depending ones all have a zero size. While the arch depending pseudo packages are used for dependency resolution the arch "all" package is used for downloading and ordering of the package.
Diffstat (limited to 'cmdline/apt-get.cc')
-rw-r--r--cmdline/apt-get.cc14
1 files changed, 11 insertions, 3 deletions
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";
}