Michael Vogt лет назад: 15
Родитель
Сommit
194fac6be9
82 измененных файлов с 23460 добавлено и 18445 удалено
  1. 2 0
      apt-pkg/acquire.h
  2. 1 1
      apt-pkg/aptconfiguration.cc
  3. 13 0
      apt-pkg/contrib/configuration.cc
  4. 1 0
      apt-pkg/contrib/configuration.h
  5. 2 3
      apt-pkg/contrib/sha1.cc
  6. 25 8
      apt-pkg/deb/deblistparser.cc
  7. 1 1
      apt-pkg/depcache.cc
  8. 40 36
      apt-pkg/init.cc
  9. 19 3
      apt-pkg/pkgcachegen.cc
  10. 16 2
      apt-pkg/policy.cc
  11. 205 106
      cmdline/apt-get.cc
  12. 4 1
      cmdline/apt-key
  13. 5 0
      debian/apt.postinst
  14. 0 1
      debian/apt.symbols
  15. 80 11
      debian/changelog
  16. 0 3
      debian/rules
  17. 1 1
      doc/apt-cache.8.xml
  18. 24 3
      doc/apt-get.8.xml
  19. 9 1
      doc/apt.conf.5.xml
  20. 2 0
      doc/examples/configure-index
  21. 1 1
      doc/po/apt-doc.pot
  22. 2 2
      doc/po/de.po
  23. 1 1
      doc/po/es.po
  24. 1 1
      doc/po/fr.po
  25. 1 1
      doc/po/it.po
  26. 2 2
      doc/po/ja.po
  27. 2 2
      doc/po/pl.po
  28. 2 2
      doc/po/pt.po
  29. 4 1
      doc/po/pt_BR.po
  30. 17 1
      doc/sources.list.5.xml
  31. 137 104
      po/apt-all.pot
  32. 519 416
      po/ar.po
  33. 533 420
      po/ast.po
  34. 535 421
      po/bg.po
  35. 515 415
      po/bs.po
  36. 620 631
      po/ca.po
  37. 529 420
      po/cs.po
  38. 527 420
      po/cy.po
  39. 531 420
      po/da.po
  40. 533 420
      po/de.po
  41. 523 420
      po/dz.po
  42. 524 419
      po/el.po
  43. 534 420
      po/es.po
  44. 524 419
      po/eu.po
  45. 524 419
      po/fi.po
  46. 536 420
      po/fr.po
  47. 596 559
      po/gl.po
  48. 526 419
      po/hu.po
  49. 597 562
      po/it.po
  50. 534 421
      po/ja.po
  51. 521 418
      po/km.po
  52. 533 420
      po/ko.po
  53. 515 415
      po/ku.po
  54. 521 419
      po/lt.po
  55. 521 418
      po/mr.po
  56. 530 421
      po/nb.po
  57. 521 418
      po/ne.po
  58. 526 419
      po/nl.po
  59. 522 419
      po/nn.po
  60. 526 419
      po/pl.po
  61. 533 420
      po/pt.po
  62. 526 419
      po/pt_BR.po
  63. 526 419
      po/ro.po
  64. 534 420
      po/ru.po
  65. 529 420
      po/sk.po
  66. 545 454
      po/sl.po
  67. 533 420
      po/sv.po
  68. 521 418
      po/th.po
  69. 526 419
      po/tl.po
  70. 524 419
      po/uk.po
  71. 529 420
      po/vi.po
  72. 528 422
      po/zh_CN.po
  73. 527 420
      po/zh_TW.po
  74. 48 3
      test/integration/framework
  75. 47 0
      test/integration/test-bug-407511-fail-invalid-default-release
  76. 183 0
      test/integration/test-bug-632221-cross-dependency-satisfaction
  77. 27 0
      test/integration/test-bug-633350-do-not-kill-last-char-in-Release
  78. 31 0
      test/integration/test-ubuntu-bug-784473-InRelease-one-message-only
  79. 81 0
      test/integration/test-ubuntu-bug-806274-install-suggests
  80. 38 4
      test/libapt/assert.h
  81. 6 0
      test/libapt/getarchitectures_test.cc
  82. 2 2
      test/libapt/getlanguages_test.cc

+ 2 - 0
apt-pkg/acquire.h

@@ -348,6 +348,8 @@ class pkgAcquire
     */
     */
    bool Setup(pkgAcquireStatus *Progress = NULL, string const &Lock = "");
    bool Setup(pkgAcquireStatus *Progress = NULL, string const &Lock = "");
 
 
+   void SetLog(pkgAcquireStatus *Progress) { Log = Progress; }
+
    /** \brief Construct a new pkgAcquire. */
    /** \brief Construct a new pkgAcquire. */
    pkgAcquire(pkgAcquireStatus *Log) __deprecated;
    pkgAcquire(pkgAcquireStatus *Log) __deprecated;
    pkgAcquire();
    pkgAcquire();

+ 1 - 1
apt-pkg/aptconfiguration.cc

@@ -352,7 +352,7 @@ std::vector<std::string> const Configuration::getArchitectures(bool const &Cache
 
 
 	if (archs.empty() == true ||
 	if (archs.empty() == true ||
 	    std::find(archs.begin(), archs.end(), arch) == archs.end())
 	    std::find(archs.begin(), archs.end(), arch) == archs.end())
-		archs.push_back(arch);
+		archs.insert(archs.begin(), arch);
 
 
 	// erase duplicates and empty strings
 	// erase duplicates and empty strings
 	for (std::vector<string>::reverse_iterator a = archs.rbegin();
 	for (std::vector<string>::reverse_iterator a = archs.rbegin();

+ 13 - 0
apt-pkg/contrib/configuration.cc

@@ -318,6 +318,19 @@ void Configuration::CndSet(const char *Name,const string &Value)
       Itm->Value = Value;
       Itm->Value = Value;
 }
 }
 									/*}}}*/
 									/*}}}*/
+// Configuration::Set - Set an integer value				/*{{{*/
+// ---------------------------------------------------------------------
+/* */
+void Configuration::CndSet(const char *Name,int const Value)
+{
+   Item *Itm = Lookup(Name,true);
+   if (Itm == 0 || Itm->Value.empty() == false)
+      return;
+   char S[300];
+   snprintf(S,sizeof(S),"%i",Value);
+   Itm->Value = S;
+}
+									/*}}}*/
 // Configuration::Set - Set a value					/*{{{*/
 // Configuration::Set - Set a value					/*{{{*/
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* */
 /* */

+ 1 - 0
apt-pkg/contrib/configuration.h

@@ -82,6 +82,7 @@ class Configuration
 	      
 	      
    inline void Set(const string &Name,const string &Value) {Set(Name.c_str(),Value);};
    inline void Set(const string &Name,const string &Value) {Set(Name.c_str(),Value);};
    void CndSet(const char *Name,const string &Value);
    void CndSet(const char *Name,const string &Value);
+   void CndSet(const char *Name,const int Value);
    void Set(const char *Name,const string &Value);
    void Set(const char *Name,const string &Value);
    void Set(const char *Name,const int &Value);
    void Set(const char *Name,const int &Value);
    
    

+ 2 - 3
apt-pkg/contrib/sha1.cc

@@ -74,10 +74,9 @@ static void SHA1Transform(uint32_t state[5],uint8_t const buffer[64])
       uint32_t l[16];
       uint32_t l[16];
    }
    }
    CHAR64LONG16;
    CHAR64LONG16;
-   CHAR64LONG16 *block;
+   CHAR64LONG16 workspace, *block;
 
 
-   uint8_t workspace[64];
-   block = (CHAR64LONG16 *)workspace;
+   block = &workspace;
    memcpy(block,buffer,sizeof(workspace));
    memcpy(block,buffer,sizeof(workspace));
 
 
    /* Copy context->state[] to working vars */
    /* Copy context->state[] to working vars */

+ 25 - 8
apt-pkg/deb/deblistparser.cc

@@ -461,7 +461,7 @@ const char *debListParser::ConvertRelation(const char *I,unsigned int &Op)
  *
  *
  * The complete architecture, consisting of <kernel>-<cpu>.
  * The complete architecture, consisting of <kernel>-<cpu>.
  */
  */
