warning: unused parameter ‘foo’ [-Wunused-parameter]
[ntk/apt.git] / cmdline / apt-config.cc
index 3481eaf..26f0ea1 100644 (file)
@@ -8,7 +8,7 @@
    This program will parse a config file and then do something with it.
    
    Commands:
-     shell - Shell mode. After this a series of word pairs should occure.
+     shell - Shell mode. After this a series of word pairs should occur.
              The first is the environment var to set and the second is
              the key to set it from. Use like: 
  eval `apt-config shell QMode apt::QMode`
@@ -40,7 +40,7 @@ using namespace std;
 // DoShell - Handle the shell command                                  /*{{{*/
 // ---------------------------------------------------------------------
 /* */
-bool DoShell(CommandLine &CmdL)
+static bool DoShell(CommandLine &CmdL)
 {
    for (const char **I = CmdL.FileList + 1; *I != 0; I += 2)
    {
@@ -63,7 +63,7 @@ bool DoShell(CommandLine &CmdL)
 // DoDump - Dump the configuration space                               /*{{{*/
 // ---------------------------------------------------------------------
 /* */
-bool DoDump(CommandLine &CmdL)
+static bool DoDump(CommandLine &CmdL)
 {
    bool const empty = _config->FindB("APT::Config::Dump::EmptyValue", true);
    std::string const format = _config->Find("APT::Config::Dump::Format", "%f \"%v\";\n");
@@ -78,7 +78,7 @@ bool DoDump(CommandLine &CmdL)
 // ShowHelp - Show the help screen                                     /*{{{*/
 // ---------------------------------------------------------------------
 /* */
-bool ShowHelp(CommandLine &CmdL)
+static bool ShowHelp(CommandLine &)
 {
    ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
            COMMON_ARCH,__DATE__,__TIME__);
@@ -155,6 +155,11 @@ int main(int argc,const char *argv[])                                      /*{{{*/
         _config->Set(comp + "UncompressArg::", *a);
    }
 
+   std::vector<std::string> const profiles = APT::Configuration::getBuildProfiles();
+   _config->Clear("APT::Build-Profiles");
+   for (std::vector<std::string>::const_iterator p = profiles.begin(); p != profiles.end(); ++p)
+      _config->Set("APT::Build-Profiles::", *p);
+
    // Match the operation
    CmdL.DispatchArg(Cmds);