[Pkg-ocaml-maint-commits] r1347 - in trunk/projects/approx: . debian
Eric Cooper
ecc-guest@costa.debian.org
Fri, 06 May 2005 13:06:59 +0000
Author: ecc-guest
Date: 2005-05-06 13:06:58 +0000 (Fri, 06 May 2005)
New Revision: 1347
Modified:
trunk/projects/approx/approx.8
trunk/projects/approx/approx.ml
trunk/projects/approx/debian/NEWS
trunk/projects/approx/debian/changelog
trunk/projects/approx/gc_approx.8
Log:
merged --error option with --foreground
Modified: trunk/projects/approx/approx.8
===================================================================
--- trunk/projects/approx/approx.8 2005-05-06 12:37:31 UTC (rev 1346)
+++ trunk/projects/approx/approx.8 2005-05-06 13:06:58 UTC (rev 1347)
@@ -33,13 +33,9 @@
.SH OPTIONS
.TP
-.BR \-e ", " \-\^\-error
-Messages are printed to standard error instead of the system log.
-.TP
.BR \-f ", " \-\^\-foreground
-The
-.B approx
-server runs in the foreground instead of detaching as a daemon.
+Run in the foreground instead of detaching as a daemon,
+and print messages to standard error instead of the system log.
.SH EXAMPLES
By default,
Modified: trunk/projects/approx/approx.ml
===================================================================
--- trunk/projects/approx/approx.ml 2005-05-06 12:37:31 UTC (rev 1346)
+++ trunk/projects/approx/approx.ml 2005-05-06 13:06:58 UTC (rev 1347)
@@ -12,36 +12,27 @@
prerr_endline "Usage: approx [options]";
prerr_endline "Proxy server for Debian archive files";
prerr_endline "Options:";
- prerr_endline " -e|--error log to stderr instead of syslog";
prerr_endline " -f|--foreground stay in foreground instead of detaching";
exit 1
-let use_stderr = ref false
let foreground = ref false
let () =
for i = 1 to Array.length Sys.argv - 1 do
match Sys.argv.(i) with
- | "-e" | "--error" -> use_stderr := true
| "-f" | "--foreground" -> foreground := true
| _ -> usage ()
done
-let prog = Filename.basename Sys.argv.(0)
-
-let log =
- if !use_stderr then
- None
+let print_message =
+ if !foreground then
+ prerr_endline
else
- Some (Syslog.openlog ~facility: `LOG_DAEMON prog)
+ let prog = Filename.basename Sys.argv.(0) in
+ let log = Syslog.openlog ~facility: `LOG_DAEMON prog in
+ Syslog.syslog log `LOG_INFO
-let message fmt =
- let print =
- match log with
- | Some conn -> Syslog.syslog conn `LOG_INFO
- | None -> prerr_endline
- in
- kprintf print fmt
+let message fmt = kprintf print_message fmt
let error_message = function
| Sys_error str ->
Modified: trunk/projects/approx/debian/NEWS
===================================================================
--- trunk/projects/approx/debian/NEWS 2005-05-06 12:37:31 UTC (rev 1346)
+++ trunk/projects/approx/debian/NEWS 2005-05-06 13:06:58 UTC (rev 1347)
@@ -1,7 +1,7 @@
approx (1.14) unstable; urgency=low
-The --foreground and --error options allow approx to be run more
-easily from the command line, a debugger, or the runit init scheme.
+The --foreground option allows approx to be run more easily from
+the command line, a debugger, or the runit init scheme.
-- Eric Cooper <ecc@cmu.edu> Thu, 5 May 2005 10:43:36 -0400
Modified: trunk/projects/approx/debian/changelog
===================================================================
--- trunk/projects/approx/debian/changelog 2005-05-06 12:37:31 UTC (rev 1346)
+++ trunk/projects/approx/debian/changelog 2005-05-06 13:06:58 UTC (rev 1347)
@@ -1,6 +1,6 @@
approx (1.14) unstable; urgency=low
- * added --foreground and --error options to approx (closes: #306898)
+ * added --foreground option to approx (closes: #306898)
-- Eric Cooper <ecc@cmu.edu> Thu, 5 May 2005 10:43:36 -0400
Modified: trunk/projects/approx/gc_approx.8
===================================================================
--- trunk/projects/approx/gc_approx.8 2005-05-06 12:37:31 UTC (rev 1346)
+++ trunk/projects/approx/gc_approx.8 2005-05-06 13:06:58 UTC (rev 1347)
@@ -36,13 +36,13 @@
.SH OPTIONS
.TP
.BR \-f ", " \-\^\-fast
-MD5 checksum validation is not performed.
+Don't perform MD5 checksum validation.
.TP
.BR \-k ", " \-\^\-keep
-Files are not removed from the cache.
+Don't remove files from the cache.
.TP
.BR \-q ", " \-\^\-quiet
-File names are not printed.
+Don't print file names.
.SH EXAMPLES
.IP