]> git.saurik.com Git - apt.git/commitdiff
* apt-pkg/pkgcache.cc:
authorMichael Vogt <michael.vogt@ubuntu.com>
Fri, 14 Oct 2011 13:27:46 +0000 (15:27 +0200)
committerMichael Vogt <michael.vogt@ubuntu.com>
Fri, 14 Oct 2011 13:27:46 +0000 (15:27 +0200)
  - always prefer "en" over "" for "en"-language regardless of cache-order
    (LP: #868977)

apt-pkg/pkgcache.cc
debian/changelog

index 07d85377d9b9dbb18f54e153e91a107e74a15a96..75f9259911b55154669108e960b7551e561df8c0 100644 (file)
@@ -893,11 +893,22 @@ pkgCache::DescIterator pkgCache::VerIterator::TranslatedDescription() const
    {
       pkgCache::DescIterator Desc = DescriptionList();
       for (; Desc.end() == false; ++Desc)
    {
       pkgCache::DescIterator Desc = DescriptionList();
       for (; Desc.end() == false; ++Desc)
-        if (*l == Desc.LanguageCode() ||
-            (*l == "en" && strcmp(Desc.LanguageCode(),"") == 0))
+        if (*l == Desc.LanguageCode())
            break;
       if (Desc.end() == true)
            break;
       if (Desc.end() == true)
-        continue;
+      {
+        if (*l == "en")
+        {
+           Desc = DescriptionList();
+           for (; Desc.end() == false; ++Desc)
+              if (strcmp(Desc.LanguageCode(), "") == 0)
+                 break;
+           if (Desc.end() == true)
+              continue;
+        }
+        else
+           continue;
+      }
       return Desc;
    }
    for (pkgCache::DescIterator Desc = DescriptionList();
       return Desc;
    }
    for (pkgCache::DescIterator Desc = DescriptionList();
index 5a76bf00fa6194c6e4066971a8448c5b46fea948..3725923baba147c1ec34fd38553d79ecd3e629f4 100644 (file)
@@ -5,6 +5,9 @@ apt (868977) UNRELEASED; urgency=low
     - refactor MergeList by creating -Group, -Package and -Version specialist
     - share description list between "same" versions (LP: #868977)
       This also means that descriptions are shared across archives now.
     - refactor MergeList by creating -Group, -Package and -Version specialist
     - share description list between "same" versions (LP: #868977)
       This also means that descriptions are shared across archives now.
+  * apt-pkg/pkgcache.cc:
+    - always prefer "en" over "" for "en"-language regardless of cache-order
+      (LP: #868977)
 
  -- Michael Vogt <michael.vogt@ubuntu.com>  Fri, 14 Oct 2011 14:51:06 +0200
 
 
  -- Michael Vogt <michael.vogt@ubuntu.com>  Fri, 14 Oct 2011 14:51:06 +0200