summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-private/private-cmndline.cc2
-rw-r--r--apt-private/private-list.cc6
-rw-r--r--apt-private/private-output.cc12
-rw-r--r--apt-private/private-output.h3
4 files changed, 14 insertions, 9 deletions
diff --git a/apt-private/private-cmndline.cc b/apt-private/private-cmndline.cc
index 8ba6629a8..35d61f318 100644
--- a/apt-private/private-cmndline.cc
+++ b/apt-private/private-cmndline.cc
@@ -222,7 +222,7 @@ bool addArgumentsAPT(std::vector<CommandLine::Args> &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('a', "all-versions", "APT::Cmd::All-Versions", 0);
}
else if (addArgumentsAPTGet(Args, Cmd) || addArgumentsAPTCache(Args, Cmd))
{
diff --git a/apt-private/private-list.cc b/apt-private/private-list.cc
index 8c61fcae8..680a9a535 100644
--- a/apt-private/private-list.cc
+++ b/apt-private/private-list.cc
@@ -69,7 +69,7 @@ class PackageNameMatcher : public Matcher /*{{{*/
cachefilter = new APT::CacheFilter::PackageNameMatchesFnmatch(pattern);
#else
APT::CacheFilter::PackageMatcher *cachefilter = NULL;
- if(_config->FindB("APT::Cmd::UseRegexp", false) == true)
+ if(_config->FindB("APT::Cmd::Use-Regexp", false) == true)
cachefilter = new APT::CacheFilter::PackageNameMatchesRegEx(pattern);
else
cachefilter = new APT::CacheFilter::PackageNameMatchesFnmatch(pattern);
@@ -143,13 +143,13 @@ bool List(CommandLine &Cmd)
for (LocalitySortedVersionSet::iterator V = bag.begin(); V != bag.end(); V++)
{
std::stringstream outs;
- if(_config->FindB("APT::Cmd::AllVersions", false) == true)
+ if(_config->FindB("APT::Cmd::All-Versions", false) == true)
{
ListAllVersions(CacheFile, records, V.ParentPkg(), outs);
output_map.insert(std::make_pair<std::string, std::string>(
V.ParentPkg().Name(), outs.str()));
} else {
- ListSingleVersion(CacheFile, records, V, outs);
+ ListSingleVersion(CacheFile, records, V, outs, false);
output_map.insert(std::make_pair<std::string, std::string>(
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);