]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/deb/deblistparser.cc
try xz instead of bz2 first for compressed files
[apt.git] / apt-pkg / deb / deblistparser.cc
index c7c4ffe773ca6764897dc32a10bd04966f391080..d88e25e6fbd10d469528d0012e446f977e9d77a6 100644 (file)
 #include <apt-pkg/cachefilter.h>
 #include <apt-pkg/aptconfiguration.h>
 #include <apt-pkg/strutl.h>
-#include <apt-pkg/fileutl.h>
 #include <apt-pkg/crc-16.h>
 #include <apt-pkg/md5.h>
-#include <apt-pkg/mmap.h>
 #include <apt-pkg/pkgcache.h>
 #include <apt-pkg/cacheiterators.h>
 #include <apt-pkg/tagfile.h>
@@ -69,7 +67,8 @@ string debListParser::Package() {
 // ---------------------------------------------------------------------
 /* This will return the Architecture of the package this section describes */
 string debListParser::Architecture() {
-   return Section.FindS("Architecture");
+   std::string const Arch = Section.FindS("Architecture");
+   return Arch.empty() ? "none" : Arch;
 }
                                                                        /*}}}*/
 // ListParser::ArchitectureAll                                         /*{{{*/
@@ -94,14 +93,14 @@ unsigned char debListParser::ParseMultiArch(bool const showErrors)  /*{{{*/
    unsigned char MA;
    string const MultiArch = Section.FindS("Multi-Arch");
    if (MultiArch.empty() == true || MultiArch == "no")
-      MA = pkgCache::Version::None;
+      MA = pkgCache::Version::No;
    else if (MultiArch == "same") {
       if (ArchitectureAll() == true)
       {
         if (showErrors == true)
            _error->Warning("Architecture: all package '%s' can't be Multi-Arch: same",
                  Section.FindS("Package").c_str());
-        MA = pkgCache::Version::None;
+        MA = pkgCache::Version::No;
       }
       else
         MA = pkgCache::Version::Same;
@@ -115,7 +114,7 @@ unsigned char debListParser::ParseMultiArch(bool const showErrors)  /*{{{*/
       if (showErrors == true)
         _error->Warning("Unknown Multi-Arch type '%s' for package '%s'",
               MultiArch.c_str(), Section.FindS("Package").c_str());
-      MA = pkgCache::Version::None;
+      MA = pkgCache::Version::No;
    }
 
    if (ArchitectureAll() == true)
@@ -363,7 +362,7 @@ unsigned short debListParser::VersionHash()
    return Result;
 }
                                                                        /*}}}*/
-// ListParser::ParseStatus - Parse the status field                    /*{{{*/
+// StatusListParser::ParseStatus - Parse the status field              /*{{{*/
 // ---------------------------------------------------------------------
 /* Status lines are of the form,
      Status: want flag status
@@ -374,6 +373,11 @@ unsigned short debListParser::VersionHash()
  */
 bool debListParser::ParseStatus(pkgCache::PkgIterator &Pkg,
                                pkgCache::VerIterator &Ver)
+{
+   return true;
+}
+bool debStatusListParser::ParseStatus(pkgCache::PkgIterator &Pkg,
+                               pkgCache::VerIterator &Ver)
 {
    const char *Start;
    const char *Stop;