Quellcode durchsuchen

* apt-pkg/vendor.cc, apt-pkg/vendorlist.cc:
- mark them as deprecated as they are unused

David Kalnischkies vor 15 Jahren
Ursprung
Commit
82b6682ac6
5 geänderte Dateien mit 17 neuen und 28 gelöschten Zeilen
  1. 0 24
      apt-pkg/acquire-item.cc
  2. 2 1
      apt-pkg/vendor.h
  3. 10 1
      apt-pkg/vendorlist.cc
  4. 2 1
      apt-pkg/vendorlist.h
  5. 3 1
      debian/changelog

+ 0 - 24
apt-pkg/acquire-item.cc

@@ -17,7 +17,6 @@
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/aptconfiguration.h>
 #include <apt-pkg/sourcelist.h>
-#include <apt-pkg/vendorlist.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/fileutl.h>
@@ -1390,29 +1389,6 @@ void pkgAcqMetaIndex::QueueIndexes(bool verify)				/*{{{*/
 									/*}}}*/
 bool pkgAcqMetaIndex::VerifyVendor(string Message)			/*{{{*/
 {
-//    // Maybe this should be made available from above so we don't have
-//    // to read and parse it every time?
-//    pkgVendorList List;
-//    List.ReadMainList();
-
-//    const Vendor* Vndr = NULL;
-//    for (std::vector<string>::const_iterator I = GPGVOutput.begin(); I != GPGVOutput.end(); I++)
-//    {
-//       string::size_type pos = (*I).find("VALIDSIG ");
-//       if (_config->FindB("Debug::Vendor", false))
-//          std::cerr << "Looking for VALIDSIG in \"" << (*I) << "\": pos " << pos 
-//                    << std::endl;
-//       if (pos != std::string::npos)
-//       {
-//          string Fingerprint = (*I).substr(pos+sizeof("VALIDSIG"));
-//          if (_config->FindB("Debug::Vendor", false))
-//             std::cerr << "Looking for \"" << Fingerprint << "\" in vendor..." <<
-//                std::endl;
-//          Vndr = List.FindVendor(Fingerprint) != "";
-//          if (Vndr != NULL);
-//          break;
-//       }
-//    }
    string::size_type pos;
 
    // check for missing sigs (that where not fatal because otherwise we had

+ 2 - 1
apt-pkg/vendor.h

@@ -4,11 +4,12 @@
 #include <vector>
 #include <map>
 
+#include <apt-pkg/macros.h>
 
 using std::string;
 
 // A class representing a particular software provider. 
-class Vendor
+class __deprecated Vendor
 {
    public:
    struct Fingerprint

+ 10 - 1
apt-pkg/vendorlist.cc

@@ -1,8 +1,13 @@
-#include <apt-pkg/vendorlist.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/error.h>
 #include <apti18n.h>
 
+#if __GNUC__ >= 4
+	#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
+#include <apt-pkg/vendorlist.h>
+
 pkgVendorList::~pkgVendorList()
 {
    for (vector<const Vendor *>::const_iterator I = VendorList.begin(); 
@@ -143,3 +148,7 @@ const Vendor* pkgVendorList::FindVendor(const std::vector<string> GPGVOutput)	/*
    return NULL;
 }
 									/*}}}*/
+
+#if __GNUC__ >= 4
+	#pragma GCC diagnostic warning "-Wdeprecated-declarations"
+#endif

+ 2 - 1
apt-pkg/vendorlist.h

@@ -17,12 +17,13 @@
 #include <vector>
 #include <apt-pkg/vendor.h>
 #include <apt-pkg/configuration.h>
+#include <apt-pkg/macros.h>
 
 using std::string;
 using std::vector;
 
 
-class pkgVendorList
+class __deprecated pkgVendorList
 {
    protected:
    vector<Vendor const *> VendorList;

+ 3 - 1
debian/changelog

@@ -3,8 +3,10 @@ apt (0.8.13.1) UNRELEASED; urgency=low
   [ David Kalnischkies ]
   * apt-pkg/deb/dpkgpm.cc:
     - skip --configure if all packages disappeared
+  * apt-pkg/vendor.cc, apt-pkg/vendorlist.cc:
+    - mark them as deprecated as they are unused
 
- -- David Kalnischkies <kalnischkies@gmail.com>  Wed, 16 Mar 2011 18:37:53 +0100
+ -- David Kalnischkies <kalnischkies@gmail.com>  Wed, 16 Mar 2011 21:23:32 +0100
 
 apt (0.8.13) unstable; urgency=low