summaryrefslogtreecommitdiff
path: root/apt-private/private-depends.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2019-06-11 16:07:41 +0000
committerJulian Andres Klode <jak@debian.org>2019-06-11 16:07:41 +0000
commitf05d57613f25923a78d8e2939f2c3eea75ca7a54 (patch)
tree4b0d0883b93b6008dec29e755006da871ab0f69a /apt-private/private-depends.cc
parent86d4d98060f36c7e71c34af20a1193a75496ef72 (diff)
parentc74d1ee6dc7e7139f243cd57e258f51b3677d59c (diff)
Merge branch 'depend-solutions' into 'master'
apt-cache: only show solutions if displayed See merge request apt-team/apt!65
Diffstat (limited to 'apt-private/private-depends.cc')
-rw-r--r--apt-private/private-depends.cc32
1 files changed, 16 insertions, 16 deletions
diff --git a/apt-private/private-depends.cc b/apt-private/private-depends.cc
index 79d66b72a..95c747ee3 100644
--- a/apt-private/private-depends.cc
+++ b/apt-private/private-depends.cc
@@ -105,24 +105,24 @@ static bool ShowDepends(CommandLine &CmdL, bool const RevDepends)
verset.insert(APT::VersionSet::FromPackage(CacheFile, Trg, APT::CacheSetHelper::CANDIDATE, helper));
}
- }
-
- // Display all solutions
- std::unique_ptr<pkgCache::Version *[]> List(D.AllTargets());
- pkgPrioSortList(*Cache,List.get());
- for (pkgCache::Version **I = List.get(); *I != 0; I++)
- {
- pkgCache::VerIterator V(*Cache,*I);
- if (V != Cache->VerP + V.ParentPkg()->VersionList ||
- V->ParentPkg == D->Package)
- continue;
- std::cout << " " << V.ParentPkg().FullName(true) << std::endl;
-
- if (Recurse == true && Shown[V.ParentPkg()->ID] == false)
+ // Display all solutions
+ std::unique_ptr<pkgCache::Version *[]> List(D.AllTargets());
+ pkgPrioSortList(*Cache,List.get());
+ for (pkgCache::Version **I = List.get(); *I != 0; I++)
{
- Shown[V.ParentPkg()->ID] = true;
- verset.insert(APT::VersionSet::FromPackage(CacheFile, V.ParentPkg(), APT::CacheSetHelper::CANDIDATE, helper));
+ pkgCache::VerIterator V(*Cache,*I);
+ if (V != Cache->VerP + V.ParentPkg()->VersionList ||
+ V->ParentPkg == D->Package)
+ continue;
+ std::cout << " " << V.ParentPkg().FullName(true) << std::endl;
+
+ if (Recurse == true && Shown[V.ParentPkg()->ID] == false)
+ {
+ Shown[V.ParentPkg()->ID] = true;
+ verset.insert(APT::VersionSet::FromPackage(CacheFile, V.ParentPkg(), APT::CacheSetHelper::CANDIDATE, helper));
+ }
}
+
}
if (ShowOnlyFirstOr == true)