summaryrefslogtreecommitdiff
path: root/apt-pkg/aptconfiguration.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2012-09-04 14:56:01 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2012-09-04 14:56:01 +0200
commit85909fca550d03b0e215d16cdd701190b43ff63c (patch)
treeb6767be7b1898830499b0a5fb8153460223b5649 /apt-pkg/aptconfiguration.cc
parentac5b5e826ab405935dc257c0a0984ae39b02bc23 (diff)
parent89e95aee05c7f2fde7eb11261df9697a4896b49b (diff)
merged sftp://bzr.debian.org/bzr/apt/apt/debian-sid
Diffstat (limited to 'apt-pkg/aptconfiguration.cc')
-rw-r--r--apt-pkg/aptconfiguration.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/apt-pkg/aptconfiguration.cc b/apt-pkg/aptconfiguration.cc
index d31ccb642..653775688 100644
--- a/apt-pkg/aptconfiguration.cc
+++ b/apt-pkg/aptconfiguration.cc
@@ -319,6 +319,17 @@ std::vector<std::string> const Configuration::getLanguages(bool const &All,
return codes;
}
/*}}}*/
+// checkLanguage - are we interested in the given Language? /*{{{*/
+bool const Configuration::checkLanguage(std::string Lang, bool const All) {
+ // the empty Language is always interesting as it is the original
+ if (Lang.empty() == true)
+ return true;
+ // filenames are encoded, so undo this
+ Lang = SubstVar(Lang, "%5f", "_");
+ std::vector<std::string> const langs = getLanguages(All, true);
+ return (std::find(langs.begin(), langs.end(), Lang) != langs.end());
+}
+ /*}}}*/
// getArchitectures - Return Vector of prefered Architectures /*{{{*/
std::vector<std::string> const Configuration::getArchitectures(bool const &Cached) {
using std::string;