summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-10-12 22:28:46 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-10-12 22:28:46 +0200
commit0e7c33134cd32410eb8b344c6b6577826238bbbc (patch)
treec3084e6e2fe1383d9ba0d88c52135c1e2af8e3ba
parent5a8e963bbbbc689d7b1a1ebfa4ab5c6ec1f716bb (diff)
* apt-pkg/pkgcache.cc:
- always prefer "en" over "" for "en"-language regardless of cache-order
-rw-r--r--apt-pkg/pkgcache.cc17
-rw-r--r--debian/changelog4
2 files changed, 17 insertions, 4 deletions
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index 40b99891a..c854249e4 100644
--- a/apt-pkg/pkgcache.cc
+++ b/apt-pkg/pkgcache.cc
@@ -894,11 +894,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 52396e84c..bda786e12 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -28,6 +28,8 @@ apt (0.8.16~exp7) UNRELEASEDexperimental; urgency=low
This also means that descriptions are shared across archives now.
- add implicit dependencies needed for Multi-Arch at the time a Version
struct is created and not at the end of the cache generation
+ * apt-pkg/pkgcache.cc:
+ - always prefer "en" over "" for "en"-language regardless of cache-order
[ Michael Vogt ]
* apt-pkg/contrib/configuration.cc:
@@ -42,7 +44,7 @@ apt (0.8.16~exp7) UNRELEASEDexperimental; urgency=low
* ftparchive/cachedb.cc:
- fix buffersize in bytes2hex
- -- David Kalnischkies <kalnischkies@gmail.com> Wed, 12 Oct 2011 20:02:25 +0200
+ -- David Kalnischkies <kalnischkies@gmail.com> Wed, 12 Oct 2011 22:27:18 +0200
apt (0.8.16~exp6) experimental; urgency=low