diff options
author | David Kalnischkies <david@kalnischkies.de> | 2015-10-30 16:34:25 +0100 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2015-11-04 18:04:05 +0100 |
commit | 294a80209a0c6ea617a14fb2ae650d4fd329eab5 (patch) | |
tree | 6430408a0b5ceaae3bb862fb144c265adb116b46 /apt-pkg/depcache.cc | |
parent | 51818f26c784bb574dafc545e8ae320845e5e8fc (diff) |
sanify API to get 'the' candidate version
This was discussed a while ago on #debian-apt and now that I see myself
making this mistake lets bite the bullet and fix it in the easy way out
version: Using a new name which fits with a similar named setter and
deprecate the old method instead of 'hostily' changing API.
Closes: #803471
Diffstat (limited to 'apt-pkg/depcache.cc')
-rw-r--r-- | apt-pkg/depcache.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 39bbe484f..a3d2f6449 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -153,7 +153,7 @@ bool pkgDepCache::Init(OpProgress * const Prog) State.iFlags = 0; // Figure out the install version - State.CandidateVer = GetCandidateVer(I); + State.CandidateVer = LocalPolicy->GetCandidateVer(I); State.InstallVer = I.CurrentVer(); State.Mode = ModeKeep; @@ -1467,6 +1467,11 @@ void pkgDepCache::SetReInstall(PkgIterator const &Pkg,bool To) } } /*}}}*/ +pkgCache::VerIterator pkgDepCache::GetCandidateVersion(PkgIterator const &Pkg)/*{{{*/ +{ + return PkgState[Pkg->ID].CandidateVerIter(*this); +} + /*}}}*/ // DepCache::SetCandidateVersion - Change the candidate version /*{{{*/ // --------------------------------------------------------------------- /* */ |