]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt-cache.cc
do not report deprecate warnings for the None declaration
[apt.git] / cmdline / apt-cache.cc
index f7abb823d6d671befb1847f56b4580af4ccc0f29..1493b63dca318e55dbf8707c87d8d13e557463c4 100644 (file)
@@ -724,7 +724,6 @@ static bool ShowDepends(CommandLine &CmdL, bool const RevDepends)
               continue;
 
            pkgCache::PkgIterator Trg = RevDepends ? D.ParentPkg() : D.TargetPkg();
               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)
              {
 
            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)
                if (ShowDepType == true)
                  cout << D.DepType() << ": ";
                if (Trg->VersionList == 0)
-                 cout << "<" << Trg.FullName(showNoArch) << ">";
+                 cout << "<" << Trg.FullName(true) << ">";
                else
                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;
                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) {
       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++;
         cout << Parse->AsStr() << endl;;
         found++;
         found_this++;