diff options
-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 |