summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2018-04-13 12:30:53 +0200
committerJulian Andres Klode <julian.klode@canonical.com>2018-04-13 12:30:53 +0200
commit03cc48f6c6591d762c27f9b5c8627b267a7158e2 (patch)
treeace98ca08595188034b6a75d17575cbc355247b6
parentbe63b9a35f6bc2e3cb00ad9f11a757ee1c4bb79d (diff)
apt-private: Collect not found packages in CacheSetHelperAPTGet
Collecting the packages we could not find allows us to pass them to other places.
-rw-r--r--apt-private/private-cacheset.cc10
-rw-r--r--apt-private/private-cacheset.h2
2 files changed, 9 insertions, 3 deletions
diff --git a/apt-private/private-cacheset.cc b/apt-private/private-cacheset.cc
index 3d1a2b91c..95a16f8ba 100644
--- a/apt-private/private-cacheset.cc
+++ b/apt-private/private-cacheset.cc
@@ -358,9 +358,15 @@ APT::VersionSet CacheSetHelperAPTGet::tryVirtualPackage(pkgCacheFile &Cache, pkg
}
pkgCache::PkgIterator CacheSetHelperAPTGet::canNotFindPkgName(pkgCacheFile &Cache, std::string const &str)
{
- pkgCache::PkgIterator const Pkg = canNotFindPkgName_impl(Cache, str);
+ pkgCache::PkgIterator Pkg = canNotFindPkgName_impl(Cache, str);
if (Pkg.end())
- return APT::CacheSetHelper::canNotFindPkgName(Cache, str);
+ {
+ Pkg = APT::CacheSetHelper::canNotFindPkgName(Cache, str);
+ if (Pkg.end() && ShowError)
+ {
+ notFound.insert(str);
+ }
+ }
return Pkg;
}
/*}}}*/
diff --git a/apt-private/private-cacheset.h b/apt-private/private-cacheset.h
index 7bf486b9e..d20d00b68 100644
--- a/apt-private/private-cacheset.h
+++ b/apt-private/private-cacheset.h
@@ -94,9 +94,9 @@ class CacheSetHelperAPTGet : public APT::CacheSetHelper {
bool explicitlyNamed;
APT::PackageSet virtualPkgs;
-
public:
std::list<std::pair<pkgCache::VerIterator, std::string> > selectedByRelease;
+ std::set<std::string> notFound;
explicit CacheSetHelperAPTGet(std::ostream &out);