diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2010-07-26 10:53:32 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2010-07-26 10:53:32 +0200 |
commit | f1a58ff8b6cb4086ae59a2c6b02a29baf97ac116 (patch) | |
tree | aa9a231f27d4d032b7d2db8c00d52dc2533ec754 /apt-pkg | |
parent | a5032f842366f482371173d030e505d79366fd19 (diff) |
- add a 'newest' pseudo target release as in pkg/newest
*
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/cacheset.cc | 7 |
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); |