summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-03-10 13:22:56 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2011-03-10 13:22:56 +0100
commit60600564dbf7b48b237d776b514f271a1c091ffa (patch)
tree6b302b1feb6dcd4d36cc6c9167d0641ef9ab1a36 /cmdline
parentf9f785cf01c464b56ed51b975bf0cda30f78cd4e (diff)
parented0dc1384078765b117f72a0def4fd28a1c7e72b (diff)
merged from debian-sid
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-cache.cc10
-rw-r--r--cmdline/apt-get.cc15
2 files changed, 2 insertions, 23 deletions
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc
index 34070ba9b..01e0d22e0 100644
--- a/cmdline/apt-cache.cc
+++ b/cmdline/apt-cache.cc
@@ -1519,7 +1519,6 @@ bool Policy(CommandLine &CmdL)
return true;
}
- string const myArch = _config->Find("APT::Architecture");
char const * const msgInstalled = _(" Installed: ");
char const * const msgCandidate = _(" Candidate: ");
short const InstalledLessCandidate =
@@ -1532,14 +1531,8 @@ bool Policy(CommandLine &CmdL)
// Print out detailed information for each package
APT::CacheSetHelper helper(true, GlobalError::NOTICE);
APT::PackageSet pkgset = APT::PackageSet::FromCommandLine(CacheFile, CmdL.FileList + 1, helper);
- for (APT::PackageSet::const_iterator I = pkgset.begin(); I != pkgset.end(); ++I)
+ for (APT::PackageSet::const_iterator Pkg = pkgset.begin(); Pkg != pkgset.end(); ++Pkg)
{
- pkgCache::PkgIterator Pkg = I.Group().FindPkg("any");
-
- for (; Pkg.end() != true; Pkg = I.Group().NextPkg(Pkg)) {
- if (strcmp(Pkg.Arch(),"all") == 0)
- continue;
-
cout << Pkg.FullName(true) << ":" << endl;
// Installed version
@@ -1588,7 +1581,6 @@ bool Policy(CommandLine &CmdL)
Indx->Describe(true).c_str());
}
}
- }
}
return true;
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index e22adfb6c..f71b252c8 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -382,8 +382,6 @@ 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 += I.FullName(true) + " ";
VersionsList += string(Cache[I].CandVersion) + "\n";
}
@@ -406,8 +404,6 @@ 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 += I.FullName(true) + "* ";
else
@@ -456,8 +452,6 @@ 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 += I.FullName(true) + " ";
VersionsList += string(Cache[I].CurVersion) + " => " + Cache[I].CandVersion + "\n";
@@ -479,8 +473,6 @@ 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 += I.FullName(true) + " ";
VersionsList += string(Cache[I].CurVersion) + " => " + Cache[I].CandVersion + "\n";
@@ -584,9 +576,6 @@ 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
@@ -1718,7 +1707,7 @@ bool DoAutomaticRemove(CacheFile &Cache)
R->Type != pkgCache::Dep::PreDepends)
continue;
pkgCache::PkgIterator N = R.ParentPkg();
- if (N.end() == true || N->CurrentVer == 0)
+ if (N.end() == true || (N->CurrentVer == 0 && (*Cache)[N].Install() == false))
continue;
if (Debug == true)
std::clog << "Save " << P << " as another installed garbage package depends on it" << std::endl;
@@ -1916,8 +1905,6 @@ bool DoInstall(CommandLine &CmdL)
if ((*Cache)[I].Install() == false)
continue;
pkgCache::VerIterator Cand = Cache[I].CandidateVerIter(Cache);
- if (Cand.Pseudo() == true)
- continue;
if (verset[MOD_INSTALL].find(Cand) != verset[MOD_INSTALL].end())
continue;