From 037454791fe7e59b33531b640ac0aced3b2ba6d7 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 6 Nov 2010 12:50:49 +0100 Subject: [PATCH 1/1] * apt-pkg/aptconfiguration.cc: - respect the none-force even in LANG=C (Closes: #602573) --- apt-pkg/aptconfiguration.cc | 3 ++- debian/changelog | 7 ++++++- test/libapt/getlanguages_test.cc | 6 ++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/apt-pkg/aptconfiguration.cc b/apt-pkg/aptconfiguration.cc index 44f1f318a..5cc9277e4 100644 --- a/apt-pkg/aptconfiguration.cc +++ b/apt-pkg/aptconfiguration.cc @@ -168,7 +168,8 @@ std::vector const Configuration::getLanguages(bool const &All, // first cornercase: LANG=C, so we use only "en" Translation if (envLong == "C") { - codes.push_back("en"); + if (_config->Find("Acquire::Languages","") != "none") + codes.push_back("en"); allCodes = codes; allCodes.insert(allCodes.end(), builtin.begin(), builtin.end()); if (All == true) diff --git a/debian/changelog b/debian/changelog index 6e0ec7137..ae547bcff 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,15 @@ apt (0.8.9) UNRELEASED; urgency=low + [ Christian Perrier ] * Fix "typos" in French manpages translations. Thanks to Cyril Brulebois for bashing me. * Drop useless untranslatable sections from apt.8 - -- Christian Perrier Sat, 30 Oct 2010 09:51:18 +0200 + [ David Kalnischkies ] + * apt-pkg/aptconfiguration.cc: + - respect the none-force even in LANG=C (Closes: #602573) + + -- David Kalnischkies Sat, 06 Nov 2010 12:50:20 +0100 apt (0.8.8) unstable; urgency=low diff --git a/test/libapt/getlanguages_test.cc b/test/libapt/getlanguages_test.cc index 9a8910b58..14f1af185 100644 --- a/test/libapt/getlanguages_test.cc +++ b/test/libapt/getlanguages_test.cc @@ -85,6 +85,12 @@ int main(int argc,char *argv[]) equals(vec.size(), 1); equals(vec[0], "en"); + _config->Set("Acquire::Languages", "none"); + env[0] = "C"; + vec = APT::Configuration::getLanguages(false, false, env); + equals(vec.size(), 0); + _config->Set("Acquire::Languages", ""); + _config->Set("Acquire::Languages::1", "environment"); _config->Set("Acquire::Languages::2", "en"); env[0] = "de_DE.UTF-8"; -- 2.45.2