summaryrefslogtreecommitdiff
path: root/apt-pkg/aptconfiguration.cc
diff options
context:
space:
mode:
authorSteve Langasek <steve.langasek@canonical.com>2012-06-11 15:13:24 -0700
committerSteve Langasek <steve.langasek@canonical.com>2012-06-11 15:13:24 -0700
commit825098c2740b2d5ebea0c16c43685f55da201315 (patch)
treeb3a43f792cca021a79f541a9454e0223e4dca9cb /apt-pkg/aptconfiguration.cc
parent310ed3c13d5cfd2a3c46741539f652d69bda5d30 (diff)
parente08c5854bb9b5f352b0856533f95c12e858728ca (diff)
Merge version 0.9.6 from Debian
Diffstat (limited to 'apt-pkg/aptconfiguration.cc')
-rw-r--r--apt-pkg/aptconfiguration.cc26
1 files changed, 15 insertions, 11 deletions
diff --git a/apt-pkg/aptconfiguration.cc b/apt-pkg/aptconfiguration.cc
index d763546f8..d31ccb642 100644
--- a/apt-pkg/aptconfiguration.cc
+++ b/apt-pkg/aptconfiguration.cc
@@ -234,17 +234,21 @@ std::vector<std::string> const Configuration::getLanguages(bool const &All,
// override the configuration settings vector of languages.
string const forceLang = _config->Find("Acquire::Languages","");
if (forceLang.empty() == false) {
- if (forceLang == "environment") {
- codes = environment;
- } else if (forceLang != "none")
- codes.push_back(forceLang);
- else //if (forceLang == "none")
- builtin.clear();
- allCodes = codes;
- for (std::vector<string>::const_iterator b = builtin.begin();
- b != builtin.end(); ++b)
- if (std::find(allCodes.begin(), allCodes.end(), *b) == allCodes.end())
- allCodes.push_back(*b);
+ if (forceLang == "none") {
+ codes.clear();
+ allCodes.clear();
+ allCodes.push_back("none");
+ } else {
+ if (forceLang == "environment")
+ codes = environment;
+ else
+ codes.push_back(forceLang);
+ allCodes = codes;
+ for (std::vector<string>::const_iterator b = builtin.begin();
+ b != builtin.end(); ++b)
+ if (std::find(allCodes.begin(), allCodes.end(), *b) == allCodes.end())
+ allCodes.push_back(*b);
+ }
if (All == true)
return allCodes;
else