From f1a58ff8b6cb4086ae59a2c6b02a29baf97ac116 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 26 Jul 2010 10:53:32 +0200 Subject: [PATCH] - add a 'newest' pseudo target release as in pkg/newest * --- apt-pkg/cacheset.cc | 7 ++++++- debian/changelog | 4 +++- 2 files changed, 9 insertions(+), 2 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); diff --git a/debian/changelog b/debian/changelog index 1aa05adcb..a381034c1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,12 +7,14 @@ apt (0.7.26~exp11) experimental; urgency=low - be able to omit dependency types in (r)depends (Closes: #319006) * apt-pkg/cacheset.cc: - move them back to the library as they look stable now + - add a 'newest' pseudo target release as in pkg/newest * apt-pkg/pkgcache.cc: - prefer non-virtual packages in FindPreferredPkg (Closes: #590041) * test/integration/*: - add with bug#590041 testcase a small test "framework" + * - -- David Kalnischkies Sun, 25 Jul 2010 19:37:45 +0200 + -- David Kalnischkies Mon, 26 Jul 2010 10:52:14 +0200 apt (0.7.26~exp10) experimental; urgency=low -- 2.45.2