summaryrefslogtreecommitdiff
path: root/cmdline/apt-config.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2014-05-07 17:55:10 +0200
committerMichael Vogt <mvo@debian.org>2014-05-07 17:55:10 +0200
commit38d2959ffb8c6f5f291b2910014a67b1b352ab4c (patch)
treec5977b8f34aaf973ed3956952ec3ff43ac59f143 /cmdline/apt-config.cc
parentfce69e7a0f38299c57ef96ae1c1dd9a5379bfd5a (diff)
parent3fa4e98f62e469f4292d2811b4e15f4afb678fbd (diff)
Merge branch 'debian/sid' into debian/experimental
Conflicts: apt-pkg/cachefilter.h apt-pkg/contrib/fileutl.cc apt-pkg/contrib/netrc.h apt-pkg/deb/debsrcrecords.cc apt-pkg/init.h apt-pkg/pkgcache.cc debian/apt.install.in debian/changelog
Diffstat (limited to 'cmdline/apt-config.cc')
-rw-r--r--cmdline/apt-config.cc15
1 files changed, 10 insertions, 5 deletions
diff --git a/cmdline/apt-config.cc b/cmdline/apt-config.cc
index 30c2a22d5..40ba468eb 100644
--- a/cmdline/apt-config.cc
+++ b/cmdline/apt-config.cc
@@ -26,10 +26,10 @@
#include <apt-pkg/aptconfiguration.h>
#include <apt-pkg/pkgsystem.h>
-#include <locale.h>
#include <iostream>
#include <string>
#include <vector>
+#include <string.h>
#include <apt-private/private-cmndline.h>
@@ -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__);
@@ -108,7 +108,7 @@ int main(int argc,const char *argv[]) /*{{{*/
{"help",&ShowHelp},
{0,0}};
- std::vector<CommandLine::Args> Args = getCommandArgs("apt-cdrom", CommandLine::GetCommand(Cmds, argc, argv));
+ std::vector<CommandLine::Args> Args = getCommandArgs("apt-config", CommandLine::GetCommand(Cmds, argc, argv));
// Set up gettext support
setlocale(LC_ALL,"");
@@ -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);