]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/deb/debmetaindex.cc
Fix the test suite harder
[apt.git] / apt-pkg / deb / debmetaindex.cc
index 46a7181fc5e1efd4a91476a7e8ac55aeec5c8d13..b2e9eeb0096b4600c5d5cce2dd8a2368ece3b91c 100644 (file)
 #include <string>
 #include <utility>
 #include <vector>
-#include <set>
 #include <algorithm>
 
-#include <sys/types.h>
 #include <sys/stat.h>
-#include <unistd.h>
 #include <string.h>
 
 #include <apti18n.h>
@@ -128,12 +125,12 @@ static void GetIndexTargetsFor(char const * const Type, std::string const &URI,
    {
       for (std::vector<std::string>::const_iterator T = E->Targets.begin(); T != E->Targets.end(); ++T)
       {
-#define APT_T_CONFIG(X) _config->Find(std::string("APT::Acquire::Targets::") + Type  + "::" + *T + "::" + (X))
+#define APT_T_CONFIG(X) _config->Find(std::string("Acquire::IndexTargets::") + Type  + "::" + *T + "::" + (X))
         std::string const tplMetaKey = APT_T_CONFIG(flatArchive ? "flatMetaKey" : "MetaKey");
         std::string const tplShortDesc = APT_T_CONFIG("ShortDescription");
-        std::string const tplLongDesc = APT_T_CONFIG(flatArchive ? "flatDescription" : "Description");
-        bool const IsOptional = _config->FindB(std::string("APT::Acquire::Targets::") + Type + "::" + *T + "::Optional", true);
-        bool const KeepCompressed = _config->FindB(std::string("APT::Acquire::Targets::") + Type + "::" + *T + "::KeepCompressed", GzipIndex);
+        std::string const tplLongDesc = "$(SITE) " + APT_T_CONFIG(flatArchive ? "flatDescription" : "Description");
+        bool const IsOptional = _config->FindB(std::string("Acquire::IndexTargets::") + Type + "::" + *T + "::Optional", true);
+        bool const KeepCompressed = _config->FindB(std::string("Acquire::IndexTargets::") + Type + "::" + *T + "::KeepCompressed", GzipIndex);
 #undef APT_T_CONFIG
         if (tplMetaKey.empty())
            continue;
@@ -721,7 +718,7 @@ class APT_HIDDEN debSLTypeDebian : public pkgSourceList::Type               /*{{{*/
       Deb->AddComponent(
            IsSrc,
            Section,
-           parsePlusMinusOptions("target", Options, _config->FindVector(std::string("APT::Acquire::Targets::") + Name, "", true)),
+           parsePlusMinusOptions("target", Options, _config->FindVector(std::string("Acquire::IndexTargets::") + Name, "", true)),
            parsePlusMinusOptions("arch", Options, APT::Configuration::getArchitectures()),
            parsePlusMinusOptions("lang", Options, APT::Configuration::getLanguages(true))
            );
@@ -785,34 +782,5 @@ class APT_HIDDEN debSLTypeDebSrc : public debSLTypeDebian          /*{{{*/
 };
                                                                        /*}}}*/
 
-debDebFileMetaIndex::debDebFileMetaIndex(std::string const &DebFile)   /*{{{*/
-   : metaIndex(DebFile, "local-uri", "deb-dist"), d(NULL), DebFile(DebFile)
-{
-   DebIndex = new debDebPkgFileIndex(DebFile);
-   Indexes = new std::vector<pkgIndexFile *>();
-   Indexes->push_back(DebIndex);
-}
-debDebFileMetaIndex::~debDebFileMetaIndex() {}
-                                                                       /*}}}*/
-class APT_HIDDEN debSLTypeDebFile : public pkgSourceList::Type         /*{{{*/
-{
-   public:
-
-   bool CreateItem(std::vector<metaIndex *> &List, std::string const &URI,
-                  std::string const &/*Dist*/, std::string const &/*Section*/,
-                  std::map<std::string, std::string> const &/*Options*/) const APT_OVERRIDE
-   {
-      metaIndex *mi = new debDebFileMetaIndex(URI);
-      List.push_back(mi);
-      return true;
-   }
-
-   debSLTypeDebFile() : Type("deb-file", "Debian local deb file")
-   {
-   }
-};
-                                                                       /*}}}*/
-
 APT_HIDDEN debSLTypeDeb _apt_DebType;
 APT_HIDDEN debSLTypeDebSrc _apt_DebSrcType;
-APT_HIDDEN debSLTypeDebFile _apt_DebFileType;