aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2009-12-22 02:06:55 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2009-12-22 02:06:55 +0200
commit6f49d439216e3067d3f2994221edb8ea16e2c74e (patch)
tree515173740b95a06faee97f11c0b14270c7c26ea5 /src
parentb200591a7a85ddb90169b1791355af25b009fa1a (diff)
downloadwydawca-6f49d439216e3067d3f2994221edb8ea16e2c74e.tar.gz
wydawca-6f49d439216e3067d3f2994221edb8ea16e2c74e.tar.bz2
Fix documentation + minor changes.
* bootstrap.conf: Unconditionally update submodules. * configure.ac: Fix wording of an error message. * doc/Makefile.am (check-config) (check-sub-config): Fix regexps. * doc/wydawca.texi: Update. * src/cmdline.opt (selected_spools): New function, * src/config.c (spool_kw): Move "archive-signatures" to wydawca_kw. * src/wydawca.c (main): selected_spools implies cron_option. * src/wydawca.h (selected_spools): New proto.
Diffstat (limited to 'src')
-rw-r--r--src/cmdline.opt8
-rw-r--r--src/config.c5
-rw-r--r--src/job.c4
-rw-r--r--src/wydawca.c2
-rw-r--r--src/wydawca.h1
5 files changed, 14 insertions, 6 deletions
diff --git a/src/cmdline.opt b/src/cmdline.opt
index 3515072..116c3e5 100644
--- a/src/cmdline.opt
+++ b/src/cmdline.opt
@@ -27,6 +27,12 @@ string_eq (const void *elt1, const void *elt2)
}
int
+selected_spools ()
+{
+ return (source_list != NULL || tag_list != NULL);
+}
+
+int
enabled_spool_p (const struct spool *spool)
{
if (source_list || tag_list)
@@ -95,7 +101,7 @@ BEGIN
END
OPTION(spool,S,TAG,
- [<process only spool with the given tag>])
+ [<process only spool with the given tag (may be used multiple times)>])
BEGIN
if (!tag_list)
tag_list = gl_list_create_empty (&gl_linked_list_implementation,
diff --git a/src/config.c b/src/config.c
index 15c191c..c3b2e22 100644
--- a/src/config.c
+++ b/src/config.c
@@ -1177,8 +1177,6 @@ static struct grecs_keyword spool_kw[] = {
{ "archive", N_("type: string"), N_("Set up archivation"),
grecs_type_section, NULL, offsetof(struct spool, archive),
cb_archive, NULL, archive_kw },
- { "archive-signatures", NULL, N_("Control implicit signature archivation"),
- grecs_type_bool, &archive_signatures },
{ "notify-event", NULL, N_("Configure notification"),
grecs_type_section, NULL, offsetof(struct spool, notification),
cb_notify_event, NULL, notify_event_kw },
@@ -1428,6 +1426,9 @@ static struct grecs_keyword wydawca_kw[] = {
{ "umask", N_("mask: octal"), N_("Set umask"),
grecs_type_string, NULL, 0, cb_set_umask },
+ { "archive-signatures", NULL, N_("Control implicit signature archivation"),
+ grecs_type_bool, &archive_signatures },
+
{ "statistics", N_("items"), N_("Print these stats at the end of run"),
grecs_type_string, &print_stats, 0, cb_statistics },
diff --git a/src/job.c b/src/job.c
index b9ac620..6441c9f 100644
--- a/src/job.c
+++ b/src/job.c
@@ -86,8 +86,8 @@ wydawca_scanner (struct job *job)
rc = scan_all_spools (1, &job->uid);
else
{
- spool_create_timers ();
- rc = scan_spool (job->spool, 1, &job->uid);
+ spool_create_timers ();
+ rc = scan_spool (job->spool, 1, &job->uid);
}
timer_stop ("wydawca");
logstats ();
diff --git a/src/wydawca.c b/src/wydawca.c
index f098bb1..e5b66d4 100644
--- a/src/wydawca.c
+++ b/src/wydawca.c
@@ -318,7 +318,7 @@ main (int argc, char **argv)
if (lint_mode)
exit (0);
- if (dry_run_mode)
+ if (dry_run_mode || selected_spools ())
cron_option = 1;
if (cron_option)
daemon_mode = 0;
diff --git a/src/wydawca.h b/src/wydawca.h
index d9933d6..4dbe6c6 100644
--- a/src/wydawca.h
+++ b/src/wydawca.h
@@ -444,6 +444,7 @@ int process_directives (struct file_triplet *trp,
const struct spool *spool);
int enabled_spool_p (const struct spool *spool);
+int selected_spools (void);

Return to:

Send suggestions and report system problems to the System administrator.