[cowdancer] 01/04: parameter.c: Sync options with upcoming pbuilder 0.228 release
James Clarke
jrtc27 at moszumanska.debian.org
Sun Jan 15 16:26:36 UTC 2017
This is an automated email from the git hooks/post-receive script.
jrtc27 pushed a commit to branch master
in repository cowdancer.
commit 105125bef704ec541ab1a24b4677cdda810d8990
Author: James Clarke <jrtc27 at jrtc27.com>
Date: Sun Jan 15 15:15:33 2017 +0000
parameter.c: Sync options with upcoming pbuilder 0.228 release
---
parameter.c | 65 ++++++++++++++++++++++++++++++++++++++++---------------------
1 file changed, 43 insertions(+), 22 deletions(-)
diff --git a/parameter.c b/parameter.c
index 4b408d3..48660dc 100644
--- a/parameter.c
+++ b/parameter.c
@@ -96,6 +96,26 @@ char* strdup_strip_quote(const char* p) {
return strdup(p);
}
+void parse_set_log_level(const char *str)
+{
+ if (!strcmp(str, "D"))
+ {
+ log_set_filter_level(log_debug);
+ }
+ else if (!strcmp(str, "I"))
+ {
+ log_set_filter_level(log_info);
+ }
+ else if (!strcmp(str, "W"))
+ {
+ log_set_filter_level(log_warn);
+ }
+ else if (!strcmp(str, "E"))
+ {
+ log_set_filter_level(log_error);
+ }
+}
+
/**
* load configuration.
*
@@ -134,22 +154,7 @@ int load_config_file(const char* config, pbuilderconfig* pc)
*(delim++)=0;
if (!strcmp(buf, "LOGLEVEL"))
{
- if (!strcmp(delim, "D"))
- {
- log_set_filter_level(log_debug);
- }
- else if (!strcmp(delim, "I"))
- {
- log_set_filter_level(log_info);
- }
- else if (!strcmp(delim, "W"))
- {
- log_set_filter_level(log_warn);
- }
- else if (!strcmp(delim, "E"))
- {
- log_set_filter_level(log_error);
- }
+ parse_set_log_level(delim);
}
else if (!strcmp(buf, "USECOLORS"))
{
@@ -404,6 +409,7 @@ int parse_parameter(int ac, char** av,
{"dumpconfig", no_argument, (int*)&(pc.operation), pbuilder_dumpconfig},
{"version", no_argument, 0, 'v'},
{"debug", no_argument, 0, 0},
+ {"loglevel", required_argument, 0, 0},
{"configfile", required_argument, 0, 'c'},
{"mirror", required_argument, 0, 0},
{"buildresult", required_argument, 0, 0},
@@ -431,21 +437,31 @@ int parse_parameter(int ac, char** av,
/* qemubuilder specific options */
{"arch-diskdevice", no_argument, 0, 0},
- /* verbatim options with argument, synced as of pbuilder 0.153 */
+ /* verbatim options with argument, synced as of pbuilder 0.228 */
+ {"use-network", required_argument, 0, 'M'},
+ {"host-arch", required_argument, 0, 'M'},
{"aptcache", required_argument, 0, 'M'},
{"debemail", required_argument, 0, 'M'},
+ {"profiles", required_argument, 0, 'M'},
{"logfile", required_argument, 0, 'M'},
{"aptconfdir", required_argument, 0, 'M'},
- {"keyring", required_argument, 0, 'M'},
{"timeout", required_argument, 0, 'M'},
+ {"bin-nmu", required_argument, 0, 'M'},
+ {"bin-nmu-maintainer", required_argument, 0, 'M'},
+ {"bin-nmu-version", required_argument, 0, 'M'},
+ {"bin-nmu-timestamp", required_argument, 0, 'M'},
+ {"keyring", required_argument, 0, 'M'},
{"bindmounts", required_argument, 0, 'M'},
- /* verbatim options without argument, synced as of pbuilder 0.153 */
+ /* verbatim options without argument, synced as of pbuilder 0.228 */
+ {"no-auto-cross", no_argument, 0, 'm'},
+ {"autocleanaptcache", no_argument, 0, 'm'},
{"removepackages", no_argument, 0, 'm'},
- {"override-config", no_argument, 0, 'm'},
{"pkgname-logfile", no_argument, 0, 'm'},
+ {"override-config", no_argument, 0, 'm'},
+ {"source-only-changes", no_argument, 0, 'm'},
{"preserve-buildplace", no_argument, 0, 'm'},
- {"autocleanaptcache", no_argument, 0, 'm'},
+ {"debdelta", no_argument, 0, 'm'},
{"twice", no_argument, 0, 'm'},
{0,0,0,0}
@@ -554,7 +570,12 @@ int parse_parameter(int ac, char** av,
exit (1);
}
- if (!strcmp(long_options[index_point].name,"mirror"))
+ if (!strcmp(long_options[index_point].name,"loglevel"))
+ {
+ parse_set_log_level(optarg);
+ PASS_TO_PBUILDER_WITH_PARAM
+ }
+ else if (!strcmp(long_options[index_point].name,"mirror"))
{
pc.mirror=strdup(optarg);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pbuilder/cowdancer.git
More information about the Pbuilder-maint
mailing list