summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2021-01-27 15:17:01 +0000
committerJulian Andres Klode <jak@debian.org>2021-01-27 15:17:01 +0000
commitce2fbbbcd5d81b4cfd60d2a277cbd9ee63d2c1e7 (patch)
treef4d2ff3d02d89317f0d829654e2b38c65df0bdec
parent4658cea8510037edfb8c41ad211407472d8d7e1b (diff)
parentccd952cc8793bc6b866f92912ef0bb51c42eb540 (diff)
Merge branch 'pu/include-all-translations' into 'master'
Include all translations when building the cache See merge request apt-team/apt!156
-rw-r--r--apt-pkg/deb/deblistparser.cc2
-rwxr-xr-xtest/integration/test-bug-490000-search-in-all-translations13
2 files changed, 14 insertions, 1 deletions
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index b5c9c066e..d0f0838d0 100644
--- a/apt-pkg/deb/deblistparser.cc
+++ b/apt-pkg/deb/deblistparser.cc
@@ -259,7 +259,7 @@ bool debListParser::NewVersion(pkgCache::VerIterator &Ver)
// ListParser::AvailableDescriptionLanguages /*{{{*/
std::vector<std::string> debListParser::AvailableDescriptionLanguages()
{
- std::vector<std::string> const understood = APT::Configuration::getLanguages();
+ std::vector<std::string> const understood = APT::Configuration::getLanguages(true);
std::vector<std::string> avail;
static constexpr int prefixLen = 12;
char buf[32] = "Description-";
diff --git a/test/integration/test-bug-490000-search-in-all-translations b/test/integration/test-bug-490000-search-in-all-translations
index 3a034bc49..26c16181b 100755
--- a/test/integration/test-bug-490000-search-in-all-translations
+++ b/test/integration/test-bug-490000-search-in-all-translations
@@ -62,6 +62,19 @@ setupaptarchive
#
# ===========================
+# ---- LP: #1907850 - check that we actually include the translations we have in the cache, even if config changed ---
+configure_languages en zz
+testsuccess aptcache showpkg ${PKG_NAME}
+cp rootdir/tmp/testsuccess.output showpkg.output
+
+testsuccess grep -qE Translation-zz showpkg.output
+rm rootdir/etc/apt/apt.conf.d/languages.conf
+rm rootdir/var/cache/apt/*.bin
+
+testsuccess aptcache showpkg ${PKG_NAME}
+cp rootdir/tmp/testsuccess.output showpkg.output
+testsuccess grep -qE Translation-zz showpkg.output
+
# ----------[ apt ]----------
# Test that all translations are searched, but the short