From 1e3f4083db29bba600b9725e9456b0e140975c99 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Sat, 22 Feb 2014 18:34:33 +0100 Subject: Fix typos in documentation (codespell) --- cmdline/apt-config.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmdline/apt-config.cc') diff --git a/cmdline/apt-config.cc b/cmdline/apt-config.cc index 3481eaf5f..30c2a22d5 100644 --- a/cmdline/apt-config.cc +++ b/cmdline/apt-config.cc @@ -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` -- cgit v1.2.3 From ce7f128c020e1347f91c6074238fc5da58c5df71 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 25 Feb 2014 14:26:18 +0100 Subject: support DEB_BUILD_PROFILES and -P for build profiles Inspired by the rest of the patch in 661537, but abstract the parsing of various ways of setting the build profiles more so it can potentially be reused and all apt parts have the same behaviour. Especially config options, cmdline options and environment will not be combined as proposed as this isn't APTs usual behaviour and dpkg doesn't do it either, so one overrides the other as it normally does. --- cmdline/apt-config.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cmdline/apt-config.cc') diff --git a/cmdline/apt-config.cc b/cmdline/apt-config.cc index 30c2a22d5..9f20b3c1b 100644 --- a/cmdline/apt-config.cc +++ b/cmdline/apt-config.cc @@ -155,6 +155,11 @@ int main(int argc,const char *argv[]) /*{{{*/ _config->Set(comp + "UncompressArg::", *a); } + std::vector const profiles = APT::Configuration::getBuildProfiles(); + _config->Clear("APT::Build-Profiles"); + for (std::vector::const_iterator p = profiles.begin(); p != profiles.end(); ++p) + _config->Set("APT::Build-Profiles::", *p); + // Match the operation CmdL.DispatchArg(Cmds); -- cgit v1.2.3 From c3ccac9232c2684b15f75fa8622a9a290aeca123 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 27 Feb 2014 03:11:54 +0100 Subject: warning: no previous declaration for foobar() [-Wmissing-declarations] Git-Dch: Ignore Reported-By: gcc -Wmissing-declarations --- cmdline/apt-config.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cmdline/apt-config.cc') diff --git a/cmdline/apt-config.cc b/cmdline/apt-config.cc index 9f20b3c1b..e83c4b64b 100644 --- a/cmdline/apt-config.cc +++ b/cmdline/apt-config.cc @@ -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 &CmdL) { ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION, COMMON_ARCH,__DATE__,__TIME__); -- cgit v1.2.3 From 655122418d714f342b5d9789f45f8035f3fe8b9a Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 1 Mar 2014 15:11:42 +0100 Subject: =?UTF-8?q?warning:=20unused=20parameter=20=E2=80=98foo=E2=80=99?= =?UTF-8?q?=20[-Wunused-parameter]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported-By: gcc -Wunused-parameter Git-Dch: Ignore --- cmdline/apt-config.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmdline/apt-config.cc') diff --git a/cmdline/apt-config.cc b/cmdline/apt-config.cc index e83c4b64b..26f0ea161 100644 --- a/cmdline/apt-config.cc +++ b/cmdline/apt-config.cc @@ -78,7 +78,7 @@ static bool DoDump(CommandLine &CmdL) // ShowHelp - Show the help screen /*{{{*/ // --------------------------------------------------------------------- /* */ -static 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__); -- cgit v1.2.3 From 453b82a388013e522b3a1b9fcd6ed0810dab1f4f Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 5 Mar 2014 22:11:25 +0100 Subject: cleanup headers and especially #includes everywhere Beside being a bit cleaner it hopefully also resolves oddball problems I have with high levels of parallel jobs. Git-Dch: Ignore Reported-By: iwyu (include-what-you-use) --- cmdline/apt-config.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmdline/apt-config.cc') diff --git a/cmdline/apt-config.cc b/cmdline/apt-config.cc index 26f0ea161..d95780c73 100644 --- a/cmdline/apt-config.cc +++ b/cmdline/apt-config.cc @@ -26,10 +26,10 @@ #include #include -#include #include #include #include +#include #include -- cgit v1.2.3 From 52922e2a6795aadcbb8dd11bba14db0f05da34c6 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 10 Mar 2014 15:12:11 +0100 Subject: cmdline parsing: apt-config is not apt-cdrom --- cmdline/apt-config.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmdline/apt-config.cc') diff --git a/cmdline/apt-config.cc b/cmdline/apt-config.cc index d95780c73..40ba468eb 100644 --- a/cmdline/apt-config.cc +++ b/cmdline/apt-config.cc @@ -108,7 +108,7 @@ int main(int argc,const char *argv[]) /*{{{*/ {"help",&ShowHelp}, {0,0}}; - std::vector Args = getCommandArgs("apt-cdrom", CommandLine::GetCommand(Cmds, argc, argv)); + std::vector Args = getCommandArgs("apt-config", CommandLine::GetCommand(Cmds, argc, argv)); // Set up gettext support setlocale(LC_ALL,""); -- cgit v1.2.3