-static string CompleteArch(std::string& arch) {
+static string CompleteArch(std::string const &arch) {
     if (arch == "armel")              return "linux-arm";
     if (arch == "armel")              return "linux-arm";
     if (arch == "armhf")              return "linux-arm";
     if (arch == "armhf")              return "linux-arm";
     if (arch == "lpia")               return "linux-i386";
     if (arch == "lpia")               return "linux-i386";
@@ -500,9 +500,13 @@ const char *debListParser::ParseDepends(const char *Start,const char *Stop,
    Package.assign(Start,I - Start);
    Package.assign(Start,I - Start);
 
 
    // We don't want to confuse library users which can't handle MultiArch
    // We don't want to confuse library users which can't handle MultiArch
+   string const arch = _config->Find("APT::Architecture");
    if (StripMultiArch == true) {
    if (StripMultiArch == true) {
       size_t const found = Package.rfind(':');
       size_t const found = Package.rfind(':');
-      if (found != string::npos)
+      if (found != string::npos &&
+	  (strcmp(Package.c_str() + found, ":any") == 0 ||
+	   strcmp(Package.c_str() + found, ":native") == 0 ||
+	   strcmp(Package.c_str() + found + 1, arch.c_str()) == 0))
 	 Package = Package.substr(0,found);
 	 Package = Package.substr(0,found);
    }
    }
 
 
@@ -543,7 +547,6 @@ const char *debListParser::ParseDepends(const char *Start,const char *Stop,
 
 
    if (ParseArchFlags == true)
    if (ParseArchFlags == true)
    {
    {
-      string arch = _config->Find("APT::Architecture");
       string completeArch = CompleteArch(arch);
       string completeArch = CompleteArch(arch);
 
 
       // Parse an architecture
       // Parse an architecture
@@ -781,7 +784,9 @@ bool debListParser::LoadReleaseInfo(pkgCache::PkgFileIterator &FileI,
       size_t len = 0;
       size_t len = 0;
 
 
       // Skip empty lines
       // Skip empty lines
-      for (; buffer[len] == '\r' && buffer[len] == '\n'; ++len);
+      for (; buffer[len] == '\r' && buffer[len] == '\n'; ++len)
+         /* nothing */
+         ;
       if (buffer[len] == '\0')
       if (buffer[len] == '\0')
 	 continue;
 	 continue;
 
 
@@ -795,13 +800,25 @@ bool debListParser::LoadReleaseInfo(pkgCache::PkgFileIterator &FileI,
       }
       }
 
 
       // seperate the tag from the data
       // seperate the tag from the data
-      for (; buffer[len] != ':' && buffer[len] != '\0'; ++len);
+      for (; buffer[len] != ':' && buffer[len] != '\0'; ++len)
+         /* nothing */
+         ;
       if (buffer[len] == '\0')
       if (buffer[len] == '\0')
 	 continue;
 	 continue;
       char* dataStart = buffer + len;
       char* dataStart = buffer + len;
-      for (++dataStart; *dataStart == ' '; ++dataStart);
+      for (++dataStart; *dataStart == ' '; ++dataStart)
+         /* nothing */
+         ;
       char* dataEnd = dataStart;
       char* dataEnd = dataStart;
-      for (++dataEnd; *dataEnd != '\0'; ++dataEnd);
+      for (++dataEnd; *dataEnd != '\0'; ++dataEnd)
+         /* nothing */
+         ;
+      // The last char should be a newline, but we can never be sure: #633350
+      char* lineEnd = dataEnd;
+      for (--lineEnd; *lineEnd == '\r' || *lineEnd == '\n'; --lineEnd)
+         /* nothing */
+         ;
+      ++lineEnd;
 
 
       // which datastorage need to be updated
       // which datastorage need to be updated
       map_ptrloc* writeTo = NULL;
       map_ptrloc* writeTo = NULL;
@@ -816,7 +833,7 @@ bool debListParser::LoadReleaseInfo(pkgCache::PkgFileIterator &FileI,
       APT_PARSER_WRITETO(FileI->Label, "Label")
       APT_PARSER_WRITETO(FileI->Label, "Label")
       #undef APT_PARSER_WRITETO
       #undef APT_PARSER_WRITETO
       #define APT_PARSER_FLAGIT(X) else if (strncmp(#X, buffer, len) == 0) \
       #define APT_PARSER_FLAGIT(X) else if (strncmp(#X, buffer, len) == 0) \
-	 pkgTagSection::FindFlag(FileI->Flags, pkgCache::Flag:: X, dataStart, dataEnd-1);
+	 pkgTagSection::FindFlag(FileI->Flags, pkgCache::Flag:: X, dataStart, lineEnd);
       APT_PARSER_FLAGIT(NotAutomatic)
       APT_PARSER_FLAGIT(NotAutomatic)
       APT_PARSER_FLAGIT(ButAutomaticUpgrades)
       APT_PARSER_FLAGIT(ButAutomaticUpgrades)
       #undef APT_PARSER_FLAGIT
       #undef APT_PARSER_FLAGIT

+ 1 - 1
apt-pkg/depcache.cc

@@ -1593,7 +1593,7 @@ bool pkgDepCache::MarkFollowsRecommends()
 
 
 bool pkgDepCache::MarkFollowsSuggests()
 bool pkgDepCache::MarkFollowsSuggests()
 {
 {
-  return _config->FindB("APT::AutoRemove::SuggestsImportant", false);
+  return _config->FindB("APT::AutoRemove::SuggestsImportant", true);
 }
 }
 
 
 // pkgDepCache::MarkRequired - the main mark algorithm			/*{{{*/
 // pkgDepCache::MarkRequired - the main mark algorithm			/*{{{*/

+ 40 - 36
apt-pkg/init.cc

@@ -33,60 +33,64 @@ const char *pkgLibVersion = Stringfy(APT_PKG_MAJOR) "."
 bool pkgInitConfig(Configuration &Cnf)
 bool pkgInitConfig(Configuration &Cnf)
 {
 {
    // General APT things
    // General APT things
-   Cnf.Set("APT::Architecture", COMMON_ARCH);
-   Cnf.Set("APT::Build-Essential::", "build-essential");
-   Cnf.Set("APT::Install-Recommends", true);
-   Cnf.Set("APT::Install-Suggests", false);
-   Cnf.Set("Dir","/");
+   Cnf.CndSet("APT::Architecture", COMMON_ARCH);
+   if (Cnf.Exists("APT::Build-Essential") == false)
+      Cnf.Set("APT::Build-Essential::", "build-essential");
+   Cnf.CndSet("APT::Install-Recommends", true);
+   Cnf.CndSet("APT::Install-Suggests", false);
+   Cnf.CndSet("Dir","/");
    
    
    // State   
    // State   
-   Cnf.Set("Dir::State","var/lib/apt/");
+   Cnf.CndSet("Dir::State","var/lib/apt/");
    
    
    /* Just in case something goes horribly wrong, we can fall back to the
    /* Just in case something goes horribly wrong, we can fall back to the
       old /var/state paths.. */
       old /var/state paths.. */
    struct stat St;   
    struct stat St;   
    if (stat("/var/lib/apt/.",&St) != 0 &&
    if (stat("/var/lib/apt/.",&St) != 0 &&
        stat("/var/state/apt/.",&St) == 0)
        stat("/var/state/apt/.",&St) == 0)
-      Cnf.Set("Dir::State","var/state/apt/");
+      Cnf.CndSet("Dir::State","var/state/apt/");
        
        
-   Cnf.Set("Dir::State::lists","lists/");
-   Cnf.Set("Dir::State::cdroms","cdroms.list");
-   Cnf.Set("Dir::State::mirrors","mirrors/");
+   Cnf.CndSet("Dir::State::lists","lists/");
+   Cnf.CndSet("Dir::State::cdroms","cdroms.list");
+   Cnf.CndSet("Dir::State::mirrors","mirrors/");
 
 
    // Cache
    // Cache
-   Cnf.Set("Dir::Cache","var/cache/apt/");
-   Cnf.Set("Dir::Cache::archives","archives/");
-   Cnf.Set("Dir::Cache::srcpkgcache","srcpkgcache.bin");
-   Cnf.Set("Dir::Cache::pkgcache","pkgcache.bin");
+   Cnf.CndSet("Dir::Cache","var/cache/apt/");
+   Cnf.CndSet("Dir::Cache::archives","archives/");
+   Cnf.CndSet("Dir::Cache::srcpkgcache","srcpkgcache.bin");
+   Cnf.CndSet("Dir::Cache::pkgcache","pkgcache.bin");
    
    
    // Configuration
    // Configuration
-   Cnf.Set("Dir::Etc","etc/apt/");
-   Cnf.Set("Dir::Etc::sourcelist","sources.list");
-   Cnf.Set("Dir::Etc::sourceparts","sources.list.d");
-   Cnf.Set("Dir::Etc::vendorlist","vendors.list");
-   Cnf.Set("Dir::Etc::vendorparts","vendors.list.d");
-   Cnf.Set("Dir::Etc::main","apt.conf");
-   Cnf.Set("Dir::Etc::netrc", "auth.conf");
-   Cnf.Set("Dir::Etc::parts","apt.conf.d");
-   Cnf.Set("Dir::Etc::preferences","preferences");
-   Cnf.Set("Dir::Etc::preferencesparts","preferences.d");
-   Cnf.Set("Dir::Etc::trusted", "trusted.gpg");
-   Cnf.Set("Dir::Etc::trustedparts","trusted.gpg.d");
-   Cnf.Set("Dir::Bin::methods","/usr/lib/apt/methods");
-   Cnf.Set("Dir::Media::MountPath","/media/apt");
+   Cnf.CndSet("Dir::Etc","etc/apt/");
+   Cnf.CndSet("Dir::Etc::sourcelist","sources.list");
+   Cnf.CndSet("Dir::Etc::sourceparts","sources.list.d");
+   Cnf.CndSet("Dir::Etc::vendorlist","vendors.list");
+   Cnf.CndSet("Dir::Etc::vendorparts","vendors.list.d");
+   Cnf.CndSet("Dir::Etc::main","apt.conf");
+   Cnf.CndSet("Dir::Etc::netrc", "auth.conf");
+   Cnf.CndSet("Dir::Etc::parts","apt.conf.d");
+   Cnf.CndSet("Dir::Etc::preferences","preferences");
+   Cnf.CndSet("Dir::Etc::preferencesparts","preferences.d");
+   Cnf.CndSet("Dir::Etc::trusted", "trusted.gpg");
+   Cnf.CndSet("Dir::Etc::trustedparts","trusted.gpg.d");
+   Cnf.CndSet("Dir::Bin::methods","/usr/lib/apt/methods");
+   Cnf.CndSet("Dir::Media::MountPath","/media/apt");
 
 
    // State   
    // State   
-   Cnf.Set("Dir::Log","var/log/apt");
-   Cnf.Set("Dir::Log::Terminal","term.log");
-   Cnf.Set("Dir::Log::History","history.log");
+   Cnf.CndSet("Dir::Log","var/log/apt");
+   Cnf.CndSet("Dir::Log::Terminal","term.log");
+   Cnf.CndSet("Dir::Log::History","history.log");
 
 
-   Cnf.Set("Dir::Ignore-Files-Silently::", "~$");
-   Cnf.Set("Dir::Ignore-Files-Silently::", "\\.disabled$");
-   Cnf.Set("Dir::Ignore-Files-Silently::", "\\.bak$");
-   Cnf.Set("Dir::Ignore-Files-Silently::", "\\.dpkg-[a-z]+$");
+   if (Cnf.Exists("Dir::Ignore-Files-Silently") == false)
+   {
+      Cnf.Set("Dir::Ignore-Files-Silently::", "~$");
+      Cnf.Set("Dir::Ignore-Files-Silently::", "\\.disabled$");
+      Cnf.Set("Dir::Ignore-Files-Silently::", "\\.bak$");
+      Cnf.Set("Dir::Ignore-Files-Silently::", "\\.dpkg-[a-z]+$");
+   }
 
 
    // Default cdrom mount point
    // Default cdrom mount point
-   Cnf.Set("Acquire::cdrom::mount", "/media/cdrom/");
+   Cnf.CndSet("Acquire::cdrom::mount", "/media/cdrom/");
 
 
    bool Res = true;
    bool Res = true;
    
    

+ 19 - 3
apt-pkg/pkgcachegen.cc

@@ -1182,16 +1182,32 @@ bool pkgCacheGenerator::MakeStatusCache(pkgSourceList &List,OpProgress *Progress
    SPtr<DynamicMMap> Map;
    SPtr<DynamicMMap> Map;
    if (Writeable == true && CacheFile.empty() == false)
    if (Writeable == true && CacheFile.empty() == false)
    {
    {
+      _error->PushToStack();
       unlink(CacheFile.c_str());
       unlink(CacheFile.c_str());
       CacheF = new FileFd(CacheFile,FileFd::WriteAtomic);
       CacheF = new FileFd(CacheFile,FileFd::WriteAtomic);
       fchmod(CacheF->Fd(),0644);
       fchmod(CacheF->Fd(),0644);
       Map = CreateDynamicMMap(CacheF, MMap::Public);
       Map = CreateDynamicMMap(CacheF, MMap::Public);
       if (_error->PendingError() == true)
       if (_error->PendingError() == true)
-	 return false;
-      if (Debug == true)
+      {
+	 delete CacheF.UnGuard();
+	 delete Map.UnGuard();
+	 if (Debug == true)
+	    std::clog << "Open filebased MMap FAILED" << std::endl;
+	 Writeable = false;
+	 if (AllowMem == false)
+	 {
+	    _error->MergeWithStack();
+	    return false;
+	 }
+	 _error->RevertToStack();
+      }
+      else if (Debug == true)
+      {
+	 _error->MergeWithStack();
 	 std::clog << "Open filebased MMap" << std::endl;
 	 std::clog << "Open filebased MMap" << std::endl;
+      }
    }
    }
-   else
+   if (Writeable == false || CacheFile.empty() == true)
    {
    {
       // Just build it in memory..
       // Just build it in memory..
       Map = CreateDynamicMMap(NULL);
       Map = CreateDynamicMMap(NULL);

+ 16 - 2
apt-pkg/policy.cc

@@ -56,8 +56,22 @@ pkgPolicy::pkgPolicy(pkgCache *Owner) : Pins(0), PFPriority(0), Cache(Owner)
    // The config file has a master override.
    // The config file has a master override.
    string DefRel = _config->Find("APT::Default-Release");
    string DefRel = _config->Find("APT::Default-Release");
    if (DefRel.empty() == false)
    if (DefRel.empty() == false)
-      CreatePin(pkgVersionMatch::Release,"",DefRel,990);
-      
+   {
+      bool found = false;
+      // FIXME: make ExpressionMatches static to use it here easily
+      pkgVersionMatch vm("", pkgVersionMatch::None);
+      for (pkgCache::PkgFileIterator F = Cache->FileBegin(); F != Cache->FileEnd(); ++F)
+      {
+	 if ((F->Archive != 0 && vm.ExpressionMatches(DefRel, F.Archive()) == true) ||
+	     (F->Codename != 0 && vm.ExpressionMatches(DefRel, F.Codename()) == true) ||
+	     (F->Version != 0 && vm.ExpressionMatches(DefRel, F.Version()) == true))
+	    found = true;
+      }
+      if (found == false)
+	 _error->Error(_("The value '%s' is invalid for APT::Default-Release as such a release is not available in the sources"), DefRel.c_str());
+      else
+	 CreatePin(pkgVersionMatch::Release,"",DefRel,990);
+   }
    InitDefaults();
    InitDefaults();
 }
 }
 									/*}}}*/
 									/*}}}*/

+ 205 - 106
cmdline/apt-get.cc

@@ -1388,6 +1388,14 @@ bool TryToInstallBuildDep(pkgCache::PkgIterator Pkg,pkgCacheFile &Cache,
 	 return AllowFail;
 	 return AllowFail;
    }
    }
 
 
+   if (_config->FindB("Debug::BuildDeps",false) == true)
+   {
+      if (Remove == true)
+	 cout << "  Trying to remove " << Pkg << endl;
+      else
+	 cout << "  Trying to install " << Pkg << endl;
+   }
+
    if (Remove == true)
    if (Remove == true)
    {
    {
       TryToRemove RemoveAction(Cache, &Fix);
       TryToRemove RemoveAction(Cache, &Fix);
@@ -1697,7 +1705,7 @@ bool DoAutomaticRemove(CacheFile &Cache)
 
 
    // we could have removed a new dependency of a garbage package,
    // we could have removed a new dependency of a garbage package,
    // so check if a reverse depends is broken and if so install it again.
    // so check if a reverse depends is broken and if so install it again.
-   if (tooMuch.empty() == false && Cache->BrokenCount() != 0)
+   if (tooMuch.empty() == false && (Cache->BrokenCount() != 0 || Cache->PolicyBrokenCount() != 0))
    {
    {
       bool Changed;
       bool Changed;
       do {
       do {
@@ -1708,8 +1716,8 @@ bool DoAutomaticRemove(CacheFile &Cache)
 	    for (pkgCache::DepIterator R = P.RevDependsList();
 	    for (pkgCache::DepIterator R = P.RevDependsList();
 		 R.end() == false; ++R)
 		 R.end() == false; ++R)
 	    {
 	    {
-	       if (R->Type != pkgCache::Dep::Depends &&
-		   R->Type != pkgCache::Dep::PreDepends)
+	       if (R.IsNegative() == true ||
+		   Cache->IsImportantDep(R) == false)
 		  continue;
 		  continue;
 	       pkgCache::PkgIterator N = R.ParentPkg();
 	       pkgCache::PkgIterator N = R.ParentPkg();
 	       if (N.end() == true || (N->CurrentVer == 0 && (*Cache)[N].Install() == false))
 	       if (N.end() == true || (N->CurrentVer == 0 && (*Cache)[N].Install() == false))
@@ -2366,8 +2374,7 @@ bool DoSource(CommandLine &CmdL)
    // Create the download object
    // Create the download object
    AcqTextStatus Stat(ScreenWidth,_config->FindI("quiet",0));   
    AcqTextStatus Stat(ScreenWidth,_config->FindI("quiet",0));   
    pkgAcquire Fetcher;
    pkgAcquire Fetcher;
-   if (Fetcher.Setup(&Stat) == false)
-      return false;
+   Fetcher.SetLog(&Stat);
 
 
    DscFile *Dsc = new DscFile[CmdL.FileSize()];
    DscFile *Dsc = new DscFile[CmdL.FileSize()];
    
    
@@ -2613,12 +2620,17 @@ bool DoSource(CommandLine &CmdL)
 	 // Try to compile it with dpkg-buildpackage
 	 // Try to compile it with dpkg-buildpackage
 	 if (_config->FindB("APT::Get::Compile",false) == true)
 	 if (_config->FindB("APT::Get::Compile",false) == true)
 	 {
 	 {
+	    string buildopts = _config->Find("APT::Get::Host-Architecture");
+	    if (buildopts.empty() == false)
+	       buildopts = "-a " + buildopts + " ";
+	    buildopts.append(_config->Find("DPkg::Build-Options","-b -uc"));
+
 	    // Call dpkg-buildpackage
 	    // Call dpkg-buildpackage
 	    char S[500];
 	    char S[500];
 	    snprintf(S,sizeof(S),"cd %s && %s %s",
 	    snprintf(S,sizeof(S),"cd %s && %s %s",
 		     Dir.c_str(),
 		     Dir.c_str(),
 		     _config->Find("Dir::Bin::dpkg-buildpackage","dpkg-buildpackage").c_str(),
 		     _config->Find("Dir::Bin::dpkg-buildpackage","dpkg-buildpackage").c_str(),
-		     _config->Find("DPkg::Build-Options","-b -uc").c_str());
+		     buildopts.c_str());
 	    
 	    
 	    if (system(S) != 0)
 	    if (system(S) != 0)
 	    {
 	    {
@@ -2680,8 +2692,19 @@ bool DoBuildDep(CommandLine &CmdL)
    if (Fetcher.Setup(&Stat) == false)
    if (Fetcher.Setup(&Stat) == false)
       return false;
       return false;
 
 
+   bool StripMultiArch;
+   string hostArch = _config->Find("APT::Get::Host-Architecture");
+   if (hostArch.empty() == false)
+   {
+      std::vector<std::string> archs = APT::Configuration::getArchitectures();
+      if (std::find(archs.begin(), archs.end(), hostArch) == archs.end())
+	 return _error->Error(_("No architecture information available for %s. See apt.conf(5) APT::Architectures for setup"), hostArch.c_str());
+      StripMultiArch = false;
+   }
+   else
+      StripMultiArch = true;
+
    unsigned J = 0;
    unsigned J = 0;
-   bool const StripMultiArch = APT::Configuration::getArchitectures().size() <= 1;
    for (const char **I = CmdL.FileList + 1; *I != 0; I++, J++)
    for (const char **I = CmdL.FileList + 1; *I != 0; I++, J++)
    {
    {
       string Src;
       string Src;
@@ -2715,7 +2738,7 @@ bool DoBuildDep(CommandLine &CmdL)
 	 ioprintf(c1out,_("%s has no build depends.\n"),Src.c_str());
 	 ioprintf(c1out,_("%s has no build depends.\n"),Src.c_str());
 	 continue;
 	 continue;
       }
       }
-      
+
       // Install the requested packages
       // Install the requested packages
       vector <pkgSrcRecords::Parser::BuildDepRec>::iterator D;
       vector <pkgSrcRecords::Parser::BuildDepRec>::iterator D;
       pkgProblemResolver Fix(Cache);
       pkgProblemResolver Fix(Cache);
@@ -2726,6 +2749,16 @@ bool DoBuildDep(CommandLine &CmdL)
 
 
          if (skipAlternatives == true)
          if (skipAlternatives == true)
          {
          {
+            /*
+             * if there are alternatives, we've already picked one, so skip
+             * the rest
+             *
+             * TODO: this means that if there's a build-dep on A|B and B is
+             * installed, we'll still try to install A; more importantly,
+             * if A is currently broken, we cannot go back and try B. To fix 
+             * this would require we do a Resolve cycle for each package we 
+             * add to the install list. Ugh
+             */
             if (!hasAlternatives)
             if (!hasAlternatives)
                skipAlternatives = false; // end of or group
                skipAlternatives = false; // end of or group
             continue;
             continue;
@@ -2734,27 +2767,117 @@ bool DoBuildDep(CommandLine &CmdL)
          if ((*D).Type == pkgSrcRecords::Parser::BuildConflict ||
          if ((*D).Type == pkgSrcRecords::Parser::BuildConflict ||
 	     (*D).Type == pkgSrcRecords::Parser::BuildConflictIndep)
 	     (*D).Type == pkgSrcRecords::Parser::BuildConflictIndep)
          {
          {
-            pkgCache::PkgIterator Pkg = Cache->FindPkg((*D).Package);
+            pkgCache::GrpIterator Grp = Cache->FindGrp((*D).Package);
             // Build-conflicts on unknown packages are silently ignored
             // Build-conflicts on unknown packages are silently ignored
-            if (Pkg.end() == true)
+            if (Grp.end() == true)
                continue;
                continue;
 
 
-            pkgCache::VerIterator IV = (*Cache)[Pkg].InstVerIter(*Cache);
-
-            /* 
-             * Remove if we have an installed version that satisfies the 
-             * version criteria
-             */
-            if (IV.end() == false && 
-                Cache->VS().CheckDep(IV.VerStr(),(*D).Op,(*D).Version.c_str()) == true)
-               TryToInstallBuildDep(Pkg,Cache,Fix,true,false);
+	    for (pkgCache::PkgIterator Pkg = Grp.PackageList(); Pkg.end() == false; Pkg = Grp.NextPkg(Pkg))
+	    {
+	       pkgCache::VerIterator IV = (*Cache)[Pkg].InstVerIter(*Cache);
+	       /*
+		* Remove if we have an installed version that satisfies the
+		* version criteria
+		*/
+	       if (IV.end() == false &&
+		   Cache->VS().CheckDep(IV.VerStr(),(*D).Op,(*D).Version.c_str()) == true)
+		  TryToInstallBuildDep(Pkg,Cache,Fix,true,false);
+	    }
          }
          }
 	 else // BuildDep || BuildDepIndep
 	 else // BuildDep || BuildDepIndep
          {
          {
-	    pkgCache::PkgIterator Pkg = Cache->FindPkg((*D).Package);
             if (_config->FindB("Debug::BuildDeps",false) == true)
             if (_config->FindB("Debug::BuildDeps",false) == true)
                  cout << "Looking for " << (*D).Package << "...\n";
                  cout << "Looking for " << (*D).Package << "...\n";
 
 
+	    pkgCache::PkgIterator Pkg;
+
+	    // Cross-Building?
+	    if (StripMultiArch == false)
+	    {
+	       size_t const colon = D->Package.find(":");
+	       if (colon != string::npos &&
+		   (strcmp(D->Package.c_str() + colon, ":any") == 0 || strcmp(D->Package.c_str() + colon, ":native") == 0))
+		  Pkg = Cache->FindPkg(D->Package.substr(0,colon));
+	       else
+		  Pkg = Cache->FindPkg(D->Package);
+
+	       // We need to decide if host or build arch, so find a version we can look at
+	       pkgCache::VerIterator Ver;
+
+	       // a bad version either is invalid or doesn't satify dependency
+	       #define BADVER(Ver) Ver.end() == true || \
+				   (Ver.end() == false && D->Version.empty() == false && \
+				    Cache->VS().CheckDep(Ver.VerStr(),D->Op,D->Version.c_str()) == false)
+
+	       if (Pkg.end() == false)
+	       {
+		  Ver = (*Cache)[Pkg].InstVerIter(*Cache);
+		  if (BADVER(Ver))
+		     Ver = (*Cache)[Pkg].CandidateVerIter(*Cache);
+	       }
+	       if (BADVER(Ver))
+	       {
+		  pkgCache::PkgIterator HostPkg = Cache->FindPkg(D->Package, hostArch);
+		  if (HostPkg.end() == false)
+		  {
+		     Ver = (*Cache)[HostPkg].InstVerIter(*Cache);
+		     if (BADVER(Ver))
+		        Ver = (*Cache)[HostPkg].CandidateVerIter(*Cache);
+		  }
+	       }
+	       if ((BADVER(Ver)) == false)
+	       {
+		  string forbidden;
+		  if (Ver->MultiArch == pkgCache::Version::None || Ver->MultiArch == pkgCache::Version::All);
+		  else if (Ver->MultiArch == pkgCache::Version::Same)
+		  {
+		     if (colon != string::npos)
+			Pkg = Ver.ParentPkg().Group().FindPkg(hostArch);
+		     else if (strcmp(D->Package.c_str() + colon, ":any") == 0)
+			forbidden = "Multi-Arch: same";
+		     // :native gets the buildArch
+		  }
+		  else if (Ver->MultiArch == pkgCache::Version::Foreign || Ver->MultiArch == pkgCache::Version::AllForeign)
+		  {
+		     if (colon != string::npos)
+			forbidden = "Multi-Arch: foreign";
+		  }
+		  else if (Ver->MultiArch == pkgCache::Version::Allowed || Ver->MultiArch == pkgCache::Version::AllAllowed)
+		  {
+		     if (colon == string::npos)
+			Pkg = Ver.ParentPkg().Group().FindPkg(hostArch);
+		     else if (strcmp(D->Package.c_str() + colon, ":any") == 0)
+		     {
+			// prefer any installed over preferred non-installed architectures
+			pkgCache::GrpIterator Grp = Ver.ParentPkg().Group();
+			// we don't check for version here as we are better of with upgrading than remove and install
+			for (Pkg = Grp.PackageList(); Pkg.end() == false; Pkg = Grp.NextPkg(Pkg))
+			   if (Pkg.CurrentVer().end() == false)
+			      break;
+			if (Pkg.end() == true)
+			   Pkg = Grp.FindPreferredPkg(true);
+		     }
+		     // native gets buildArch
+		  }
+		  if (forbidden.empty() == false)
+		  {
+		     if (_config->FindB("Debug::BuildDeps",false) == true)
+			cout << " :any is not allowed from M-A: same package " << (*D).Package << endl;
+		     if (hasAlternatives)
+			continue;
+		     return _error->Error(_("%s dependency for %s can't be satisfied "
+					    "because %s is not allowed on '%s' packages"),
+					  Last->BuildDepType(D->Type), Src.c_str(),
+					  D->Package.c_str(), "Multi-Arch: same");
+		  }
+	       }
+	       else if (_config->FindB("Debug::BuildDeps",false) == true)
+		  cout << " No multiarch info as we have no satisfying installed nor candidate for " << D->Package << " on build or host arch" << endl;
+	       #undef BADVER
+	    }
+	    else
+	       Pkg = Cache->FindPkg(D->Package);
+
 	    if (Pkg.end() == true)
 	    if (Pkg.end() == true)
             {
             {
                if (_config->FindB("Debug::BuildDeps",false) == true)
                if (_config->FindB("Debug::BuildDeps",false) == true)
@@ -2769,99 +2892,74 @@ bool DoBuildDep(CommandLine &CmdL)
                                     (*D).Package.c_str());
                                     (*D).Package.c_str());
             }
             }
 
 
-            /*
-             * if there are alternatives, we've already picked one, so skip
-             * the rest
-             *
-             * TODO: this means that if there's a build-dep on A|B and B is
-             * installed, we'll still try to install A; more importantly,
-             * if A is currently broken, we cannot go back and try B. To fix 
-             * this would require we do a Resolve cycle for each package we 
-             * add to the install list. Ugh
-             */
-                       
-	    /* 
-	     * If this is a virtual package, we need to check the list of
-	     * packages that provide it and see if any of those are
-	     * installed
-	     */
-            pkgCache::PrvIterator Prv = Pkg.ProvidesList();
-            for (; Prv.end() != true; Prv++)
-	    {
-               if (_config->FindB("Debug::BuildDeps",false) == true)
-                    cout << "  Checking provider " << Prv.OwnerPkg().FullName() << endl;
-
-	       if ((*Cache)[Prv.OwnerPkg()].InstVerIter(*Cache).end() == false)
-	          break;
-            }
-            
-            // Get installed version and version we are going to install
 	    pkgCache::VerIterator IV = (*Cache)[Pkg].InstVerIter(*Cache);
 	    pkgCache::VerIterator IV = (*Cache)[Pkg].InstVerIter(*Cache);
+	    if (IV.end() == false)
+	    {
+	       if (_config->FindB("Debug::BuildDeps",false) == true)
+		  cout << "  Is installed\n";
 
 
-            if ((*D).Version[0] != '\0') {
-                 // Versioned dependency
-
-                 pkgCache::VerIterator CV = (*Cache)[Pkg].CandidateVerIter(*Cache);
-
-                 for (; CV.end() != true; CV++)
-                 {
-                      if (Cache->VS().CheckDep(CV.VerStr(),(*D).Op,(*D).Version.c_str()) == true)
-                           break;
-                 }
-                 if (CV.end() == true)
-		 {
-		   if (hasAlternatives)
-		   {
-		      continue;
-		   }
-		   else
-		   {
-                      return _error->Error(_("%s dependency for %s cannot be satisfied "
-                                             "because no available versions of package %s "
-                                             "can satisfy version requirements"),
-                                           Last->BuildDepType((*D).Type),Src.c_str(),
-                                           (*D).Package.c_str());
-		   }
-		 }
-            }
-            else
-            {
-               // Only consider virtual packages if there is no versioned dependency
-               if (Prv.end() == false)
-               {
-                  if (_config->FindB("Debug::BuildDeps",false) == true)
-                     cout << "  Is provided by installed package " << Prv.OwnerPkg().FullName() << endl;
-                  skipAlternatives = hasAlternatives;
-                  continue;
-               }
-            }
+	       if (D->Version.empty() == true ||
+		   Cache->VS().CheckDep(IV.VerStr(),(*D).Op,(*D).Version.c_str()) == true)
+	       {
+		  skipAlternatives = hasAlternatives;
+		  continue;
+	       }
 
 
-            if (IV.end() == false)
-            {
-               if (_config->FindB("Debug::BuildDeps",false) == true)
-                  cout << "  Is installed\n";
+	       if (_config->FindB("Debug::BuildDeps",false) == true)
+		  cout << "    ...but the installed version doesn't meet the version requirement\n";
 
 
-               if (Cache->VS().CheckDep(IV.VerStr(),(*D).Op,(*D).Version.c_str()) == true)
-               {
-                  skipAlternatives = hasAlternatives;
-                  continue;
-               }
+	       if (((*D).Op & pkgCache::Dep::LessEq) == pkgCache::Dep::LessEq)
+		  return _error->Error(_("Failed to satisfy %s dependency for %s: Installed package %s is too new"),
+					Last->BuildDepType((*D).Type), Src.c_str(), Pkg.FullName(true).c_str());
+	    }
 
 
-               if (_config->FindB("Debug::BuildDeps",false) == true)
-                  cout << "    ...but the installed version doesn't meet the version requirement\n";
-
-               if (((*D).Op & pkgCache::Dep::LessEq) == pkgCache::Dep::LessEq)
-               {
-                  return _error->Error(_("Failed to satisfy %s dependency for %s: Installed package %s is too new"),
-                                       Last->BuildDepType((*D).Type),
-                                       Src.c_str(),
-                                       Pkg.FullName(true).c_str());
-               }
-            }
+	    // Only consider virtual packages if there is no versioned dependency
+	    if ((*D).Version.empty() == true)
+	    {
+	       /*
+		* If this is a virtual package, we need to check the list of
+		* packages that provide it and see if any of those are
+		* installed
+		*/
+	       pkgCache::PrvIterator Prv = Pkg.ProvidesList();
+	       for (; Prv.end() != true; Prv++)
+	       {
+		  if (_config->FindB("Debug::BuildDeps",false) == true)
+		     cout << "  Checking provider " << Prv.OwnerPkg().FullName() << endl;
 
 
+		  if ((*Cache)[Prv.OwnerPkg()].InstVerIter(*Cache).end() == false)
+		     break;
+	       }
 
 
-            if (_config->FindB("Debug::BuildDeps",false) == true)
-               cout << "  Trying to install " << (*D).Package << endl;
+	       if (Prv.end() == false)
+	       {
+		  if (_config->FindB("Debug::BuildDeps",false) == true)
+		     cout << "  Is provided by installed package " << Prv.OwnerPkg().FullName() << endl;
+		  skipAlternatives = hasAlternatives;
+		  continue;
+	       }
+	    }
+	    else // versioned dependency
+	    {
+	       pkgCache::VerIterator CV = (*Cache)[Pkg].CandidateVerIter(*Cache);
+	       if (CV.end() == true ||
+		   Cache->VS().CheckDep(CV.VerStr(),(*D).Op,(*D).Version.c_str()) == false)
+	       {
+		  if (hasAlternatives)
+		     continue;
+		  else if (CV.end() == false)
+		     return _error->Error(_("%s dependency for %s cannot be satisfied "
+					    "because candidate version of package %s "
+					    "can't satisfy version requirements"),
+					  Last->BuildDepType(D->Type), Src.c_str(),
+					  D->Package.c_str());
+		  else
+		     return _error->Error(_("%s dependency for %s cannot be satisfied "
+					    "because package %s has no candidate version"),
+					  Last->BuildDepType(D->Type), Src.c_str(),
+					  D->Package.c_str());
+	       }
+	    }
 
 
             if (TryToInstallBuildDep(Pkg,Cache,Fix,false,false) == true)
             if (TryToInstallBuildDep(Pkg,Cache,Fix,false,false) == true)
             {
             {
@@ -3247,6 +3345,7 @@ int main(int argc,const char *argv[])					/*{{{*/
       {'m',"ignore-missing","APT::Get::Fix-Missing",0},
       {'m',"ignore-missing","APT::Get::Fix-Missing",0},
       {'t',"target-release","APT::Default-Release",CommandLine::HasArg},
       {'t',"target-release","APT::Default-Release",CommandLine::HasArg},
       {'t',"default-release","APT::Default-Release",CommandLine::HasArg},
       {'t',"default-release","APT::Default-Release",CommandLine::HasArg},
+      {'a',"host-architecture","APT::Get::Host-Architecture",CommandLine::HasArg},
       {0,"download","APT::Get::Download",0},
       {0,"download","APT::Get::Download",0},
       {0,"fix-missing","APT::Get::Fix-Missing",0},
       {0,"fix-missing","APT::Get::Fix-Missing",0},
       {0,"ignore-hold","APT::Ignore-Hold",0},      
       {0,"ignore-hold","APT::Ignore-Hold",0},      

+ 4 - 1
cmdline/apt-key

@@ -5,9 +5,12 @@ unset GREP_OPTIONS
 
 
 # We don't use a secret keyring, of course, but gpg panics and
 # We don't use a secret keyring, of course, but gpg panics and
 # implodes if there isn't one available
 # implodes if there isn't one available
-GPG_CMD='gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg'
+SECRETKEYRING="$(mktemp)"
+trap "rm -f '${SECRETKEYRING}'" 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM
+GPG_CMD="gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring ${SECRETKEYRING}"
 
 
 if [ "$(id -u)" -eq 0 ]; then
 if [ "$(id -u)" -eq 0 ]; then
+	# we could use a tmpfile here too, but creation of this tends to be time-consuming
 	GPG_CMD="$GPG_CMD --trustdb-name /etc/apt/trustdb.gpg"
 	GPG_CMD="$GPG_CMD --trustdb-name /etc/apt/trustdb.gpg"
 fi
 fi
 
 

+ 5 - 0
debian/apt.postinst

@@ -15,6 +15,11 @@ set -e
 
 
 case "$1" in
 case "$1" in
     configure)
     configure)
+	SECRING='/etc/apt/secring.gpg'
+	# test if secring is an empty normal file
+	if test -f $SECRING -a ! -s $SECRING; then
+		rm -f $SECRING
+	fi
 	apt-key update
 	apt-key update
     ;;
     ;;
 
 

+ 0 - 1
debian/apt.symbols

@@ -1256,7 +1256,6 @@ libapt-pkg.so.4.10 libapt-pkg4.10
  (arch=hppa mips mipsel sparc|c++|optional=private)"GlobalError::Insert(GlobalError::MsgType, char const*, void*&, unsigned int&)@Base" 0.8.11.4 1
  (arch=hppa mips mipsel sparc|c++|optional=private)"GlobalError::Insert(GlobalError::MsgType, char const*, void*&, unsigned int&)@Base" 0.8.11.4 1
  (arch=ia64 sparc64|c++|optional=private)"GlobalError::Insert(GlobalError::MsgType, char const*, void*&, unsigned long&)@Base" 0.8.11.4 1
  (arch=ia64 sparc64|c++|optional=private)"GlobalError::Insert(GlobalError::MsgType, char const*, void*&, unsigned long&)@Base" 0.8.11.4 1
  (arch=sh4|c++|optional=private)"GlobalError::Insert(GlobalError::MsgType, char const*, __builtin_va_list&, unsigned int&)@Base" 0.8.11.4 1
  (arch=sh4|c++|optional=private)"GlobalError::Insert(GlobalError::MsgType, char const*, __builtin_va_list&, unsigned int&)@Base" 0.8.11.4 1
-
  (arch=i386 hurd-i386 kfreebsd-i386|c++|optional=private)"GlobalError::InsertErrno(GlobalError::MsgType, char const*, char const*, char*&, int, unsigned int&)@Base" 0.8.11.4 1
  (arch=i386 hurd-i386 kfreebsd-i386|c++|optional=private)"GlobalError::InsertErrno(GlobalError::MsgType, char const*, char const*, char*&, int, unsigned int&)@Base" 0.8.11.4 1
  (arch=armel armhf|c++|optional=private)"GlobalError::InsertErrno(GlobalError::MsgType, char const*, char const*, std::__va_list&, int, unsigned int&)@Base" 0.8.11.4 1
  (arch=armel armhf|c++|optional=private)"GlobalError::InsertErrno(GlobalError::MsgType, char const*, char const*, std::__va_list&, int, unsigned int&)@Base" 0.8.11.4 1
  (arch=alpha|c++|optional=private)"GlobalError::InsertErrno(GlobalError::MsgType, char const*, char const*, __va_list_tag&, int, unsigned long&)@Base" 0.8.11.4 1
  (arch=alpha|c++|optional=private)"GlobalError::InsertErrno(GlobalError::MsgType, char const*, char const*, __va_list_tag&, int, unsigned long&)@Base" 0.8.11.4 1

+ 80 - 11
debian/changelog

@@ -1,15 +1,5 @@
-apt (0.8.15.2) unstable; urgency=high
+apt (0.8.15.6) unstable; urgency=low
 
 
-  * fix from David Kalnischkies for the InRelease gpg verification 
-    code (LP: #784473)
-  * cmdline/apt-get.cc:
-    - fix missing download progress in apt-get download
-  * apt-pkg/contrib/cdromutl.cc:
-    - fix escape problem when looking for the mounted devices
-  * apt-pkg/contrib/strutl.{h,cc}, test/libapt/strutil_test.cc:
-    - add new DeEscapeString() similar to DeQuoteString but
-      unescape character escapes like \0XX and \xXX (plus added
-      test)
   * apt-pkg/contrib/fileutl.{cc,h}:
   * apt-pkg/contrib/fileutl.{cc,h}:
     - add GetModificationTime() helper
     - add GetModificationTime() helper
   * apt-pkg/pkgcachegen.cc:
   * apt-pkg/pkgcachegen.cc:
@@ -24,6 +14,85 @@ apt (0.8.15.2) unstable; urgency=high
 
 
  -- Michael Vogt <mvo@debian.org>  Tue, 12 Jul 2011 11:54:47 +0200
  -- Michael Vogt <mvo@debian.org>  Tue, 12 Jul 2011 11:54:47 +0200
 
 
+apt (0.8.15.5) unstable; urgency=low
+
+  [ David Kalnischkies ]
+  * apt-pkg/deb/deblistparser.cc:
+    - do not assume that the last char on a line is a \n (Closes: #633350)
+
+ -- Michael Vogt <mvo@debian.org>  Thu, 28 Jul 2011 16:49:15 +0200
+
+apt (0.8.15.4) unstable; urgency=low
+
+  [ David Miller ]
+  * apt-pkg/contrib/sha1.cc:
+    - fix illegally casts of on-stack buffer to a type requiring more
+      alignment than it has resulting in segfaults on sparc (Closes: #634696)
+
+  [ Michael Vogt ]
+  * apt-pkg/contrib/cdromutl.cc:
+    - fix escape problem when looking for the mounted devices
+  * apt-pkg/contrib/strutl.{h,cc}, test/libapt/strutil_test.cc:
+    - add new DeEscapeString() similar to DeQuoteString but
+      unescape character escapes like \0XX and \xXX (plus added
+      test)
+  * refresh po/*
+  
+ -- Michael Vogt <mvo@debian.org>  Tue, 26 Jul 2011 12:12:27 +0200
+
+apt (0.8.15.3) unstable; urgency=low
+
+  [ Michael Vogt ]
+  * apt-pkg/acquire-item.cc:
+    - improve error message for a expired Release file
+  * apt-pkg/algorithms.cc:
+    - Hold back packages that would enter "policy-broken" state on upgrade
+      when doing a "apt-get upgrade"
+  * cmdline/apt-get.cc:
+    - fix missing download progress in apt-get download
+
+  [ David Kalnischkies ]
+  * apt-pkg/pkgcachegen.cc:
+    - fallback to memory if file is not writeable even if access()
+      told us the opposite before (e.g. in fakeroot 1.16) (Closes: #630591)
+  * doc/sources.list.5.xml:
+    - document available [options] for sources.list entries (Closes: 632441)
+  * doc/apt.conf.5.xml:
+    - document APT::Architectures list (Closes: #612102)
+  * cmdline/apt-get.cc:
+    - restore all important dependencies for garbage packages (LP: #806274)
+    - do not require unused partial dirs in 'source' (Closes: #633510)
+    - buildconflicts effect all architectures
+    - implement MultiarchCross for build-dep and source (Closes: #632221)
+  * apt-pkg/init.cc:
+    - use CndSet in pkgInitConfig (Closes: #629617)
+  * apt-pkg/depcache.cc:
+    - change default of APT::AutoRemove::SuggestsImportant to true
+  * cmdline/apt-key:
+    - use a tmpfile instead of /etc/apt/secring.gpg (Closes: #632596)
+  * debian/apt.postinst:
+    - remove /etc/apt/secring.gpg if it is an empty file
+  * doc/apt-cache.8.xml:
+    - apply madison typofix from John Feuerstein, thanks! (Closes: #633455)
+  * apt-pkg/policy.cc:
+    - emit an error on unknown APT::Default-Release value (Closes: #407511)
+  * apt-pkg/aptconfiguration.cc:
+    - ensure that native architecture is if not specified otherwise the
+      first architecture in the Architectures vector
+  * apt-pkg/deb/deblistparser.cc:
+    - Strip only :any and :native if MultiArch should be stripped as it is
+      save to ignore them in non-MultiArch contexts but if the dependency
+      is a specific architecture (and not the native) do not strip
+
+ -- Michael Vogt <mvo@debian.org>  Mon, 25 Jul 2011 15:04:43 +0200
+
+apt (0.8.15.2) unstable; urgency=high
+
+  * fix from David Kalnischkies for the InRelease gpg verification 
+    code (LP: #784473)
+
+ -- Michael Vogt <mvo@debian.org>  Tue, 12 Jul 2011 11:54:47 +0200
+
 apt (0.8.15.1) unstable; urgency=low
 apt (0.8.15.1) unstable; urgency=low
 
 
   [ David Kalnischkies ]
   [ David Kalnischkies ]

+ 0 - 3
debian/rules

@@ -120,9 +120,6 @@ libapt-pkg-doc: build-doc
 #
 #
 # libapt-pkg-doc install
 # libapt-pkg-doc install
 #
 #
-	# remove doxygen's embedded jquery as we don't use it anyway (#622147)
-	rm -f $(BLD)/doc/doxygen/html/jquery.js
-
 	dh_installdocs -p$@ $(BLD)/docs/design* \
 	dh_installdocs -p$@ $(BLD)/docs/design* \
 			    $(BLD)/docs/dpkg-tech* \
 			    $(BLD)/docs/dpkg-tech* \
 			    $(BLD)/docs/files* \
 			    $(BLD)/docs/files* \

+ 1 - 1
doc/apt-cache.8.xml

@@ -263,7 +263,7 @@ Reverse Provides:
      about the priority selection of the named package.</para></listitem>
      about the priority selection of the named package.</para></listitem>
      </varlistentry>
      </varlistentry>
 
 
-     <varlistentry><term>madison <replaceable>/[ pkg(s) ]</replaceable></term>
+     <varlistentry><term>madison <replaceable>[ pkg(s) ]</replaceable></term>
      <listitem><para><literal>apt-cache</literal>'s <literal>madison</literal> command attempts to mimic
      <listitem><para><literal>apt-cache</literal>'s <literal>madison</literal> command attempts to mimic
      the output format and a subset of the functionality of the Debian
      the output format and a subset of the functionality of the Debian
      archive management tool, <literal>madison</literal>.  It displays
      archive management tool, <literal>madison</literal>.  It displays

+ 24 - 3
doc/apt-get.8.xml

@@ -54,6 +54,13 @@
 			<replaceable>target_release</replaceable>
 			<replaceable>target_release</replaceable>
 		</arg>
 		</arg>
       </arg>
       </arg>
+      <arg>
+		<option>-a=</option>
+		<arg choice='plain'>
+			<replaceable>default_architecture</replaceable>
+		</arg>
+      </arg>
+
 
 
       <group choice="req">
       <group choice="req">
          <arg choice='plain'>update</arg>
          <arg choice='plain'>update</arg>
@@ -254,8 +261,10 @@
 
 
      <para>If the <option>--compile</option> option is specified
      <para>If the <option>--compile</option> option is specified
      then the package will be compiled to a binary .deb using
      then the package will be compiled to a binary .deb using
-     <command>dpkg-buildpackage</command>, if <option>--download-only</option>
-     is specified then the source package will not be unpacked.</para>
+     <command>dpkg-buildpackage</command> for the architecture as
+     defined by the <command>--host-architecture</command> option.
+     If <option>--download-only</option> is specified then the source package
+     will not be unpacked.</para>
 
 
      <para>A specific source version can be retrieved by postfixing the source name
      <para>A specific source version can be retrieved by postfixing the source name
      with an equals and then the version to fetch, similar to the mechanism
      with an equals and then the version to fetch, similar to the mechanism
@@ -270,7 +279,9 @@
 
 
      <varlistentry><term>build-dep</term>
      <varlistentry><term>build-dep</term>
      <listitem><para><literal>build-dep</literal> causes apt-get to install/remove packages in an 
      <listitem><para><literal>build-dep</literal> causes apt-get to install/remove packages in an 
-     attempt to satisfy the build dependencies for a source package.</para></listitem>
+     attempt to satisfy the build dependencies for a source package. By default the dependencies are
+     satisfied to build the package nativly. If desired a host-architecture can be specified
+     with the <option>--host-architecture</option> option instead.</para></listitem>
      </varlistentry>
      </varlistentry>
 
 
      <varlistentry><term>check</term>
      <varlistentry><term>check</term>
@@ -433,6 +444,16 @@
      Configuration Item: <literal>APT::Get::Show-Versions</literal>.</para></listitem>
      Configuration Item: <literal>APT::Get::Show-Versions</literal>.</para></listitem>
      </varlistentry>
      </varlistentry>
 
 
+     <varlistentry><term><option>-a</option></term>
+                   <term><option>--host-architecture</option></term>
+     <listitem><para>This option controls the architecture packages are built for
+     by <command>apt-get source --compile</command> and how cross-builddependencies
+     are satisfied. By default is not set which means that the host architecture
+     is the same as the build architecture (which is defined by <literal>APT::Architecture</literal>)
+     Configuration Item: <literal>APT::Get::Host-Architecture</literal>
+     </para></listitem>
+     </varlistentry>
+
      <varlistentry><term><option>-b</option></term><term><option>--compile</option></term>
      <varlistentry><term><option>-b</option></term><term><option>--compile</option></term>
                    <term><option>--build</option></term>
                    <term><option>--build</option></term>
      <listitem><para>Compile source packages after downloading them.
      <listitem><para>Compile source packages after downloading them.

+ 9 - 1
doc/apt.conf.5.xml

@@ -153,7 +153,15 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";};
      parsing package lists. The internal default is the architecture apt was 
      parsing package lists. The internal default is the architecture apt was 
      compiled for.</para></listitem>
      compiled for.</para></listitem>
      </varlistentry>
      </varlistentry>
-     
+
+     <varlistentry><term>Architectures</term>
+     <listitem><para>All Architectures the system supports. Processors implementing the <literal>amd64</literal>
+     are e.g. also able to execute binaries compiled for <literal>i386</literal>; This list is use when fetching files and
+     parsing package lists. The internal default is always the native architecture (<literal>APT::Architecture</literal>)
+     and all foreign architectures it can retrieve by calling <command>dpkg --print-foreign-architectures</command>.
+     </para></listitem>
+     </varlistentry>
+
      <varlistentry><term>Default-Release</term>
      <varlistentry><term>Default-Release</term>
      <listitem><para>Default release to install packages from if more than one
      <listitem><para>Default release to install packages from if more than one
      version available. Contains release name, codename or release version. Examples: 'stable', 'testing',
      version available. Contains release name, codename or release version. Examples: 'stable', 'testing',

+ 2 - 0
doc/examples/configure-index

@@ -23,6 +23,7 @@ quiet::NoUpdate "true"; // never update progress information - included in -q=1
 APT 
 APT 
 {
 {
   Architecture "i386";
   Architecture "i386";
+  Architectures { "amd64"; "armel"; };
   Build-Essential "build-essential";
   Build-Essential "build-essential";
 
 
   NeverAutoRemove  { "linux-image.*";  };  // packages that should never
   NeverAutoRemove  { "linux-image.*";  };  // packages that should never
@@ -31,6 +32,7 @@ APT
   // Options for apt-get
   // Options for apt-get
   Get 
   Get 
   {
   {
+     Host-Architecture "armel";
      Arch-Only "false";
      Arch-Only "false";
      AllowUnauthenticated "false";
      AllowUnauthenticated "false";
      AutomaticRemove "false";       
      AutomaticRemove "false";       

+ 1 - 1
doc/po/apt-doc.pot

@@ -928,7 +928,7 @@ msgstr ""
 
 
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term>
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term>
 #: apt-cache.8.xml:266
 #: apt-cache.8.xml:266
-msgid "madison <replaceable>/[ pkg(s) ]</replaceable>"
+msgid "madison <replaceable>[ pkg(s) ]</replaceable>"
 msgstr ""
 msgstr ""
 
 
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para>
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para>

+ 2 - 2
doc/po/de.po

@@ -1230,8 +1230,8 @@ msgstr ""
 
 
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term>
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term>
 #: apt-cache.8.xml:266
 #: apt-cache.8.xml:266
-msgid "madison <replaceable>/[ pkg(s) ]</replaceable>"
-msgstr "madison <replaceable>/[ Paket(e) ]</replaceable>"
+msgid "madison <replaceable>[ pkg(s) ]</replaceable>"
+msgstr "madison <replaceable>[ Paket(e) ]</replaceable>"
 
 
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para>
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para>
 #: apt-cache.8.xml:267
 #: apt-cache.8.xml:267

+ 1 - 1
doc/po/es.po

@@ -1303,7 +1303,7 @@ msgstr ""
 
 
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term>
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term>
 #: apt-cache.8.xml:266
 #: apt-cache.8.xml:266
-msgid "madison <replaceable>/[ pkg(s) ]</replaceable>"
+msgid "madison <replaceable>[ pkg(s) ]</replaceable>"
 msgstr "madison <replaceable>[ paquete(s) ]</replaceable>"
 msgstr "madison <replaceable>[ paquete(s) ]</replaceable>"
 
 
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para>
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para>

+ 1 - 1
doc/po/fr.po

@@ -1225,7 +1225,7 @@ msgstr ""
 
 
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term>
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term>
 #: apt-cache.8.xml:266
 #: apt-cache.8.xml:266
-msgid "madison <replaceable>/[ pkg(s) ]</replaceable>"
+msgid "madison <replaceable>[ pkg(s) ]</replaceable>"
 msgstr "madison <replaceable>[ paquet(s) ]</replaceable>"
 msgstr "madison <replaceable>[ paquet(s) ]</replaceable>"
 
 
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para>
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para>

+ 1 - 1
doc/po/it.po

@@ -893,7 +893,7 @@ msgstr ""
 
 
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term>
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term>
 #: apt-cache.8.xml:266
 #: apt-cache.8.xml:266
-msgid "madison <replaceable>/[ pkg(s) ]</replaceable>"
+msgid "madison <replaceable>[ pkg(s) ]</replaceable>"
 msgstr ""
 msgstr ""
 
 
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para>
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para>

+ 2 - 2
doc/po/ja.po

@@ -1304,8 +1304,8 @@ msgstr ""
 # type: Content of: <refentry><refsect1><refsect2><para><programlisting>
 # type: Content of: <refentry><refsect1><refsect2><para><programlisting>
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term>
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term>
 #: apt-cache.8.xml:266
 #: apt-cache.8.xml:266
-msgid "madison <replaceable>/[ pkg(s) ]</replaceable>"
-msgstr "madison <replaceable>/[ pkg(s) ]</replaceable>"
+msgid "madison <replaceable>[ pkg(s) ]</replaceable>"
+msgstr "madison <replaceable>[ pkg(s) ]</replaceable>"
 
 
 # type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para>
 # type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para>
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para>
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para>

+ 2 - 2
doc/po/pl.po

@@ -1311,8 +1311,8 @@ msgstr ""
 
 
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term>
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term>
 #: apt-cache.8.xml:266
 #: apt-cache.8.xml:266
-msgid "madison <replaceable>/[ pkg(s) ]</replaceable>"
-msgstr "madison <replaceable>/[ pakiet(y) ]</replaceable>"
+msgid "madison <replaceable>[ pkg(s) ]</replaceable>"
+msgstr "madison <replaceable>[ pakiet(y) ]</replaceable>"
 
 
 #
 #
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para>
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para>

+ 2 - 2
doc/po/pt.po

@@ -1255,8 +1255,8 @@ msgstr ""
 
 
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term>
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term>
 #: apt-cache.8.xml:266
 #: apt-cache.8.xml:266
-msgid "madison <replaceable>/[ pkg(s) ]</replaceable>"
-msgstr "madison <replaceable>/[ pacote(s) ]</replaceable>"
+msgid "madison <replaceable>[ pkg(s) ]</replaceable>"
+msgstr "madison <replaceable>[ pacote(s) ]</replaceable>"
 
 
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para>
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para>
 #: apt-cache.8.xml:267
 #: apt-cache.8.xml:267

+ 4 - 1
doc/po/pt_BR.po

@@ -943,8 +943,11 @@ msgstr ""
 
 
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term>
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term>
 #: apt-cache.8.xml:266
 #: apt-cache.8.xml:266
-msgid "madison <replaceable>/[ pkg(s) ]</replaceable>"
+#, fuzzy
+msgid "madison <replaceable>[ pkg(s) ]</replaceable>"
 msgstr ""
 msgstr ""
+"<programlisting>\n"
+"apt-get install <replaceable>pacote</replaceable>/testing\n"
 
 
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para>
 #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para>
 #: apt-cache.8.xml:267
 #: apt-cache.8.xml:267

+ 17 - 1
doc/sources.list.5.xml

@@ -78,7 +78,7 @@
    <para>The format for a <filename>sources.list</filename> entry using the
    <para>The format for a <filename>sources.list</filename> entry using the
    <literal>deb</literal> and <literal>deb-src</literal> types is:</para>
    <literal>deb</literal> and <literal>deb-src</literal> types is:</para>
 
 
-   <literallayout>deb uri distribution [component1] [component2] [...]</literallayout>
+   <literallayout>deb [ options ] uri distribution [component1] [component2] [...]</literallayout>
 
 
    <para>The URI for the <literal>deb</literal> type must specify the base of the
    <para>The URI for the <literal>deb</literal> type must specify the base of the
    Debian distribution, from which APT will find the information it needs. 
    Debian distribution, from which APT will find the information it needs. 
@@ -109,6 +109,17 @@
    simultaneous anonymous users. APT also parallelizes connections to 
    simultaneous anonymous users. APT also parallelizes connections to 
    different hosts to more effectively deal with sites with low bandwidth.</para>
    different hosts to more effectively deal with sites with low bandwidth.</para>
 
 
+   <para><literal>options</literal> is always optional and needs to be surounded by
+   square brackets. It can consist of multiple settings in the form
+   <literal><replaceable>setting</replaceable>=<replaceable>value</replaceable></literal>.
+   Multiple settings are separated by spaces. The following settings are supported by APT,
+   note through that unsupported settings will be ignored silently:
+   <itemizedlist><listitem><para><literal>arch=<replaceable>arch1</replaceable>,<replaceable>arch2</replaceable>,…</literal>
+   can be used to specify for which architectures packages information should
+   be downloaded. If this option is not set all architectures defined by the
+   <literal>APT::Architectures</literal> option will be downloaded.</para>
+   </listitem></itemizedlist></para>
+
    <para>It is important to list sources in order of preference, with the most
    <para>It is important to list sources in order of preference, with the most
    preferred source listed first. Typically this will result in sorting
    preferred source listed first. Typically this will result in sorting
    by speed from fastest to slowest (CD-ROM followed by hosts on a local
    by speed from fastest to slowest (CD-ROM followed by hosts on a local
@@ -206,6 +217,11 @@ deb http://security.debian.org/ &stable-codename;/updates main contrib non-free
    <para>Source line for the above</para>
    <para>Source line for the above</para>
    <literallayout>deb-src file:/home/jason/debian unstable main contrib non-free</literallayout>
    <literallayout>deb-src file:/home/jason/debian unstable main contrib non-free</literallayout>
 
 
+   <para>The first line gets package information for the architectures in <literal>APT::Architectures</literal>
+   while the second always retrieves <literal>amd64</literal> and <literal>armel</literal>.</para>
+   <literallayout>deb http://ftp.debian.org/debian &stable-codename; main
+deb [ arch=amd64,armel ] http://ftp.debian.org/debian &stable-codename; main</literallayout>
+
    <para>Uses HTTP to access the archive at archive.debian.org, and uses only
    <para>Uses HTTP to access the archive at archive.debian.org, and uses only
    the hamm/main area.</para>
    the hamm/main area.</para>
    <literallayout>deb http://archive.debian.org/debian-archive hamm main</literallayout>
    <literallayout>deb http://archive.debian.org/debian-archive hamm main</literallayout>

+ 137 - 104
po/apt-all.pot

@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-07-14 10:31+0200\n"
+"POT-Creation-Date: 2011-07-26 12:05+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -154,7 +154,7 @@ msgstr ""
 
 
 #: cmdline/apt-cache.cc:1675 cmdline/apt-cdrom.cc:197 cmdline/apt-config.cc:73
 #: cmdline/apt-cache.cc:1675 cmdline/apt-cdrom.cc:197 cmdline/apt-config.cc:73
 #: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:589
 #: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:589
-#: cmdline/apt-get.cc:3122 cmdline/apt-mark.cc:264 cmdline/apt-sortpkgs.cc:144
+#: cmdline/apt-get.cc:3220 cmdline/apt-mark.cc:264 cmdline/apt-sortpkgs.cc:144
 #, c-format
 #, c-format
 msgid "%s %s for %s compiled on %s %s\n"
 msgid "%s %s for %s compiled on %s %s\n"
 msgstr ""
 msgstr ""
@@ -723,7 +723,7 @@ msgstr ""
 msgid "%s is already the newest version.\n"
 msgid "%s is already the newest version.\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:818 cmdline/apt-get.cc:2080 cmdline/apt-mark.cc:59
+#: cmdline/apt-get.cc:818 cmdline/apt-get.cc:2088 cmdline/apt-mark.cc:59
 #, c-format
 #, c-format
 msgid "%s set to manually installed.\n"
 msgid "%s set to manually installed.\n"
 msgstr ""
 msgstr ""
@@ -835,8 +835,8 @@ msgstr ""
 msgid "After this operation, %sB disk space will be freed.\n"
 msgid "After this operation, %sB disk space will be freed.\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1174 cmdline/apt-get.cc:1177 cmdline/apt-get.cc:2492
-#: cmdline/apt-get.cc:2495
+#: cmdline/apt-get.cc:1174 cmdline/apt-get.cc:1177 cmdline/apt-get.cc:2499
+#: cmdline/apt-get.cc:2502
 #, c-format
 #, c-format
 msgid "Couldn't determine free space in %s"
 msgid "Couldn't determine free space in %s"
 msgstr ""
 msgstr ""
@@ -870,7 +870,7 @@ msgstr ""
 msgid "Do you want to continue [Y/n]? "
 msgid "Do you want to continue [Y/n]? "
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1300 cmdline/apt-get.cc:2557 apt-pkg/algorithms.cc:1429
+#: cmdline/apt-get.cc:1300 cmdline/apt-get.cc:2564 apt-pkg/algorithms.cc:1438
 #, c-format
 #, c-format
 msgid "Failed to fetch %s  %s\n"
 msgid "Failed to fetch %s  %s\n"
 msgstr ""
 msgstr ""
@@ -879,7 +879,7 @@ msgstr ""
 msgid "Some files failed to download"
 msgid "Some files failed to download"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1319 cmdline/apt-get.cc:2569
+#: cmdline/apt-get.cc:1319 cmdline/apt-get.cc:2576
 msgid "Download complete and in download only mode"
 msgid "Download complete and in download only mode"
 msgstr ""
 msgstr ""
 
 
@@ -915,31 +915,31 @@ msgstr[1] ""
 msgid "Note: This is done automatic and on purpose by dpkg."
 msgid "Note: This is done automatic and on purpose by dpkg."
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1497
+#: cmdline/apt-get.cc:1505
 #, c-format
 #, c-format
 msgid "Ignore unavailable target release '%s' of package '%s'"
 msgid "Ignore unavailable target release '%s' of package '%s'"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1529
+#: cmdline/apt-get.cc:1537
 #, c-format
 #, c-format
 msgid "Picking '%s' as source package instead of '%s'\n"
 msgid "Picking '%s' as source package instead of '%s'\n"
 msgstr ""
 msgstr ""
 
 
 #. if (VerTag.empty() == false && Last == 0)
 #. if (VerTag.empty() == false && Last == 0)
-#: cmdline/apt-get.cc:1567
+#: cmdline/apt-get.cc:1575
 #, c-format
 #, c-format
 msgid "Ignore unavailable version '%s' of package '%s'"
 msgid "Ignore unavailable version '%s' of package '%s'"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1583
+#: cmdline/apt-get.cc:1591
 msgid "The update command takes no arguments"
 msgid "The update command takes no arguments"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1645
+#: cmdline/apt-get.cc:1653
 msgid "We are not supposed to delete stuff, can't start AutoRemover"
 msgid "We are not supposed to delete stuff, can't start AutoRemover"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1740
+#: cmdline/apt-get.cc:1748
 msgid ""
 msgid ""
 "Hmm, seems like the AutoRemover destroyed something which really\n"
 "Hmm, seems like the AutoRemover destroyed something which really\n"
 "shouldn't happen. Please file a bug report against apt."
 "shouldn't happen. Please file a bug report against apt."
@@ -955,15 +955,15 @@ msgstr ""
 #. "that package should be filed.") << endl;
 #. "that package should be filed.") << endl;
 #. }
 #. }
 #.
 #.
-#: cmdline/apt-get.cc:1743 cmdline/apt-get.cc:1913
+#: cmdline/apt-get.cc:1751 cmdline/apt-get.cc:1921
 msgid "The following information may help to resolve the situation:"
 msgid "The following information may help to resolve the situation:"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1747
+#: cmdline/apt-get.cc:1755
 msgid "Internal Error, AutoRemover broke stuff"
 msgid "Internal Error, AutoRemover broke stuff"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1754
+#: cmdline/apt-get.cc:1762
 msgid ""
 msgid ""
 "The following package was automatically installed and is no longer required:"
 "The following package was automatically installed and is no longer required:"
 msgid_plural ""
 msgid_plural ""
@@ -972,7 +972,7 @@ msgid_plural ""
 msgstr[0] ""
 msgstr[0] ""
 msgstr[1] ""
 msgstr[1] ""
 
 
-#: cmdline/apt-get.cc:1758
+#: cmdline/apt-get.cc:1766
 #, c-format
 #, c-format
 msgid "%lu package was automatically installed and is no longer required.\n"
 msgid "%lu package was automatically installed and is no longer required.\n"
 msgid_plural ""
 msgid_plural ""
@@ -980,25 +980,25 @@ msgid_plural ""
 msgstr[0] ""
 msgstr[0] ""
 msgstr[1] ""
 msgstr[1] ""
 
 
-#: cmdline/apt-get.cc:1760
+#: cmdline/apt-get.cc:1768
 msgid "Use 'apt-get autoremove' to remove them."
 msgid "Use 'apt-get autoremove' to remove them."
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1779
+#: cmdline/apt-get.cc:1787
 msgid "Internal error, AllUpgrade broke stuff"
 msgid "Internal error, AllUpgrade broke stuff"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1878
+#: cmdline/apt-get.cc:1886
 msgid "You might want to run 'apt-get -f install' to correct these:"
 msgid "You might want to run 'apt-get -f install' to correct these:"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1882
+#: cmdline/apt-get.cc:1890
 msgid ""
 msgid ""
 "Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a "
 "Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a "
 "solution)."
 "solution)."
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1898
+#: cmdline/apt-get.cc:1906
 msgid ""
 msgid ""
 "Some packages could not be installed. This may mean that you have\n"
 "Some packages could not be installed. This may mean that you have\n"
 "requested an impossible situation or if you are using the unstable\n"
 "requested an impossible situation or if you are using the unstable\n"
@@ -1006,80 +1006,80 @@ msgid ""
 "or been moved out of Incoming."
 "or been moved out of Incoming."
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1916
+#: cmdline/apt-get.cc:1924
 msgid "Broken packages"
 msgid "Broken packages"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1942
+#: cmdline/apt-get.cc:1950
 msgid "The following extra packages will be installed:"
 msgid "The following extra packages will be installed:"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2032
+#: cmdline/apt-get.cc:2040
 msgid "Suggested packages:"
 msgid "Suggested packages:"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2033
+#: cmdline/apt-get.cc:2041
 msgid "Recommended packages:"
 msgid "Recommended packages:"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2075
+#: cmdline/apt-get.cc:2083
 #, c-format
 #, c-format
 msgid "Couldn't find package %s"
 msgid "Couldn't find package %s"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2082 cmdline/apt-mark.cc:61
+#: cmdline/apt-get.cc:2090 cmdline/apt-mark.cc:61
 #, c-format
 #, c-format
 msgid "%s set to automatically installed.\n"
 msgid "%s set to automatically installed.\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2090 cmdline/apt-mark.cc:105
+#: cmdline/apt-get.cc:2098 cmdline/apt-mark.cc:105
 msgid ""
 msgid ""
 "This command is deprecated. Please use 'apt-mark auto' and 'apt-mark manual' "
 "This command is deprecated. Please use 'apt-mark auto' and 'apt-mark manual' "
 "instead."
 "instead."
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2106
+#: cmdline/apt-get.cc:2114
 msgid "Calculating upgrade... "
 msgid "Calculating upgrade... "
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2109 methods/ftp.cc:707 methods/connect.cc:111
+#: cmdline/apt-get.cc:2117 methods/ftp.cc:707 methods/connect.cc:111
 msgid "Failed"
 msgid "Failed"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2114
+#: cmdline/apt-get.cc:2122
 msgid "Done"
 msgid "Done"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2181 cmdline/apt-get.cc:2189
+#: cmdline/apt-get.cc:2189 cmdline/apt-get.cc:2197
 msgid "Internal error, problem resolver broke stuff"
 msgid "Internal error, problem resolver broke stuff"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2213 cmdline/apt-get.cc:2246
+#: cmdline/apt-get.cc:2221 cmdline/apt-get.cc:2254
 msgid "Unable to lock the download directory"
 msgid "Unable to lock the download directory"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2297
+#: cmdline/apt-get.cc:2305
 #, c-format
 #, c-format
 msgid "Downloading %s %s"
 msgid "Downloading %s %s"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2353
+#: cmdline/apt-get.cc:2361
 msgid "Must specify at least one package to fetch source for"
 msgid "Must specify at least one package to fetch source for"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2394 cmdline/apt-get.cc:2690
+#: cmdline/apt-get.cc:2401 cmdline/apt-get.cc:2713
 #, c-format
 #, c-format
 msgid "Unable to find a source package for %s"
 msgid "Unable to find a source package for %s"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2411
+#: cmdline/apt-get.cc:2418
 #, c-format
 #, c-format
 msgid ""
 msgid ""
 "NOTICE: '%s' packaging is maintained in the '%s' version control system at:\n"
 "NOTICE: '%s' packaging is maintained in the '%s' version control system at:\n"
 "%s\n"
 "%s\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2416
+#: cmdline/apt-get.cc:2423
 #, c-format
 #, c-format
 msgid ""
 msgid ""
 "Please use:\n"
 "Please use:\n"
@@ -1087,120 +1087,141 @@ msgid ""
 "to retrieve the latest (possibly unreleased) updates to the package.\n"
 "to retrieve the latest (possibly unreleased) updates to the package.\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2469
+#: cmdline/apt-get.cc:2476
 #, c-format
 #, c-format
 msgid "Skipping already downloaded file '%s'\n"
 msgid "Skipping already downloaded file '%s'\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2506
+#: cmdline/apt-get.cc:2513
 #, c-format
 #, c-format
 msgid "You don't have enough free space in %s"
 msgid "You don't have enough free space in %s"
 msgstr ""
 msgstr ""
 
 
 #. TRANSLATOR: The required space between number and unit is already included
 #. TRANSLATOR: The required space between number and unit is already included
 #. in the replacement strings, so %sB will be correctly translate in e.g. 1,5 MB
 #. in the replacement strings, so %sB will be correctly translate in e.g. 1,5 MB
-#: cmdline/apt-get.cc:2515
+#: cmdline/apt-get.cc:2522
 #, c-format
 #, c-format
 msgid "Need to get %sB/%sB of source archives.\n"
 msgid "Need to get %sB/%sB of source archives.\n"
 msgstr ""
 msgstr ""
 
 
 #. TRANSLATOR: The required space between number and unit is already included
 #. TRANSLATOR: The required space between number and unit is already included
 #. in the replacement string, so %sB will be correctly translate in e.g. 1,5 MB
 #. in the replacement string, so %sB will be correctly translate in e.g. 1,5 MB
-#: cmdline/apt-get.cc:2520
+#: cmdline/apt-get.cc:2527
 #, c-format
 #, c-format
 msgid "Need to get %sB of source archives.\n"
 msgid "Need to get %sB of source archives.\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2526
+#: cmdline/apt-get.cc:2533
 #, c-format
 #, c-format
 msgid "Fetch source %s\n"
 msgid "Fetch source %s\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2564
+#: cmdline/apt-get.cc:2571
 msgid "Failed to fetch some archives."
 msgid "Failed to fetch some archives."
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2595
+#: cmdline/apt-get.cc:2602
 #, c-format
 #, c-format
 msgid "Skipping unpack of already unpacked source in %s\n"
 msgid "Skipping unpack of already unpacked source in %s\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2607
+#: cmdline/apt-get.cc:2614
 #, c-format
 #, c-format
 msgid "Unpack command '%s' failed.\n"
 msgid "Unpack command '%s' failed.\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2608
+#: cmdline/apt-get.cc:2615
 #, c-format
 #, c-format
 msgid "Check if the 'dpkg-dev' package is installed.\n"
 msgid "Check if the 'dpkg-dev' package is installed.\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2625
+#: cmdline/apt-get.cc:2637
 #, c-format
 #, c-format
 msgid "Build command '%s' failed.\n"
 msgid "Build command '%s' failed.\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2645
+#: cmdline/apt-get.cc:2657
 msgid "Child process failed"
 msgid "Child process failed"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2664
+#: cmdline/apt-get.cc:2676
 msgid "Must specify at least one package to check builddeps for"
 msgid "Must specify at least one package to check builddeps for"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2695
+#: cmdline/apt-get.cc:2701
+#, c-format
+msgid ""
+"No architecture information available for %s. See apt.conf(5) APT::"
+"Architectures for setup"
+msgstr ""
+
+#: cmdline/apt-get.cc:2718
 #, c-format
 #, c-format
 msgid "Unable to get build-dependency information for %s"
 msgid "Unable to get build-dependency information for %s"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2715
+#: cmdline/apt-get.cc:2738
 #, c-format
 #, c-format
 msgid "%s has no build depends.\n"
 msgid "%s has no build depends.\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2766
+#: cmdline/apt-get.cc:2868
+#, c-format
+msgid ""
+"%s dependency for %s can't be satisfied because %s is not allowed on '%s' "
+"packages"
+msgstr ""
+
+#: cmdline/apt-get.cc:2889
 #, c-format
 #, c-format
 msgid ""
 msgid ""
 "%s dependency for %s cannot be satisfied because the package %s cannot be "
 "%s dependency for %s cannot be satisfied because the package %s cannot be "
 "found"
 "found"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2819
+#: cmdline/apt-get.cc:2912
+#, c-format
+msgid "Failed to satisfy %s dependency for %s: Installed package %s is too new"
+msgstr ""
+
+#: cmdline/apt-get.cc:2951
 #, c-format
 #, c-format
 msgid ""
 msgid ""
-"%s dependency for %s cannot be satisfied because no available versions of "
-"package %s can satisfy version requirements"
+"%s dependency for %s cannot be satisfied because candidate version of "
+"package %s can't satisfy version requirements"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2855
+#: cmdline/apt-get.cc:2957
 #, c-format
 #, c-format
-msgid "Failed to satisfy %s dependency for %s: Installed package %s is too new"
+msgid ""
+"%s dependency for %s cannot be satisfied because package %s has no candidate "
+"version"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2882
+#: cmdline/apt-get.cc:2980
 #, c-format
 #, c-format
 msgid "Failed to satisfy %s dependency for %s: %s"
 msgid "Failed to satisfy %s dependency for %s: %s"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2898
+#: cmdline/apt-get.cc:2996
 #, c-format
 #, c-format
 msgid "Build-dependencies for %s could not be satisfied."
 msgid "Build-dependencies for %s could not be satisfied."
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2903
+#: cmdline/apt-get.cc:3001
 msgid "Failed to process build dependencies"
 msgid "Failed to process build dependencies"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2996 cmdline/apt-get.cc:3008
+#: cmdline/apt-get.cc:3094 cmdline/apt-get.cc:3106
 #, c-format
 #, c-format
 msgid "Changelog for %s (%s)"
 msgid "Changelog for %s (%s)"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:3127
+#: cmdline/apt-get.cc:3225
 msgid "Supported modules:"
 msgid "Supported modules:"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:3168
+#: cmdline/apt-get.cc:3266
 msgid ""
 msgid ""
 "Usage: apt-get [options] command\n"
 "Usage: apt-get [options] command\n"
 "       apt-get [options] install|remove pkg1 [pkg2 ...]\n"
 "       apt-get [options] install|remove pkg1 [pkg2 ...]\n"
@@ -1246,7 +1267,7 @@ msgid ""
 "                       This APT has Super Cow Powers.\n"
 "                       This APT has Super Cow Powers.\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:3330
+#: cmdline/apt-get.cc:3429
 msgid ""
 msgid ""
 "NOTE: This is only a simulation!\n"
 "NOTE: This is only a simulation!\n"
 "      apt-get needs root privileges for real execution.\n"
 "      apt-get needs root privileges for real execution.\n"
@@ -1539,8 +1560,8 @@ msgstr ""
 #. Only warn if there is no sources.list file.
 #. Only warn if there is no sources.list file.
 #: apt-inst/extract.cc:462 apt-pkg/contrib/cdromutl.cc:179
 #: apt-inst/extract.cc:462 apt-pkg/contrib/cdromutl.cc:179
 #: apt-pkg/contrib/fileutl.cc:343 apt-pkg/sourcelist.cc:204
 #: apt-pkg/contrib/fileutl.cc:343 apt-pkg/sourcelist.cc:204
-#: apt-pkg/sourcelist.cc:210 apt-pkg/acquire.cc:450 apt-pkg/init.cc:100
-#: apt-pkg/init.cc:108 apt-pkg/clean.cc:33 apt-pkg/policy.cc:314
+#: apt-pkg/sourcelist.cc:210 apt-pkg/acquire.cc:450 apt-pkg/init.cc:104
+#: apt-pkg/init.cc:112 apt-pkg/clean.cc:33 apt-pkg/policy.cc:352
 #: methods/mirror.cc:91
 #: methods/mirror.cc:91
 #, c-format
 #, c-format
 msgid "Unable to read %s"
 msgid "Unable to read %s"
@@ -1572,7 +1593,7 @@ msgstr ""
 
 
 #: apt-inst/deb/dpkgdb.cc:135 apt-pkg/pkgcachegen.cc:1048
 #: apt-inst/deb/dpkgdb.cc:135 apt-pkg/pkgcachegen.cc:1048
 #: apt-pkg/pkgcachegen.cc:1152 apt-pkg/pkgcachegen.cc:1158
 #: apt-pkg/pkgcachegen.cc:1152 apt-pkg/pkgcachegen.cc:1158
-#: apt-pkg/pkgcachegen.cc:1304
+#: apt-pkg/pkgcachegen.cc:1320
 msgid "Reading package lists"
 msgid "Reading package lists"
 msgstr ""
 msgstr ""
 
 
@@ -1933,34 +1954,28 @@ msgstr ""
 msgid "Unable to connect to %s:%s:"
 msgid "Unable to connect to %s:%s:"
 msgstr ""
 msgstr ""
 
 
-#. TRANSLATOR: %s is the trusted keyring parts directory
-#: methods/gpgv.cc:71
-#, c-format
-msgid "No keyring installed in %s."
-msgstr ""
-
-#: methods/gpgv.cc:163
+#: methods/gpgv.cc:166
 msgid ""
 msgid ""
 "Internal error: Good signature, but could not determine key fingerprint?!"
 "Internal error: Good signature, but could not determine key fingerprint?!"
 msgstr ""
 msgstr ""
 
 
-#: methods/gpgv.cc:168
+#: methods/gpgv.cc:171
 msgid "At least one invalid signature was encountered."
 msgid "At least one invalid signature was encountered."
 msgstr ""
 msgstr ""
 
 
-#: methods/gpgv.cc:172
+#: methods/gpgv.cc:175
 msgid "Could not execute 'gpgv' to verify signature (is gpgv installed?)"
 msgid "Could not execute 'gpgv' to verify signature (is gpgv installed?)"
 msgstr ""
 msgstr ""
 
 
-#: methods/gpgv.cc:177
+#: methods/gpgv.cc:180
 msgid "Unknown error executing gpgv"
 msgid "Unknown error executing gpgv"
 msgstr ""
 msgstr ""
 
 
-#: methods/gpgv.cc:211 methods/gpgv.cc:218
+#: methods/gpgv.cc:214 methods/gpgv.cc:221
 msgid "The following signatures were invalid:\n"
 msgid "The following signatures were invalid:\n"
 msgstr ""
 msgstr ""
 
 
-#: methods/gpgv.cc:225
+#: methods/gpgv.cc:228
 msgid ""
 msgid ""
 "The following signatures couldn't be verified because the public key is not "
 "The following signatures couldn't be verified because the public key is not "
 "available:\n"
 "available:\n"
@@ -2113,57 +2128,57 @@ msgstr ""
 msgid "Selection %s not found"
 msgid "Selection %s not found"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/configuration.cc:452
+#: apt-pkg/contrib/configuration.cc:465
 #, c-format
 #, c-format
 msgid "Unrecognized type abbreviation: '%c'"
 msgid "Unrecognized type abbreviation: '%c'"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/configuration.cc:510
+#: apt-pkg/contrib/configuration.cc:523
 #, c-format
 #, c-format
 msgid "Opening configuration file %s"
 msgid "Opening configuration file %s"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/configuration.cc:678
+#: apt-pkg/contrib/configuration.cc:691
 #, c-format
 #, c-format
 msgid "Syntax error %s:%u: Block starts with no name."
 msgid "Syntax error %s:%u: Block starts with no name."
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/configuration.cc:697
+#: apt-pkg/contrib/configuration.cc:710
 #, c-format
 #, c-format
 msgid "Syntax error %s:%u: Malformed tag"
 msgid "Syntax error %s:%u: Malformed tag"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/configuration.cc:714
+#: apt-pkg/contrib/configuration.cc:727
 #, c-format
 #, c-format
 msgid "Syntax error %s:%u: Extra junk after value"
 msgid "Syntax error %s:%u: Extra junk after value"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/configuration.cc:754
+#: apt-pkg/contrib/configuration.cc:767
 #, c-format
 #, c-format
 msgid "Syntax error %s:%u: Directives can only be done at the top level"
 msgid "Syntax error %s:%u: Directives can only be done at the top level"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/configuration.cc:761
+#: apt-pkg/contrib/configuration.cc:774
 #, c-format
 #, c-format
 msgid "Syntax error %s:%u: Too many nested includes"
 msgid "Syntax error %s:%u: Too many nested includes"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/configuration.cc:765 apt-pkg/contrib/configuration.cc:770
+#: apt-pkg/contrib/configuration.cc:778 apt-pkg/contrib/configuration.cc:783
 #, c-format
 #, c-format
 msgid "Syntax error %s:%u: Included from here"
 msgid "Syntax error %s:%u: Included from here"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/configuration.cc:774
+#: apt-pkg/contrib/configuration.cc:787
 #, c-format
 #, c-format
 msgid "Syntax error %s:%u: Unsupported directive '%s'"
 msgid "Syntax error %s:%u: Unsupported directive '%s'"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/configuration.cc:777
+#: apt-pkg/contrib/configuration.cc:790
 #, c-format
 #, c-format
 msgid "Syntax error %s:%u: clear directive requires an option tree as argument"
 msgid "Syntax error %s:%u: clear directive requires an option tree as argument"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/configuration.cc:827
+#: apt-pkg/contrib/configuration.cc:840
 #, c-format
 #, c-format
 msgid "Syntax error %s:%u: Extra junk at end of file"
 msgid "Syntax error %s:%u: Extra junk at end of file"
 msgstr ""
 msgstr ""
@@ -2306,7 +2321,7 @@ msgstr ""
 msgid "Sub-process %s exited unexpectedly"
 msgid "Sub-process %s exited unexpectedly"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/fileutl.cc:764
+#: apt-pkg/contrib/fileutl.cc:764 apt-pkg/indexcopy.cc:673
 #, c-format
 #, c-format
 msgid "Could not open file %s"
 msgid "Could not open file %s"
 msgstr ""
 msgstr ""
@@ -2576,7 +2591,7 @@ msgstr ""
 msgid "Unable to correct problems, you have held broken packages."
 msgid "Unable to correct problems, you have held broken packages."
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/algorithms.cc:1455 apt-pkg/algorithms.cc:1457
+#: apt-pkg/algorithms.cc:1464 apt-pkg/algorithms.cc:1466
 msgid ""
 msgid ""
 "Some index files failed to download. They have been ignored, or old ones "
 "Some index files failed to download. They have been ignored, or old ones "
 "used instead."
 "used instead."
@@ -2624,12 +2639,12 @@ msgstr ""
 msgid "Please insert the disc labeled: '%s' in the drive '%s' and press enter."
 msgid "Please insert the disc labeled: '%s' in the drive '%s' and press enter."
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/init.cc:143
+#: apt-pkg/init.cc:147
 #, c-format
 #, c-format
 msgid "Packaging system '%s' is not supported"
 msgid "Packaging system '%s' is not supported"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/init.cc:159
+#: apt-pkg/init.cc:163
 msgid "Unable to determine a suitable packaging system type"
 msgid "Unable to determine a suitable packaging system type"
 msgstr ""
 msgstr ""
 
 
@@ -2654,17 +2669,24 @@ msgstr ""
 msgid "The list of sources could not be read."
 msgid "The list of sources could not be read."
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/policy.cc:351
+#: apt-pkg/policy.cc:71
+#, c-format
+msgid ""
+"The value '%s' is invalid for APT::Default-Release as such a release is not "
+"available in the sources"
+msgstr ""
+
+#: apt-pkg/policy.cc:389
 #, c-format
 #, c-format
 msgid "Invalid record in the preferences file %s, no Package header"
 msgid "Invalid record in the preferences file %s, no Package header"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/policy.cc:373
+#: apt-pkg/policy.cc:411
 #, c-format
 #, c-format
 msgid "Did not understand pin type %s"
 msgid "Did not understand pin type %s"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/policy.cc:381
+#: apt-pkg/policy.cc:419
 msgid "No priority (or zero) specified for pin"
 msgid "No priority (or zero) specified for pin"
 msgstr ""
 msgstr ""
 
 
@@ -2753,7 +2775,7 @@ msgstr ""
 msgid "Collecting File Provides"
 msgid "Collecting File Provides"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/pkgcachegen.cc:1243 apt-pkg/pkgcachegen.cc:1250
+#: apt-pkg/pkgcachegen.cc:1259 apt-pkg/pkgcachegen.cc:1266
 msgid "IO Error saving source cache"
 msgid "IO Error saving source cache"
 msgstr ""
 msgstr ""
 
 
@@ -2948,22 +2970,22 @@ msgstr ""
 msgid "Source list entries for this disc are:\n"
 msgid "Source list entries for this disc are:\n"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/indexcopy.cc:270 apt-pkg/indexcopy.cc:909
+#: apt-pkg/indexcopy.cc:270 apt-pkg/indexcopy.cc:928
 #, c-format
 #, c-format
 msgid "Wrote %i records.\n"
 msgid "Wrote %i records.\n"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/indexcopy.cc:272 apt-pkg/indexcopy.cc:911
+#: apt-pkg/indexcopy.cc:272 apt-pkg/indexcopy.cc:930
 #, c-format
 #, c-format
 msgid "Wrote %i records with %i missing files.\n"
 msgid "Wrote %i records with %i missing files.\n"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/indexcopy.cc:275 apt-pkg/indexcopy.cc:914
+#: apt-pkg/indexcopy.cc:275 apt-pkg/indexcopy.cc:933
 #, c-format
 #, c-format
 msgid "Wrote %i records with %i mismatched files\n"
 msgid "Wrote %i records with %i mismatched files\n"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/indexcopy.cc:278 apt-pkg/indexcopy.cc:917
+#: apt-pkg/indexcopy.cc:278 apt-pkg/indexcopy.cc:936
 #, c-format
 #, c-format
 msgid "Wrote %i records with %i missing files and %i mismatched files\n"
 msgid "Wrote %i records with %i missing files and %i mismatched files\n"
 msgstr ""
 msgstr ""
@@ -2983,6 +3005,17 @@ msgstr ""
 msgid "Hash mismatch for: %s"
 msgid "Hash mismatch for: %s"
 msgstr ""
 msgstr ""
 
 
+#: apt-pkg/indexcopy.cc:677
+#, c-format
+msgid "File %s doesn't start with a clearsigned message"
+msgstr ""
+
+#. TRANSLATOR: %s is the trusted keyring parts directory
+#: apt-pkg/indexcopy.cc:708
+#, c-format
+msgid "No keyring installed in %s."
+msgstr ""
+
 #: apt-pkg/cacheset.cc:337
 #: apt-pkg/cacheset.cc:337
 #, c-format
 #, c-format
 msgid "Release '%s' for '%s' was not found"
 msgid "Release '%s' for '%s' was not found"

Разница между файлами не показана из-за своего большого размера
+ 519 - 416
po/ar.po


Разница между файлами не показана из-за своего большого размера
+ 533 - 420
po/ast.po


Разница между файлами не показана из-за своего большого размера
+ 535 - 421
po/bg.po


Разница между файлами не показана из-за своего большого размера
+ 515 - 415
po/bs.po


Разница между файлами не показана из-за своего большого размера
+ 620 - 631
po/ca.po


Разница между файлами не показана из-за своего большого размера
+ 529 - 420
po/cs.po


Разница между файлами не показана из-за своего большого размера
+ 527 - 420
po/cy.po


Разница между файлами не показана из-за своего большого размера
+ 531 - 420
po/da.po


Разница между файлами не показана из-за своего большого размера
+ 533 - 420
po/de.po


Разница между файлами не показана из-за своего большого размера
+ 523 - 420
po/dz.po


Разница между файлами не показана из-за своего большого размера
+ 524 - 419
po/el.po


Разница между файлами не показана из-за своего большого размера
+ 534 - 420
po/es.po


Разница между файлами не показана из-за своего большого размера
+ 524 - 419
po/eu.po


Разница между файлами не показана из-за своего большого размера
+ 524 - 419
po/fi.po


Разница между файлами не показана из-за своего большого размера
+ 536 - 420
po/fr.po


Разница между файлами не показана из-за своего большого размера
+ 596 - 559
po/gl.po


Разница между файлами не показана из-за своего большого размера
+ 526 - 419
po/hu.po


Разница между файлами не показана из-за своего большого размера
+ 597 - 562
po/it.po


Разница между файлами не показана из-за своего большого размера
+ 534 - 421
po/ja.po


Разница между файлами не показана из-за своего большого размера
+ 521 - 418
po/km.po


Разница между файлами не показана из-за своего большого размера
+ 533 - 420
po/ko.po


Разница между файлами не показана из-за своего большого размера
+ 515 - 415
po/ku.po


Разница между файлами не показана из-за своего большого размера
+ 521 - 419
po/lt.po


Разница между файлами не показана из-за своего большого размера
+ 521 - 418
po/mr.po


Разница между файлами не показана из-за своего большого размера
+ 530 - 421
po/nb.po


Разница между файлами не показана из-за своего большого размера
+ 521 - 418
po/ne.po


Разница между файлами не показана из-за своего большого размера
+ 526 - 419
po/nl.po


Разница между файлами не показана из-за своего большого размера
+ 522 - 419
po/nn.po


Разница между файлами не показана из-за своего большого размера
+ 526 - 419
po/pl.po


Разница между файлами не показана из-за своего большого размера
+ 533 - 420
po/pt.po


Разница между файлами не показана из-за своего большого размера
+ 526 - 419
po/pt_BR.po


Разница между файлами не показана из-за своего большого размера
+ 526 - 419
po/ro.po


Разница между файлами не показана из-за своего большого размера
+ 534 - 420
po/ru.po


Разница между файлами не показана из-за своего большого размера
+ 529 - 420
po/sk.po


Разница между файлами не показана из-за своего большого размера
+ 545 - 454
po/sl.po


Разница между файлами не показана из-за своего большого размера
+ 533 - 420
po/sv.po


Разница между файлами не показана из-за своего большого размера
+ 521 - 418
po/th.po


Разница между файлами не показана из-за своего большого размера
+ 526 - 419
po/tl.po


Разница между файлами не показана из-за своего большого размера
+ 524 - 419
po/uk.po


Разница между файлами не показана из-за своего большого размера
+ 529 - 420
po/vi.po


Разница между файлами не показана из-за своего большого размера
+ 528 - 422
po/zh_CN.po


Разница между файлами не показана из-за своего большого размера
+ 527 - 420
po/zh_TW.po


+ 48 - 3
test/integration/framework

@@ -151,6 +151,7 @@ setupenvironment() {
 
 
 configarchitecture() {
 configarchitecture() {
 	local CONFFILE=rootdir/etc/apt/apt.conf.d/01multiarch.conf
 	local CONFFILE=rootdir/etc/apt/apt.conf.d/01multiarch.conf
+	rm -f $CONFFILE
 	echo "APT::Architecture \"$1\";" > $CONFFILE
 	echo "APT::Architecture \"$1\";" > $CONFFILE
 	shift
 	shift
 	while [ -n "$1" ]; do
 	while [ -n "$1" ]; do
@@ -429,6 +430,27 @@ Filename: pool/main/${NAME}/${NAME}_${VERSION}_${arch}.deb" >> $FILE
 	done
 	done
 }
 }
 
 
+insertsource() {
+	local RELEASE="$1"
+	local NAME="$2"
+	local ARCH="$3"
+	local VERSION="$4"
+	local DEPENDENCIES="$5"
+	local ARCHS=""
+	local SPATH="aptarchive/dists/${RELEASE}/main/source"
+	mkdir -p $SPATH
+	local FILE="${SPATH}/Sources"
+	echo "Package: $NAME
+Binary: $NAME
+Version: $VERSION
+Maintainer: Joe Sixpack <joe@example.org>
+Architecture: $ARCH" >> $FILE
+	test -z "$DEPENDENCIES" || echo "$DEPENDENCIES" >> $FILE
+	echo "Files:
+ d41d8cd98f00b204e9800998ecf8427e 0 ${NAME}_${VERSION}.dsc
+ d41d8cd98f00b204e9800998ecf8427e 0 ${NAME}_${VERSION}.tar.gz" >> $FILE
+}
+
 insertinstalledpackage() {
 insertinstalledpackage() {
 	local NAME="$1"
 	local NAME="$1"
 	local ARCH="$2"
 	local ARCH="$2"
@@ -481,6 +503,10 @@ buildaptarchivefromfiles() {
 	generatereleasefiles
 	generatereleasefiles
 }
 }
 
 
+# can be overridden by testcases for their pleasure
+getcodenamefromsuite() { echo -n "$1"; }
+getreleaseversionfromsuite() { true; }
+
 generatereleasefiles() {
 generatereleasefiles() {
 	msgninfo "\tGenerate Release files… "
 	msgninfo "\tGenerate Release files… "
 	local DATE="${1:-now}"
 	local DATE="${1:-now}"
@@ -489,9 +515,22 @@ generatereleasefiles() {
 			aptftparchive -qq release $dir -o APT::FTPArchive::Release::Patterns::='Translation-*' > $dir/Index
 			aptftparchive -qq release $dir -o APT::FTPArchive::Release::Patterns::='Translation-*' > $dir/Index
 		done
 		done
 		for dir in $(find ./aptarchive/dists -mindepth 1 -maxdepth 1 -type d); do
 		for dir in $(find ./aptarchive/dists -mindepth 1 -maxdepth 1 -type d); do
-			local CODENAME="$(echo "$dir" | cut -d'/' -f 4)"
-			aptftparchive -qq release $dir -o APT::FTPArchive::Release::Suite="${CODENAME}" -o APT::FTPArchive::Release::Codename="${CODENAME}" | sed -e '/0 Release$/ d' > $dir/Release # remove the self reference
-			if [ "$CODENAME" = "experimental" -o "$CODENAME" = "experimental2" ]; then
+			local SUITE="$(echo "$dir" | cut -d'/' -f 4)"
+			local CODENAME="$(getcodenamefromsuite $SUITE)"
+			local VERSION="$(getreleaseversionfromsuite $SUITE)"
+			if [ -z "$VERSION" ]; then
+				aptftparchive -qq release $dir \
+					-o APT::FTPArchive::Release::Suite="${SUITE}" \
+					-o APT::FTPArchive::Release::Codename="${CODENAME}" \
+						| sed -e '/0 Release$/ d' > $dir/Release # remove the self reference
+			else
+				aptftparchive -qq release $dir \
+					-o APT::FTPArchive::Release::Suite="${SUITE}" \
+					-o APT::FTPArchive::Release::Codename="${CODENAME}" \
+					-o APT::FTPArchive::Release::Version="${VERSION}" \
+						| sed -e '/0 Release$/ d' > $dir/Release # remove the self reference
+			fi
+			if [ "$SUITE" = "experimental" -o "$SUITE" = "experimental2" ]; then
 				sed -i '/^Date: / a\
 				sed -i '/^Date: / a\
 NotAutomatic: yes' $dir/Release
 NotAutomatic: yes' $dir/Release
 			fi
 			fi
@@ -708,3 +747,9 @@ testmarkedauto() {
 	fi
 	fi
 	aptmark showauto 2>&1 | checkdiff $COMPAREFILE - && msgpass || msgfail
 	aptmark showauto 2>&1 | checkdiff $COMPAREFILE - && msgpass || msgfail
 }
 }
+
+pause() {
+	echo "STOPPED execution. Press enter to continue"
+	local IGNORE
+	read IGNORE
+}

+ 47 - 0
test/integration/test-bug-407511-fail-invalid-default-release

@@ -0,0 +1,47 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'i386'
+
+insertpackage 'unstable' 'cool' 'all' '1.0-1'
+
+getcodenamefromsuite() {
+	if [ "$SUITE" = 'unstable' ]; then
+		echo -n 'sid'
+	else
+		echo -n "$SUITE"
+	fi
+}
+getreleaseversionfromsuite() {
+	if [ "$SUITE" = 'unstable' ]; then
+		echo -n '42.0'
+	else
+		echo -n '0.8.15'
+	fi
+}
+
+setupaptarchive
+
+passdist() {
+	msgtest "Test that target-release is accepted" $1
+	aptget dist-upgrade -t $1 -qq && msgpass || msgfail
+}
+
+faildist() {
+	msgtest "Test that target-release is refused" $1
+	aptget dist-upgrade -t $1 -qq 2> /dev/null && msgfail || msgpass
+}
+
+passdist unstable
+passdist sid
+faildist sidd
+faildist stable
+passdist 42.0
+passdist 42.*
+passdist 42*
+passdist 4*.0
+faildist 21.0
+faildist 21*

+ 183 - 0
test/integration/test-bug-632221-cross-dependency-satisfaction

@@ -0,0 +1,183 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'amd64' 'armel'
+
+insertinstalledpackage 'build-essential' 'all' '11.5'
+
+insertpackage 'unstable' 'doxygen' 'amd64,armel' '1.0'
+insertpackage 'unstable' 'libc6' 'amd64,armel' '1.0' 'Multi-Arch: same'
+insertpackage 'unstable' 'libc6-dev' 'amd64,armel' '1.0' 'Depends: libc6
+Multi-Arch: same'
+insertpackage 'unstable' 'cool' 'amd64,armel' '1.0' 'Multi-Arch: allowed'
+insertpackage 'unstable' 'amdboot' 'amd64' '1.0'
+insertpackage 'unstable' 'foreigner' 'amd64,armel' '1.0' 'Multi-Arch: foreign'
+
+insertsource 'unstable' 'apt' 'any' '0.8.15' 'Build-Depends: doxygen, libc6-dev, libc6-dev:native, cool:any, amdboot:amd64, foreigner'
+
+setupaptarchive
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+  amdboot cool doxygen foreigner libc6 libc6-dev
+0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
+Inst amdboot (1.0 unstable [amd64])
+Inst cool (1.0 unstable [amd64])
+Inst doxygen (1.0 unstable [amd64])
+Inst foreigner (1.0 unstable [amd64])
+Inst libc6 (1.0 unstable [amd64])
+Inst libc6-dev (1.0 unstable [amd64])
+Conf amdboot (1.0 unstable [amd64])
+Conf cool (1.0 unstable [amd64])
+Conf doxygen (1.0 unstable [amd64])
+Conf foreigner (1.0 unstable [amd64])
+Conf libc6 (1.0 unstable [amd64])
+Conf libc6-dev (1.0 unstable [amd64])' aptget build-dep apt -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+  amdboot cool doxygen foreigner libc6 libc6:armel libc6-dev libc6-dev:armel
+0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
+Inst amdboot (1.0 unstable [amd64])
+Inst cool (1.0 unstable [amd64])
+Inst doxygen (1.0 unstable [amd64])
+Inst foreigner (1.0 unstable [amd64])
+Inst libc6:armel (1.0 unstable [armel])
+Inst libc6 (1.0 unstable [amd64])
+Inst libc6-dev:armel (1.0 unstable [armel])
+Inst libc6-dev (1.0 unstable [amd64])
+Conf amdboot (1.0 unstable [amd64])
+Conf cool (1.0 unstable [amd64])
+Conf doxygen (1.0 unstable [amd64])
+Conf foreigner (1.0 unstable [amd64])
+Conf libc6 (1.0 unstable [amd64])
+Conf libc6:armel (1.0 unstable [armel])
+Conf libc6-dev (1.0 unstable [amd64])
+Conf libc6-dev:armel (1.0 unstable [armel])' aptget build-dep apt -s -a armel
+
+configarchitecture 'armel' 'amd64'
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+  amdboot:amd64 cool doxygen foreigner libc6 libc6-dev
+0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
+Inst amdboot:amd64 (1.0 unstable [amd64])
+Inst cool (1.0 unstable [armel])
+Inst doxygen (1.0 unstable [armel])
+Inst foreigner (1.0 unstable [armel])
+Inst libc6 (1.0 unstable [armel])
+Inst libc6-dev (1.0 unstable [armel])
+Conf amdboot:amd64 (1.0 unstable [amd64])
+Conf cool (1.0 unstable [armel])
+Conf doxygen (1.0 unstable [armel])
+Conf foreigner (1.0 unstable [armel])
+Conf libc6 (1.0 unstable [armel])
+Conf libc6-dev (1.0 unstable [armel])' aptget build-dep apt -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+  amdboot:amd64 cool doxygen foreigner libc6:amd64 libc6 libc6-dev:amd64
+  libc6-dev
+0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
+Inst amdboot:amd64 (1.0 unstable [amd64])
+Inst cool (1.0 unstable [armel])
+Inst doxygen (1.0 unstable [armel])
+Inst foreigner (1.0 unstable [armel])
+Inst libc6 (1.0 unstable [armel])
+Inst libc6:amd64 (1.0 unstable [amd64])
+Inst libc6-dev (1.0 unstable [armel])
+Inst libc6-dev:amd64 (1.0 unstable [amd64])
+Conf amdboot:amd64 (1.0 unstable [amd64])
+Conf cool (1.0 unstable [armel])
+Conf doxygen (1.0 unstable [armel])
+Conf foreigner (1.0 unstable [armel])
+Conf libc6:amd64 (1.0 unstable [amd64])
+Conf libc6 (1.0 unstable [armel])
+Conf libc6-dev:amd64 (1.0 unstable [amd64])
+Conf libc6-dev (1.0 unstable [armel])' aptget build-dep apt -s -a amd64
+
+configarchitecture 'amd64' 'armel'
+
+insertinstalledpackage 'cool' 'amd64' '0.5'
+insertinstalledpackage 'foreigner' 'armel' '0.5'
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+  amdboot doxygen libc6 libc6-dev
+0 upgraded, 4 newly installed, 0 to remove and 2 not upgraded.
+Inst amdboot (1.0 unstable [amd64])
+Inst doxygen (1.0 unstable [amd64])
+Inst libc6 (1.0 unstable [amd64])
+Inst libc6-dev (1.0 unstable [amd64])
+Conf amdboot (1.0 unstable [amd64])
+Conf doxygen (1.0 unstable [amd64])
+Conf libc6 (1.0 unstable [amd64])
+Conf libc6-dev (1.0 unstable [amd64])' aptget build-dep apt -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+  amdboot doxygen libc6 libc6:armel libc6-dev libc6-dev:armel
+0 upgraded, 6 newly installed, 0 to remove and 2 not upgraded.
+Inst amdboot (1.0 unstable [amd64])
+Inst doxygen (1.0 unstable [amd64])
+Inst libc6:armel (1.0 unstable [armel])
+Inst libc6 (1.0 unstable [amd64])
+Inst libc6-dev:armel (1.0 unstable [armel])
+Inst libc6-dev (1.0 unstable [amd64])
+Conf amdboot (1.0 unstable [amd64])
+Conf doxygen (1.0 unstable [amd64])
+Conf libc6 (1.0 unstable [amd64])
+Conf libc6:armel (1.0 unstable [armel])
+Conf libc6-dev (1.0 unstable [amd64])
+Conf libc6-dev:armel (1.0 unstable [armel])' aptget build-dep apt -s -a armel
+
+configarchitecture 'armel' 'amd64'
+
+# cool 0.5 is not M-A: allowed, so amd64 is not acceptable
+testequal 'Reading package lists...
+Building dependency tree...
+The following packages will be REMOVED:
+  cool:amd64
+The following NEW packages will be installed:
+  amdboot:amd64 cool doxygen libc6 libc6-dev
+0 upgraded, 5 newly installed, 1 to remove and 1 not upgraded.
+Remv cool:amd64 [0.5]
+Inst amdboot:amd64 (1.0 unstable [amd64])
+Inst cool (1.0 unstable [armel])
+Inst doxygen (1.0 unstable [armel])
+Inst libc6 (1.0 unstable [armel])
+Inst libc6-dev (1.0 unstable [armel])
+Conf amdboot:amd64 (1.0 unstable [amd64])
+Conf cool (1.0 unstable [armel])
+Conf doxygen (1.0 unstable [armel])
+Conf libc6 (1.0 unstable [armel])
+Conf libc6-dev (1.0 unstable [armel])' aptget build-dep apt -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+  amdboot:amd64 doxygen libc6:amd64 libc6 libc6-dev:amd64 libc6-dev
+0 upgraded, 6 newly installed, 0 to remove and 2 not upgraded.
+Inst amdboot:amd64 (1.0 unstable [amd64])
+Inst doxygen (1.0 unstable [armel])
+Inst libc6 (1.0 unstable [armel])
+Inst libc6:amd64 (1.0 unstable [amd64])
+Inst libc6-dev (1.0 unstable [armel])
+Inst libc6-dev:amd64 (1.0 unstable [amd64])
+Conf amdboot:amd64 (1.0 unstable [amd64])
+Conf doxygen (1.0 unstable [armel])
+Conf libc6:amd64 (1.0 unstable [amd64])
+Conf libc6 (1.0 unstable [armel])
+Conf libc6-dev:amd64 (1.0 unstable [amd64])
+Conf libc6-dev (1.0 unstable [armel])' aptget build-dep apt -s -a amd64
+
+

+ 27 - 0
test/integration/test-bug-633350-do-not-kill-last-char-in-Release

@@ -0,0 +1,27 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'amd64'
+
+insertpackage 'unstable' 'cool' 'amd64' '1.0'
+
+setupaptarchive 2> /dev/null
+
+echo 'NotAutomatic: yes' >> aptarchive/dists/unstable/Release
+
+signreleasefiles
+find aptarchive/dists -name 'InRelease' -delete
+
+rm -rf rootdir/var/lib/apt/lists rootdir/var/cache/apt
+
+OUTPUT="$(aptget update 2>&1)"
+msgtest 'Check that parsing happens without warnings' 'with missing newline'
+if echo "${OUTPUT}" | grep '^W:' > /dev/null; then
+	msgfail
+	echo "${OUTPUT}"
+else
+	msgpass
+fi

+ 31 - 0
test/integration/test-ubuntu-bug-784473-InRelease-one-message-only

@@ -0,0 +1,31 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'i386'
+
+insertpackage 'unstable' 'apt' 'i386' '0.8.11'
+
+setupaptarchive
+
+rm -rf rootdir/var/lib/apt/lists
+
+find aptarchive/ -name 'Release.gpg' -delete
+find aptarchive/ -name 'InRelease' -exec cp {} {}.old \;
+
+for RELEASE in $(find aptarchive/ -name 'InRelease'); do
+	(echo 'Origin: Marvin
+Label: Marvin
+Suite: experimental
+Codename: experimental
+MD5Sum:
+ 65fd410587b6978de2277f2912523f09     9360 Packages
+ d27b294ed172a1fa9dd5a53949914c5d     4076 Packages.bz2
+ 2182897e0a2a0c09e760beaae117a015     2023 Packages.diff/Index
+ 1b895931853981ad8204d2439821b999     4144 Packages.gz'; echo; cat ${RELEASE}.old;) > ${RELEASE}
+done
+aptget update -qq > /dev/null 2> starts-with-unsigned.msg
+sed -i 's#File .*InRelease#File InRelease#' starts-with-unsigned.msg
+testfileequal starts-with-unsigned.msg "W: GPG error: file: unstable InRelease: File InRelease doesn't start with a clearsigned message"

+ 81 - 0
test/integration/test-ubuntu-bug-806274-install-suggests

@@ -0,0 +1,81 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture "i386"
+
+insertpackage 'unstable' 'apt' 'i386' '0.8.15' 'Depends: foo
+Recommends: bar
+Suggests: baz'
+insertpackage 'unstable' 'foo' 'i386' '1.0'
+insertpackage 'unstable' 'bar' 'i386' '1.0'
+insertpackage 'unstable' 'baz' 'i386' '1.0'
+
+setupaptarchive
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following extra packages will be installed:
+  bar foo
+Suggested packages:
+  baz
+The following NEW packages will be installed:
+  apt bar foo
+0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
+Inst foo (1.0 unstable [i386])
+Conf foo (1.0 unstable [i386])
+Inst apt (0.8.15 unstable [i386])
+Conf apt (0.8.15 unstable [i386])
+Inst bar (1.0 unstable [i386])
+Conf bar (1.0 unstable [i386])' aptget install apt -s --install-recommends --no-install-suggests
+
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following extra packages will be installed:
+  bar baz foo
+The following NEW packages will be installed:
+  apt bar baz foo
+0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
+Inst foo (1.0 unstable [i386])
+Conf foo (1.0 unstable [i386])
+Inst apt (0.8.15 unstable [i386])
+Conf apt (0.8.15 unstable [i386])
+Inst bar (1.0 unstable [i386])
+Inst baz (1.0 unstable [i386])
+Conf bar (1.0 unstable [i386])
+Conf baz (1.0 unstable [i386])' aptget install apt -s --install-recommends --install-suggests
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following extra packages will be installed:
+  foo
+Suggested packages:
+  baz
+Recommended packages:
+  bar
+The following NEW packages will be installed:
+  apt foo
+0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst foo (1.0 unstable [i386])
+Conf foo (1.0 unstable [i386])
+Inst apt (0.8.15 unstable [i386])
+Conf apt (0.8.15 unstable [i386])' aptget install apt -s --no-install-recommends --no-install-suggests
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following extra packages will be installed:
+  baz foo
+Recommended packages:
+  bar
+The following NEW packages will be installed:
+  apt baz foo
+0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
+Inst foo (1.0 unstable [i386])
+Conf foo (1.0 unstable [i386])
+Inst apt (0.8.15 unstable [i386])
+Conf apt (0.8.15 unstable [i386])
+Inst baz (1.0 unstable [i386])
+Conf baz (1.0 unstable [i386])' aptget install apt -s --no-install-recommends --install-suggests

+ 38 - 4
test/libapt/assert.h

@@ -1,9 +1,9 @@
 #include <iostream>
 #include <iostream>
 
 
-#define equals(x,y) assertEquals(x, y, __LINE__)
+#define equals(x,y) assertEquals(y, x, __LINE__)
 
 
 template < typename X, typename Y >
 template < typename X, typename Y >
-void OutputAssert(X expect, char const* compare, Y get, unsigned long const &line) {
+void OutputAssertEqual(X expect, char const* compare, Y get, unsigned long const &line) {
 	std::cerr << "Test FAILED: »" << expect << "« " << compare << " »" << get << "« at line " << line << std::endl;
 	std::cerr << "Test FAILED: »" << expect << "« " << compare << " »" << get << "« at line " << line << std::endl;
 }
 }
 
 
@@ -11,11 +11,45 @@ template < typename X, typename Y >
 void assertEquals(X expect, Y get, unsigned long const &line) {
 void assertEquals(X expect, Y get, unsigned long const &line) {
 	if (expect == get)
 	if (expect == get)
 		return;
 		return;
-	OutputAssert(expect, "==", get, line);
+	OutputAssertEqual(expect, "==", get, line);
 }
 }
 
 
 void assertEquals(unsigned int const &expect, int const &get, unsigned long const &line) {
 void assertEquals(unsigned int const &expect, int const &get, unsigned long const &line) {
 	if (get < 0)
 	if (get < 0)
-		OutputAssert(expect, "==", get, line);
+		OutputAssertEqual(expect, "==", get, line);
 	assertEquals<unsigned int const&, unsigned int const&>(expect, get, line);
 	assertEquals<unsigned int const&, unsigned int const&>(expect, get, line);
 }
 }
+
+void assertEquals(int const &expect, unsigned int const &get, unsigned long const &line) {
+	if (expect < 0)
+		OutputAssertEqual(expect, "==", get, line);
+	assertEquals<unsigned int const&, unsigned int const&>(expect, get, line);
+}
+
+
+#define equalsOr2(x,y,z) assertEqualsOr2(y, z, x, __LINE__)
+
+template < typename X, typename Y >
+void OutputAssertEqualOr2(X expect1, X expect2, char const* compare, Y get, unsigned long const &line) {
+	std::cerr << "Test FAILED: »" << expect1 << "« or »" << expect2 << "« " << compare << " »" << get << "« at line " << line << std::endl;
+}
+
+template < typename X, typename Y >
+void assertEqualsOr2(X expect1, X expect2, Y get, unsigned long const &line) {
+	if (expect1 == get || expect2 == get)
+		return;
+	OutputAssertEqualOr2(expect1, expect2, "==", get, line);
+}
+
+void assertEqualsOr2(unsigned int const &expect1, unsigned int const &expect2, int const &get, unsigned long const &line) {
+	if (get < 0)
+		OutputAssertEqualOr2(expect1, expect2, "==", get, line);
+	assertEqualsOr2<unsigned int const&, unsigned int const&>(expect1, expect2, get, line);
+}
+
+void assertEqualsOr2(int const &expect1, int const &expect2, unsigned int const &get, unsigned long const &line) {
+	if (expect1 < 0 && expect2 < 0)
+		OutputAssertEqualOr2(expect1, expect2, "==", get, line);
+	assertEqualsOr2<unsigned int const&, unsigned int const&>(expect1, expect2, get, line);
+}
+

+ 6 - 0
test/libapt/getarchitectures_test.cc

@@ -39,6 +39,12 @@ int main(int argc,char *argv[])
 	_config->Set("APT::Architecture", "armel");
 	_config->Set("APT::Architecture", "armel");
 	vec = APT::Configuration::getArchitectures(false);
 	vec = APT::Configuration::getArchitectures(false);
 	equals(vec.size(), 2);
 	equals(vec.size(), 2);
+	equals(vec[0], "armel");
+	equals(vec[1], "i386");
+
+	_config->Set("APT::Architectures::2", "armel");
+	vec = APT::Configuration::getArchitectures(false);
+	equals(vec.size(), 2);
 	equals(vec[0], "i386");
 	equals(vec[0], "i386");
 	equals(vec[1], "armel");
 	equals(vec[1], "armel");
 
 

+ 2 - 2
test/libapt/getlanguages_test.cc

@@ -138,8 +138,8 @@ int main(int argc,char *argv[])
 	equals(vec[1], "de");
 	equals(vec[1], "de");
 	equals(vec[2], "en");
 	equals(vec[2], "en");
 	equals(vec[3], "none");
 	equals(vec[3], "none");
-	equals(vec[4], "pt");
-	equals(vec[5], "tr");
+	equalsOr2(vec[4], "pt", "tr");
+	equalsOr2(vec[5], "tr", "pt");
 
 
 	_config->Set("Dir::State::lists", "/non-existing-dir");
 	_config->Set("Dir::State::lists", "/non-existing-dir");
 	_config->Set("Acquire::Languages::1", "none");
 	_config->Set("Acquire::Languages::1", "none");