From 500347df3c544b1633215477d485d43103732743 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 25 Nov 2013 16:35:02 +0100 Subject: do not show summary in "apt list" --- apt-private/private-list.cc | 2 +- apt-private/private-output.cc | 12 ++++++++---- apt-private/private-output.h | 3 ++- 3 files changed, 11 insertions(+), 6 deletions(-) (limited to 'apt-private') diff --git a/apt-private/private-list.cc b/apt-private/private-list.cc index 8c61fcae8..6993cd797 100644 --- a/apt-private/private-list.cc +++ b/apt-private/private-list.cc @@ -149,7 +149,7 @@ bool List(CommandLine &Cmd) output_map.insert(std::make_pair( V.ParentPkg().Name(), outs.str())); } else { - ListSingleVersion(CacheFile, records, V, outs); + ListSingleVersion(CacheFile, records, V, outs, false); output_map.insert(std::make_pair( V.ParentPkg().Name(), outs.str())); } diff --git a/apt-private/private-output.cc b/apt-private/private-output.cc index 6fadf7274..91d13f31b 100644 --- a/apt-private/private-output.cc +++ b/apt-private/private-output.cc @@ -158,7 +158,8 @@ std::string GetShortDescription(pkgCacheFile &CacheFile, pkgRecords &records, pk } /*}}}*/ void ListSingleVersion(pkgCacheFile &CacheFile, pkgRecords &records, /*{{{*/ - pkgCache::VerIterator V, std::ostream &out) + pkgCache::VerIterator V, std::ostream &out, + bool include_summary) { pkgCache::PkgIterator P = V.ParentPkg(); @@ -224,9 +225,12 @@ void ListSingleVersion(pkgCacheFile &CacheFile, pkgRecords &records, /*{{{*/ out << GetVersion(CacheFile, V); } out << " " << GetArchitecture(CacheFile, P) << " "; - out << std::endl - << " " << GetShortDescription(CacheFile, records, P) - << std::endl; + if (include_summary) + { + out << std::endl + << " " << GetShortDescription(CacheFile, records, P) + << std::endl; + } } } /*}}}*/ diff --git a/apt-private/private-output.h b/apt-private/private-output.h index 9283e39ab..c3c76bb92 100644 --- a/apt-private/private-output.h +++ b/apt-private/private-output.h @@ -24,7 +24,8 @@ extern unsigned int ScreenWidth; bool InitOutput(); void ListSingleVersion(pkgCacheFile &CacheFile, pkgRecords &records, - pkgCache::VerIterator V, std::ostream &out); + pkgCache::VerIterator V, std::ostream &out, + bool include_summary=true); -- cgit v1.2.3 From e1dc051a11c2860abebf626df0470a5feb03677a Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 26 Nov 2013 08:17:29 +0100 Subject: add APT::Cmd::List-Include-Summary --- apt-private/private-cmndline.cc | 1 + apt-private/private-list.cc | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'apt-private') diff --git a/apt-private/private-cmndline.cc b/apt-private/private-cmndline.cc index 8ba6629a8..b73227924 100644 --- a/apt-private/private-cmndline.cc +++ b/apt-private/private-cmndline.cc @@ -223,6 +223,7 @@ bool addArgumentsAPT(std::vector &Args, char const * const Cm addArg(0,"installed","APT::Cmd::Installed",0); addArg(0,"upgradable","APT::Cmd::Upgradable",0); addArg('a', "all-versions", "APT::Cmd::AllVersions", 0); + addArg('v', "verbose", "APT::Cmd::List-Include-Summary", 0); } else if (addArgumentsAPTGet(Args, Cmd) || addArgumentsAPTCache(Args, Cmd)) { diff --git a/apt-private/private-list.cc b/apt-private/private-list.cc index 6993cd797..08851eb7e 100644 --- a/apt-private/private-list.cc +++ b/apt-private/private-list.cc @@ -132,6 +132,8 @@ bool List(CommandLine &Cmd) std::map output_map; std::map::const_iterator K; + bool includeSummary = _config->FindB("APT::Cmd::List-Include-Summary"); + PackageNameMatcher matcher(patterns); LocalitySortedVersionSet bag; OpTextProgress progress; @@ -149,7 +151,7 @@ bool List(CommandLine &Cmd) output_map.insert(std::make_pair( V.ParentPkg().Name(), outs.str())); } else { - ListSingleVersion(CacheFile, records, V, outs, false); + ListSingleVersion(CacheFile, records, V, outs, includeSummary); output_map.insert(std::make_pair( V.ParentPkg().Name(), outs.str())); } -- cgit v1.2.3 From e4e5d47b0e66ae7bedafbdbb685114c404381204 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 28 Nov 2013 16:50:20 +0100 Subject: fix "apt-get --purge build-dep" (closes: #720597) --- apt-private/private-cmndline.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'apt-private') diff --git a/apt-private/private-cmndline.cc b/apt-private/private-cmndline.cc index 8ba6629a8..b6f257bcb 100644 --- a/apt-private/private-cmndline.cc +++ b/apt-private/private-cmndline.cc @@ -149,6 +149,7 @@ bool addArgumentsAPTGet(std::vector &Args, char const * const else if (CmdMatches("build-dep")) { addArg('a', "host-architecture", "APT::Get::Host-Architecture", CommandLine::HasArg); + addArg(0, "purge", "APT::Get::Purge", 0); addArg(0, "solver", "APT::Solver", CommandLine::HasArg); } else if (CmdMatches("clean", "autoclean", "check", "download", "changelog") || -- cgit v1.2.3 From c872ac503156caff9d0e33306c4121dd667a6567 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 28 Nov 2013 19:45:44 +0100 Subject: add "-f" option to "build-dep" as sbuild is using it to fix regression with cross-building (LP: #1255806) --- apt-private/private-cmndline.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'apt-private') diff --git a/apt-private/private-cmndline.cc b/apt-private/private-cmndline.cc index b6f257bcb..718a7ce6a 100644 --- a/apt-private/private-cmndline.cc +++ b/apt-private/private-cmndline.cc @@ -151,6 +151,9 @@ bool addArgumentsAPTGet(std::vector &Args, char const * const addArg('a', "host-architecture", "APT::Get::Host-Architecture", CommandLine::HasArg); addArg(0, "purge", "APT::Get::Purge", 0); addArg(0, "solver", "APT::Solver", CommandLine::HasArg); + // this has no effect *but* sbuild is using it (see LP: #1255806) + // once sbuild is fixed, this option can be removed + addArg('f', "fix-broken", "APT::Get::Fix-Broken", 0); } else if (CmdMatches("clean", "autoclean", "check", "download", "changelog") || CmdMatches("markauto", "unmarkauto")) // deprecated commands -- cgit v1.2.3