]> git.saurik.com Git - apt.git/commitdiff
include "Archive-Origin" in the apt show output
authorMichael Vogt <mvo@debian.org>
Thu, 23 Jan 2014 07:12:02 +0000 (08:12 +0100)
committerMichael Vogt <mvo@debian.org>
Thu, 23 Jan 2014 07:12:02 +0000 (08:12 +0100)
apt-private/private-output.h
apt-private/private-show.cc
test/integration/test-apt-cli-show

index c3c76bb92dc24bc27cbceb71e92d60b8e5b0e6d9..ba04ee2215214b6e97b27f9bbbfbe32d477d0713 100644 (file)
@@ -28,7 +28,7 @@ void ListSingleVersion(pkgCacheFile &CacheFile, pkgRecords &records,
                        bool include_summary=true);
 
 
-
+// helper to describe global state
 bool ShowList(std::ostream &out, std::string Title, std::string List,
               std::string VersionsList);
 void ShowBroken(std::ostream &out,CacheFile &Cache,bool Now);
@@ -43,6 +43,10 @@ bool ShowEssential(std::ostream &out,CacheFile &Cache);
 
 void Stats(std::ostream &out, pkgDepCache &Dep);
 
+// helpers to display single package data
+std::string
+GetArchiveSuite(pkgCacheFile &CacheFile, pkgCache::VerIterator ver);
+
 // prompting
 bool YnPrompt(bool Default=true);
 bool AnalPrompt(const char *Text);
index 9a838616752c1727949b0a1ee0c32d3619fd2b38..244347421eb9ff9eb813a22fff7e21f6f71f7214 100644 (file)
@@ -73,12 +73,14 @@ bool DisplayRecord(pkgCacheFile &CacheFile, pkgCache::VerIterator V,
    else
       package_size = _("unknown");
 
+   std::string suite = GetArchiveSuite(CacheFile, V);
    TFRewriteData RW[] = {
       {"Conffiles",0},
       {"Description",0},
       {"Description-md5",0},
       {"Installed-Size", installed_size.c_str(), 0},
       {"Size", package_size.c_str(), "Download-Size"},
+      {"Archive-Origin", suite.c_str(), 0},
       {}
    };
    if(TFRewrite(stdout, Tags, NULL, RW) == false)
index bbb2de7ef842e2bd65ef84769b69fc546544c978..ba56e3260efe92f7476d12da4aad2360edeb02ac 100755 (executable)
@@ -25,6 +25,7 @@ Architecture: all
 Version: 1.0
 Filename: pool/main/foo/foo_1.0_all.deb
 Download-Size: unknown
+Archive-Origin: unstable
 Description: Some description 
  That has multiple lines
 " apt show foo