]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/deb/deblistparser.cc
merged from apt-get-changelog
[apt.git] / apt-pkg / deb / deblistparser.cc
index 2cfeb23e9fc647ad9f0df241320a72f9f4a5e42d..1b3bfd6ae492c77deff4ea208403d3081f9e4f90 100644 (file)
@@ -481,6 +481,7 @@ const char *debListParser::ConvertRelation(const char *I,unsigned int &Op)
  */
 static string CompleteArch(std::string& arch) {
     if (arch == "armel")              return "linux-arm";
+    if (arch == "armhf")              return "linux-arm";
     if (arch == "lpia")               return "linux-i386";
     if (arch == "powerpcspe")         return "linux-powerpc";
     if (arch == "uclibc-linux-armel") return "linux-arm";
@@ -757,7 +758,7 @@ bool debListParser::Step()
       if (Architecture.empty() == true)
         return true;
 
-      if (Arch.empty() == true || MultiArchEnabled == false)
+      if (Arch.empty() == true || Arch == "any" || MultiArchEnabled == false)
       {
         if (APT::Configuration::checkArchitecture(Architecture) == true)
            return true;
@@ -815,6 +816,12 @@ bool debListParser::LoadReleaseInfo(pkgCache::PkgFileIterator &FileI,
    if (Section.FindFlag("NotAutomatic",FileI->Flags,
                        pkgCache::Flag::NotAutomatic) == false)
       _error->Warning("Bad NotAutomatic flag");
+   if (Section.FindFlag("ButAutomaticUpgrades",FileI->Flags,
+                       pkgCache::Flag::ButAutomaticUpgrades) == false)
+      _error->Warning("Bad ButAutomaticUpgrades flag");
+   // overrule the NotAutomatic setting if needed as they are both present for compatibility
+   else if ((FileI->Flags & pkgCache::Flag::ButAutomaticUpgrades) == pkgCache::Flag::ButAutomaticUpgrades)
+      FileI->Flags &= ~pkgCache::Flag::NotAutomatic;
 
    return !_error->PendingError();
 }