summaryrefslogtreecommitdiff
path: root/apt-private
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2014-09-03 18:16:16 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2014-09-27 00:10:32 +0200
commitfdba4d53d6b9b594531c34792798f4044a25157e (patch)
tree2cd8664ceeac46b2d6f5b6c6b5f91aa85ed26d59 /apt-private
parent840ca9714364d5ef5aa8eee0c9b045277b6ab945 (diff)
rework cachesets API to allow future extension
The introduction of Fnmatch showed that each new selector would require multiple new virtual methods in the CacheSetHelper to work correctly, which isn't that great. We now flip to a single virtual method which handles all cases separated by an enum – as new enum values can be added without an ABI break. Great care was taken to make old code work with the new way of organisation, which means in return that you might be bombarded with deprecation warnings now if you don't adapt, but code should still compile and work as before as can be seen in apt itself with this commit. Git-Dch: Ignore
Diffstat (limited to 'apt-private')
-rw-r--r--apt-private/private-cacheset.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/apt-private/private-cacheset.cc b/apt-private/private-cacheset.cc
index eb77be274..cb68024db 100644
--- a/apt-private/private-cacheset.cc
+++ b/apt-private/private-cacheset.cc
@@ -60,22 +60,22 @@ bool GetLocalitySortedVersionSet(pkgCacheFile &CacheFile,
if (insertCurrentVer == true)
{
if (P->CurrentVer != 0)
- vci->FromPackage(vci, CacheFile, P, APT::VersionContainerInterface::INSTALLED, helper);
+ vci->FromPackage(vci, CacheFile, P, APT::CacheSetHelper::INSTALLED, helper);
}
else if (insertUpgradable == true)
{
if(P.CurrentVer() && state.Upgradable())
- vci->FromPackage(vci, CacheFile, P, APT::VersionContainerInterface::CANDIDATE, helper);
+ vci->FromPackage(vci, CacheFile, P, APT::CacheSetHelper::CANDIDATE, helper);
}
else if (insertManualInstalled == true)
{
if (P.CurrentVer() &&
((*DepCache)[P].Flags & pkgCache::Flag::Auto) == false)
- vci->FromPackage(vci, CacheFile, P, APT::VersionContainerInterface::CANDIDATE, helper);
+ vci->FromPackage(vci, CacheFile, P, APT::CacheSetHelper::CANDIDATE, helper);
}
else
{
- if (vci->FromPackage(vci, CacheFile, P, APT::VersionContainerInterface::CANDIDATE, helper) == false)
+ if (vci->FromPackage(vci, CacheFile, P, APT::CacheSetHelper::CANDIDATE, helper) == false)
{
// no candidate, this may happen for packages in
// dpkg "deinstall ok config-file" state - we pick the first ver