diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2011-10-14 15:46:37 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2011-10-14 15:46:37 +0200 |
commit | 957e8c1b62b212d32d3b437461384072ef0b2e9c (patch) | |
tree | 4abacf9e893279181114d58f961eefc5e02a28c1 /apt-pkg/pkgcache.cc | |
parent | cd16c01df411b182c0cfbaff3a12b36084a79e13 (diff) | |
parent | 3e3dfc40aa9466ca49665c26cb970e5527c3fb4c (diff) |
* apt-pkg/pkgcachegen.cc:
- 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)
Diffstat (limited to 'apt-pkg/pkgcache.cc')
-rw-r--r-- | apt-pkg/pkgcache.cc | 17 |
1 files changed, 14 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(); |