diff options
author | Julian Andres Klode <jak@debian.org> | 2021-01-27 15:17:01 +0000 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2021-01-27 15:17:01 +0000 |
commit | ce2fbbbcd5d81b4cfd60d2a277cbd9ee63d2c1e7 (patch) | |
tree | f4d2ff3d02d89317f0d829654e2b38c65df0bdec | |
parent | 4658cea8510037edfb8c41ad211407472d8d7e1b (diff) | |
parent | ccd952cc8793bc6b866f92912ef0bb51c42eb540 (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.cc | 2 | ||||
-rwxr-xr-x | test/integration/test-bug-490000-search-in-all-translations | 13 |
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 |