X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/b53c9cea2902572822bbbece5bac236c1bbf846e..fcffe89d8344e699267210badac53ff24dd41148:/cmdline/apt-cache.cc?ds=sidebyside diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index f7abb823d..1493b63dc 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -724,7 +724,6 @@ static bool ShowDepends(CommandLine &CmdL, bool const RevDepends) continue; pkgCache::PkgIterator Trg = RevDepends ? D.ParentPkg() : D.TargetPkg(); - bool const showNoArch = RevDepends || (D->CompareOp & pkgCache::Dep::ArchSpecific) != pkgCache::Dep::ArchSpecific; if((Installed && Trg->CurrentVer != 0) || !Installed) { @@ -738,9 +737,9 @@ static bool ShowDepends(CommandLine &CmdL, bool const RevDepends) if (ShowDepType == true) cout << D.DepType() << ": "; if (Trg->VersionList == 0) - cout << "<" << Trg.FullName(showNoArch) << ">"; + cout << "<" << Trg.FullName(true) << ">"; else - cout << Trg.FullName(showNoArch); + cout << Trg.FullName(true); if (ShowVersion == true && D->Version != 0) cout << " (" << pkgCache::CompTypeDeb(D->CompareOp) << ' ' << D.TargetVer() << ')'; cout << std::endl; @@ -1607,6 +1606,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++;