]> git.saurik.com Git - apt.git/commitdiff
* cmdline/apt-cache.cc:
authorDavid Kalnischkies <kalnischkies@gmail.com>
Fri, 23 Apr 2010 15:19:57 +0000 (17:19 +0200)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Fri, 23 Apr 2010 15:19:57 +0000 (17:19 +0200)
  - align Installed and Candidate Version in policy so they can be compared
    easier, thanks Ralf Gesellensetter for the pointer! (Closes: #578657)

cmdline/apt-cache.cc
debian/changelog

index 07b95e3ca81bc90ca9c25cba4ce52ae658c39752..b0034bf6d682f1b120309ca0223ae0217e8b900e 100644 (file)
@@ -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;
index 8c0ac3314393eea5d30182b013d0458a817558bc..7ef1fb2a7d5d5e8a0a9c4f8710371bcf3933a8ff 100644 (file)
@@ -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: