summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2008-07-31 14:57:38 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2008-07-31 14:57:38 +0200
commit5aa95c863d9bc5b0de7dd1279d3ad672193cc3a6 (patch)
tree1e21e60c421e079bdd45b5163838400803bf6f24 /cmdline
parentdb40f8e03e7ff2598f7f9b406bb98047c8cc95ba (diff)
* Apply --important option to apt-cache depends (LP: #16947)
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-cache.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc
index d73111b6a..a73e35a53 100644
--- a/cmdline/apt-cache.cc
+++ b/cmdline/apt-cache.cc
@@ -555,6 +555,7 @@ bool Depends(CommandLine &CmdL)
bool Recurse = _config->FindB("APT::Cache::RecurseDepends",false);
bool Installed = _config->FindB("APT::Cache::Installed",false);
+ bool Important = _config->FindB("APT::Cache::Important",false);
bool DidSomething;
do
{
@@ -577,7 +578,12 @@ bool Depends(CommandLine &CmdL)
for (pkgCache::DepIterator D = Ver.DependsList(); D.end() == false; D++)
{
-
+ // Important deps only
+ if (Important == true)
+ if (D->Type != pkgCache::Dep::PreDepends &&
+ D->Type != pkgCache::Dep::Depends)
+ continue;
+
pkgCache::PkgIterator Trg = D.TargetPkg();
if((Installed && Trg->CurrentVer != 0) || !Installed)