Bug#92358: mention old and new version with "apt-get -s dist-upgrate" [patch]
Package: apt
Severity: wishlist
Version: 0.5.3
Synopsis: mention old and new version with "apt-get -s dist-upgrate" [patch]
Class: change-request
Distribution: Debian testing/unstable
System: Linux 2.4.2-ac3 i686 unknown
Description:
I like to see both the old and new version of a package that is listed
to be upgraded when invoking "apt-get -s dist-upgrate". This lets me
see where the biggest version differences are, and so decide to do a
few "apt-get install ..." operations first....
Patch included, this produces lines like:
Inst fileutils [4.0.37-1] (4.0.43-1 Debian:unstable)
--- Included file ---
--- apt-pkg/algorithms.cc-ORG Tue Feb 20 08:03:17 2001
+++ apt-pkg/algorithms.cc Sat Mar 31 23:02:57 2001
@@ -49,17 +49,22 @@
/*}}}*/
// Simulate::Describe - Describe a package /*{{{*/
// ---------------------------------------------------------------------
-/* */
+/* Parameter Now == true gives both current and available varsion,
+ Parameter Now == false gives only the available package version */
void pkgSimulate::Describe(PkgIterator Pkg,ostream &out,bool Now)
{
VerIterator Ver(Sim);
- if (Now == true)
- Ver = Pkg.CurrentVer();
- else
- Ver = Sim[Pkg].CandidateVerIter(Sim);
out << Pkg.Name();
+
+ if (Now == true)
+ {
+ Ver = Pkg.CurrentVer();
+ if (Ver.end() == false)
+ out << " [" << Ver.VerStr() << ']';
+ }
+ Ver = Sim[Pkg].CandidateVerIter(Sim);
if (Ver.end() == true)
return;
@@ -76,7 +81,7 @@
Flags[Pkg->ID] = 1;
cout << "Inst ";
- Describe(Pkg,cout,false);
+ Describe(Pkg,cout,true);
Sim.MarkInstall(Pkg,false);
// Look for broken conflicts+predepends.
--- End of file ---
Reply to: