summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-10-14 15:27:46 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2011-10-14 15:27:46 +0200
commit3e3dfc40aa9466ca49665c26cb970e5527c3fb4c (patch)
treeeac6145f22ba8b4006cbd988a4131baea3a22eb0
parentc9cc3fab3c71f64aaea1192711efc454f43a78b1 (diff)
* apt-pkg/pkgcache.cc:
- always prefer "en" over "" for "en"-language regardless of cache-order (LP: #868977)
-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