]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt-config.cc
remove fake-status leftover from the python-test
[apt.git] / cmdline / apt-config.cc
index 63fa0867c256b2fbd026e41dd71a9c8f1323b1cb..589ee7ada62a5d68cc3b47676d2f5ae7e9110a63 100644 (file)
@@ -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;
 
@@ -88,8 +91,7 @@ int ShowHelp()
    return 0;
 }
                                                                        /*}}}*/
-
-int main(int argc,const char *argv[])
+int main(int argc,const char *argv[])                                  /*{{{*/
 {
    CommandLine::Args Args[] = {
       {'h',"help","help",0},
@@ -120,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);
    
@@ -133,3 +145,4 @@ int main(int argc,const char *argv[])
    
    return 0;
 }
+                                                                       /*}}}*/