summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/pkgcache.cc17
-rw-r--r--debian/changelog3
2 files changed, 17 insertions, 3 deletions
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index 07d85377d..75f925991 100644
--- a/apt-pkg/pkgcache.cc
+++ b/apt-pkg/pkgcache.cc
@@ -893,11 +893,22 @@ pkgCache::DescIterator pkgCache::VerIterator::TranslatedDescription() const
{
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)
- 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();
diff --git a/debian/changelog b/debian/changelog
index 5a76bf00f..3725923ba 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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.
+ * 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