summaryrefslogtreecommitdiff
path: root/cmdline/apt-config.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-06-29 11:15:35 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2011-06-29 11:15:35 +0100
commitab30a600527ba467cda6474c3ab09d64fcbfacd6 (patch)
tree4d579c3e3abd25d65344373ddf30e923cf5e4862 /cmdline/apt-config.cc
parent9c76a88155c346666325339c5581a528d70b1f69 (diff)
parente449f717078978396b76a2fdae844196888d0211 (diff)
merged from debian-sid
Diffstat (limited to 'cmdline/apt-config.cc')
-rw-r--r--cmdline/apt-config.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/cmdline/apt-config.cc b/cmdline/apt-config.cc
index 9919a9c94..589ee7ada 100644
--- a/cmdline/apt-config.cc
+++ b/cmdline/apt-config.cc
@@ -20,6 +20,8 @@
#include <apt-pkg/error.h>
#include <apt-pkg/init.h>
#include <apt-pkg/strutl.h>
+#include <apt-pkg/configuration.h>
+#include <apt-pkg/aptconfiguration.h>
#include <config.h>
#include <apti18n.h>
@@ -27,6 +29,7 @@
#include <locale.h>
#include <iostream>
#include <string>
+#include <vector>
/*}}}*/
using namespace std;
@@ -119,6 +122,16 @@ int main(int argc,const char *argv[]) /*{{{*/
CmdL.FileSize() == 0)
return ShowHelp();
+ std::vector<std::string> const langs = APT::Configuration::getLanguages(true);
+ _config->Clear("Acquire::Languages");
+ for (std::vector<std::string>::const_iterator l = langs.begin(); l != langs.end(); ++l)
+ _config->Set("Acquire::Languages::", *l);
+
+ std::vector<std::string> const archs = APT::Configuration::getArchitectures();
+ _config->Clear("APT::Architectures");
+ for (std::vector<std::string>::const_iterator a = archs.begin(); a != archs.end(); ++a)
+ _config->Set("APT::Architectures::", *a);
+
// Match the operation
CmdL.DispatchArg(Cmds);