]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/deb/deblistparser.cc
releasing version 0.8.16~exp7
[apt.git] / apt-pkg / deb / deblistparser.cc
index e4f3f95826baadabe7609fa6ca07af03d8f7b95b..a36857cb5cba7e695557cd781b5ced6e280879ff 100644 (file)
    ##################################################################### */
                                                                        /*}}}*/
 // Include Files                                                       /*{{{*/
+#include <config.h>
+
 #include <apt-pkg/deblistparser.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/configuration.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/macros.h>
@@ -23,6 +26,8 @@
 #include <ctype.h>
                                                                        /*}}}*/
 
+using std::string;
+
 static debListParser::WordList PrioList[] = {{"important",pkgCache::State::Important},
                        {"required",pkgCache::State::Required},
                        {"standard",pkgCache::State::Standard},
@@ -69,10 +74,7 @@ string debListParser::Package() {
 // ---------------------------------------------------------------------
 /* This will return the Architecture of the package this section describes */
 string debListParser::Architecture() {
-   std::string const Arch = Section.FindS("Architecture");
-   if (Arch.empty() == true)
-      return _config->Find("APT::Architecture");
-   return Arch;
+   return Section.FindS("Architecture");
 }
                                                                        /*}}}*/
 // ListParser::ArchitectureAll                                         /*{{{*/
@@ -198,7 +200,7 @@ string debListParser::DescriptionLanguage()
 
    std::vector<string> const lang = APT::Configuration::getLanguages(true);
    for (std::vector<string>::const_iterator l = lang.begin();
-       l != lang.end(); l++)
+       l != lang.end(); ++l)
       if (Section.FindS(string("Description-").append(*l).c_str()).empty() == false)
         return *l;