summaryrefslogtreecommitdiff
path: root/apt-pkg/cacheset.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/cacheset.cc')
-rw-r--r--apt-pkg/cacheset.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/apt-pkg/cacheset.cc b/apt-pkg/cacheset.cc
index df7e99fd0..f17a9e0d5 100644
--- a/apt-pkg/cacheset.cc
+++ b/apt-pkg/cacheset.cc
@@ -323,7 +323,12 @@ APT::VersionSet VersionSet::FromString(pkgCacheFile &Cache, std::string pkg,
V = getInstalledVer(Cache, P, helper);
else if (ver == "candidate")
V = getCandidateVer(Cache, P, helper);
- else {
+ else if (ver == "newest") {
+ if (P->VersionList != 0)
+ V = P.VersionList();
+ else
+ V = helper.canNotFindNewestVer(Cache, P);
+ } else {
pkgVersionMatch Match(ver, (verIsRel == true ? pkgVersionMatch::Release :
pkgVersionMatch::Version));
V = Match.Find(P);