summaryrefslogtreecommitdiff
path: root/apt-pkg/cacheset.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2020-05-26 19:19:38 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2020-05-27 11:15:25 +0200
commit572810e9f321237873d1536c88991d7825c6f1db (patch)
treed9c5b07bc2d4ee4030214aef620a044bd1a6a6ad /apt-pkg/cacheset.h
parent5eff00606c0c55cb6e456e521c8c4059e37264a0 (diff)
Allow =version and /release selector on virtual packages
We already have code for figuring out if a virtual package is only provided by a single provider (and otherwise show a list) we can auto-select for the user, so we can adapt that to work with versioned provides as well and while at it also release selectors. The code tries to keep ABI backward compatible and hence turns relatively ugly as we need a parameter (the selector) to be passed around without adding a parameter or new virtual methods.
Diffstat (limited to 'apt-pkg/cacheset.h')
-rw-r--r--apt-pkg/cacheset.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/apt-pkg/cacheset.h b/apt-pkg/cacheset.h
index eb9e3e523..383d26b76 100644
--- a/apt-pkg/cacheset.h
+++ b/apt-pkg/cacheset.h
@@ -157,6 +157,8 @@ public: /*{{{*/
}
}
+ std::string getLastVersionMatcher() const;
+ void setLastVersionMatcher(std::string const &matcher);
/*}}}*/
protected:
bool ShowError;
@@ -167,6 +169,11 @@ protected:
pkgCache::VerIterator canNotGetCandInstVer(pkgCacheFile &Cache,
pkgCache::PkgIterator const &Pkg);
+ pkgCache::VerIterator canNotGetVerFromRelease(pkgCacheFile &Cache,
+ pkgCache::PkgIterator const &Pkg, std::string const &release);
+ pkgCache::VerIterator canNotGetVerFromVersionNumber(pkgCacheFile &Cache,
+ pkgCache::PkgIterator const &Pkg, std::string const &verstr);
+
bool PackageFromTask(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string pattern);
bool PackageFromRegEx(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string pattern);
bool PackageFromFnmatch(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string pattern);
@@ -191,7 +198,8 @@ private:
pkgCache::VerIterator canNotFindCandidateVer(pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg);
pkgCache::VerIterator canNotFindInstalledVer(pkgCacheFile &Cache, pkgCache::PkgIterator const &Pkg);
- void * const d;
+ class Private;
+ Private * const d;
}; /*}}}*/
// Iterator templates for our Containers /*{{{*/
template<typename Interface, typename Master, typename iterator_type, typename container_iterator, typename container_value> class Container_iterator_base :