]> git.saurik.com Git - apt.git/commitdiff
cherry pick from lp:~mvo/apt/mvo
authorMichael Vogt <michael.vogt@ubuntu.com>
Thu, 9 Jun 2011 11:42:24 +0000 (13:42 +0200)
committerMichael Vogt <michael.vogt@ubuntu.com>
Thu, 9 Jun 2011 11:42:24 +0000 (13:42 +0200)
apt-pkg/deb/debindexfile.cc
apt-pkg/deb/deblistparser.cc
debian/changelog

index 1e8c040333b028def25e8330b484ab4cb15ac035..c9e7f11767f295c48937759ccebaad49f4abc5bd 100644 (file)
@@ -423,12 +423,10 @@ string debTranslationsIndex::IndexURI(const char *Type) const
 /* */
 bool debTranslationsIndex::GetIndexes(pkgAcquire *Owner) const
 {
-   if (TranslationsAvailable()) {
-     string const TranslationFile = string("Translation-").append(Language);
-     new pkgAcqIndexTrans(Owner, IndexURI(Language),
-                         Info(TranslationFile.c_str()),
-                         TranslationFile);
-   }
+   string const TranslationFile = string("Translation-").append(Language);
+   new pkgAcqIndexTrans(Owner, IndexURI(Language),
+                        Info(TranslationFile.c_str()),
+                        TranslationFile);
 
    return true;
 }
@@ -468,9 +466,6 @@ string debTranslationsIndex::Info(const char *Type) const
                                                                        /*}}}*/
 bool debTranslationsIndex::HasPackages() const                         /*{{{*/
 {
-   if(!TranslationsAvailable())
-      return false;
-   
    return FileExists(IndexFile(Language));
 }
                                                                        /*}}}*/
@@ -510,7 +505,7 @@ bool debTranslationsIndex::Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const
 {
    // Check the translation file, if in use
    string TranslationFile = IndexFile(Language);
-   if (TranslationsAvailable() && FileExists(TranslationFile))
+   if (FileExists(TranslationFile))
    {
      FileFd Trans(TranslationFile,FileFd::ReadOnlyGzip);
      debListParser TransParser(&Trans);
index b59ae8896ac6a23d41e340edd083a8838d4ddfd5..ff6de2d9f44d173deb0de11e28227ece6de1865e 100644 (file)
@@ -201,7 +201,7 @@ string debListParser::DescriptionLanguage()
    if (Section.FindS("Description").empty() == false)
       return "";
 
-   std::vector<string> const lang = APT::Configuration::getLanguages();
+   std::vector<string> const lang = APT::Configuration::getLanguages(true);
    for (std::vector<string>::const_iterator l = lang.begin();
        l != lang.end(); l++)
       if (Section.FindS(string("Description-").append(*l).c_str()).empty() == false)
index 4b68ce78b5df97ad68849225e4449ba8f17de212..ecc6c13246fcfe305154d1341cb6c53621f0fc19 100644 (file)
@@ -1,3 +1,14 @@
+apt (0.8.14.1ubuntu7) UNRELEASED; urgency=low
+
+  [ Michael Vogt ]
+  * apt-pkg/deb/deblistparser.cc:
+    - include all known languages when building the apt cache
+      (LP: #794907)
+  * apt-pkg/deb/debindexfile.cc:
+    - remove some no longer valid checks for "TranslationsAvailable()"
+
+ -- Michael Vogt <michael.vogt@ubuntu.com>  Thu, 09 Jun 2011 12:01:42 +0200
+
 apt (0.8.14.1ubuntu6) oneiric; urgency=low
 
   [ Brian Murray ]