summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmdline/apt-cache.cc12
-rw-r--r--debian/changelog3
2 files changed, 13 insertions, 2 deletions
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc
index 07b95e3ca..b0034bf6d 100644
--- a/cmdline/apt-cache.cc
+++ b/cmdline/apt-cache.cc
@@ -1585,6 +1585,14 @@ bool Policy(CommandLine &CmdL)
}
string const myArch = _config->Find("APT::Architecture");
+ char const * const msgInstalled = _(" Installed: ");
+ char const * const msgCandidate = _(" Candidate: ");
+ short const InstalledLessCandidate =
+ mbstowcs(NULL, msgInstalled, 0) - mbstowcs(NULL, msgCandidate, 0);
+ short const deepInstalled =
+ (InstalledLessCandidate < 0 ? (InstalledLessCandidate*-1) : 0) - 1;
+ short const deepCandidate =
+ (InstalledLessCandidate > 0 ? (InstalledLessCandidate) : 0) - 1;
// Print out detailed information for each package
for (const char **I = CmdL.FileList + 1; *I != 0; I++)
@@ -1604,14 +1612,14 @@ bool Policy(CommandLine &CmdL)
cout << Pkg.FullName(true) << ":" << endl;
// Installed version
- cout << _(" Installed: ");
+ cout << msgInstalled << OutputInDepth(deepInstalled, " ");
if (Pkg->CurrentVer == 0)
cout << _("(none)") << endl;
else
cout << Pkg.CurrentVer().VerStr() << endl;
// Candidate Version
- cout << _(" Candidate: ");
+ cout << msgCandidate << OutputInDepth(deepCandidate, " ");
pkgCache::VerIterator V = Plcy.GetCandidateVer(Pkg);
if (V.end() == true)
cout << _("(none)") << endl;
diff --git a/debian/changelog b/debian/changelog
index 8c0ac3314..7ef1fb2a7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -24,6 +24,9 @@ apt (0.7.26~exp4) experimental; urgency=low
Thanks to Kel Modderman for report & patch! (Closes: #577226)
* ftparchive/writer.cc:
- remove 999 chars Files and Checksums rewrite limit (Closes: #577759)
+ * cmdline/apt-cache.cc:
+ - align Installed and Candidate Version in policy so they can be compared
+ easier, thanks Ralf Gesellensetter for the pointer! (Closes: #578657)
[ Jari Aalto ]
* cmdline/apt-get.cc: