summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2019-06-14 15:45:28 +0200
committerJulian Andres Klode <julian.klode@canonical.com>2019-06-14 15:45:28 +0200
commit6b6e942da072ef5b0f5d49b16c8bf2374f8a5071 (patch)
tree56f894019f48c65eb92a8417009c4dbe529db97d
parenta15f2d0deeb90ce79903823e9317d4fa3e47acff (diff)
policy: Remove GetMatch and GetPriority(pkgIterator)
These functions do not produce any useful results anymore, so it's pointless to keep them around.
-rw-r--r--apt-pkg/policy.cc21
-rw-r--r--apt-pkg/policy.h2
2 files changed, 1 insertions, 22 deletions
diff --git a/apt-pkg/policy.cc b/apt-pkg/policy.cc
index 7986aa506..1927553d4 100644
--- a/apt-pkg/policy.cc
+++ b/apt-pkg/policy.cc
@@ -1,4 +1,4 @@
-// -*- mode: cpp; mode: fold -*-
+ // -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
/* ######################################################################
@@ -252,28 +252,9 @@ void pkgPolicy::CreatePin(pkgVersionMatch::MatchType Type,string Name,
}
}
/*}}}*/
-// Policy::GetMatch - Get the matching version for a package pin /*{{{*/
-// ---------------------------------------------------------------------
-/* */
-pkgCache::VerIterator pkgPolicy::GetMatch(pkgCache::PkgIterator const &Pkg)
-{
- const Pin &PPkg = Pins[Pkg->ID];
- if (PPkg.Type == pkgVersionMatch::None)
- return pkgCache::VerIterator(*Pkg.Cache());
-
- pkgVersionMatch Match(PPkg.Data,PPkg.Type);
- return Match.Find(Pkg);
-}
- /*}}}*/
// Policy::GetPriority - Get the priority of the package pin /*{{{*/
// ---------------------------------------------------------------------
/* */
-APT_PURE signed short pkgPolicy::GetPriority(pkgCache::PkgIterator const &Pkg)
-{
- if (Pins[Pkg->ID].Type != pkgVersionMatch::None)
- return Pins[Pkg->ID].Priority;
- return 0;
-}
APT_PURE signed short pkgPolicy::GetPriority(pkgCache::VerIterator const &Ver, bool ConsiderFiles)
{
if (VerPins[Ver->ID].Type != pkgVersionMatch::None)
diff --git a/apt-pkg/policy.h b/apt-pkg/policy.h
index 77f246740..d3d68f921 100644
--- a/apt-pkg/policy.h
+++ b/apt-pkg/policy.h
@@ -71,11 +71,9 @@ class pkgPolicy : public pkgDepCache::Policy
// Things for manipulating pins
void CreatePin(pkgVersionMatch::MatchType Type,std::string Pkg,
std::string Data,signed short Priority);
- pkgCache::VerIterator GetMatch(pkgCache::PkgIterator const &Pkg);
// Things for the cache interface.
virtual pkgCache::VerIterator GetCandidateVer(pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
- virtual signed short GetPriority(pkgCache::PkgIterator const &Pkg) APT_OVERRIDE;
virtual signed short GetPriority(pkgCache::VerIterator const &Ver, bool ConsiderFiles = true) APT_OVERRIDE;
virtual signed short GetPriority(pkgCache::PkgFileIterator const &File) APT_OVERRIDE;