X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/b53c9cea2902572822bbbece5bac236c1bbf846e..b6a0018e1c4bb22132e0316a81b7a455c6333cf1:/cmdline/apt-cache.cc?ds=inline 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++;