diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2011-10-05 22:45:22 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2011-10-05 22:45:22 +0200 |
commit | 7cb28948317e0d326c8663ec3c9ce995d5bf65e8 (patch) | |
tree | 42df84085ed6eaa11a035ae731a6ee545e2687ea /apt-pkg/deb/debmetaindex.cc | |
parent | 0fffbc8ce4cb6357f59db63db5571f46a668a66b (diff) |
* apt-pkg/deb/debmetaindex.cc:
- none is a separator, not a language: no need for Index (Closes: #624218)
* apt-pkg/aptconfiguration.cc:
- do not builtin languages only if none is forced (Closes: #643787)
Diffstat (limited to 'apt-pkg/deb/debmetaindex.cc')
-rw-r--r-- | apt-pkg/deb/debmetaindex.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc index c509c29c7..5d3a80aa5 100644 --- a/apt-pkg/deb/debmetaindex.cc +++ b/apt-pkg/deb/debmetaindex.cc @@ -13,6 +13,7 @@ #include <apt-pkg/error.h> #include <set> +#include <algorithm> using namespace std; @@ -201,7 +202,11 @@ vector <struct IndexTarget *>* debReleaseIndex::ComputeIndexTargets() const { } } - std::vector<std::string> const lang = APT::Configuration::getLanguages(true); + std::vector<std::string> lang = APT::Configuration::getLanguages(true); + std::vector<std::string>::iterator lend = std::remove(lang.begin(), lang.end(), "none"); + if (lend != lang.end()) + lang.erase(lend); + if (lang.empty() == true) return IndexTargets; @@ -213,7 +218,6 @@ vector <struct IndexTarget *>* debReleaseIndex::ComputeIndexTargets() const { s != sections.end(); ++s) { for (std::vector<std::string>::const_iterator l = lang.begin(); l != lang.end(); ++l) { - if (*l == "none") continue; IndexTarget * Target = new OptionalIndexTarget(); Target->ShortDesc = "Translation-" + *l; Target->MetaKey = TranslationIndexURISuffix(l->c_str(), *s); |