summaryrefslogtreecommitdiff
path: root/cmdline/apt-cache.cc
diff options
context:
space:
mode:
Diffstat (limited to 'cmdline/apt-cache.cc')
-rw-r--r--cmdline/apt-cache.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc
index f7abb823d..050508663 100644
--- a/cmdline/apt-cache.cc
+++ b/cmdline/apt-cache.cc
@@ -1607,6 +1607,10 @@ static bool ShowSrcPackage(CommandLine &CmdL)
pkgSrcRecords::Parser *Parse;
unsigned found_this = 0;
while ((Parse = SrcRecs.Find(*I,false)) != 0) {
+ // SrcRecs.Find() will find both binary and source names
+ if (_config->FindB("APT::Cache::Only-Source", false) == true)
+ if (Parse->Package() != *I)
+ continue;
cout << Parse->AsStr() << endl;;
found++;
found_this++;