From 3e3dfc40aa9466ca49665c26cb970e5527c3fb4c Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 14 Oct 2011 15:27:46 +0200 Subject: * apt-pkg/pkgcache.cc: - always prefer "en" over "" for "en"-language regardless of cache-order (LP: #868977) --- apt-pkg/pkgcache.cc | 17 ++++++++++++++--- debian/changelog | 3 +++ 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 Fri, 14 Oct 2011 14:51:06 +0200 -- cgit v1.2.3