[SCM] dpkg's main repository branch, master, updated. 1.16.0.2-55-gfa406fa

2011-04-29 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 531c81097d7aa5799f0a95d0353b1f1b334a6042
Author: Guillem Jover guil...@debian.org
Date:   Mon Apr 18 06:34:06 2011 +0200

dpkg: Refactor force flags to parsedb flags into parsedb_force_flags()

This will make it easier to convert new flags in the future.

diff --git a/src/processarc.c b/src/processarc.c
index 7a88cea..2ee685f 100644
--- a/src/processarc.c
+++ b/src/processarc.c
@@ -312,6 +312,17 @@ pkg_infodb_remove_file(const char *filename, const char 
*filetype)
   debug(dbg_scripts, removal_bulk info unlinked %s, filename);
 }
 
+static enum parsedbflags
+parsedb_force_flags(void)
+{
+  enum parsedbflags flags = 0;
+
+  if (fc_badversion)
+flags |= pdb_lax_version_parser;
+
+  return flags;
+}
+
 void process_archive(const char *filename) {
   static const struct tar_operations tf = {
 .read = tarfileread,
@@ -422,7 +433,7 @@ void process_archive(const char *filename) {
   strcpy(cidirrest,CONTROLFILE);
 
   parsedb(cidir, pdb_recordavailable | pdb_rejectstatus | pdb_ignorefiles |
-  fc_badversion ? pdb_lax_version_parser : 0, pkg);
+  parsedb_force_flags(), pkg);
   if (!pkg-files) {
 pkg-files= nfmalloc(sizeof(struct filedetails));
 pkg-files-next = NULL;

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



[SCM] dpkg's main repository branch, master, updated. 1.16.0.2-55-gfa406fa

2011-04-29 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 14340213c8df6215708f6b1dd01d7dea4e58fd14
Author: Guillem Jover guil...@debian.org
Date:   Wed Apr 27 07:50:59 2011 +0200

dpkg: Remove --new and --old dpkg-deb option handling

These have been non-functional for a long time, and were being treated
as dpkg commands which would conflict with the dpkg-deb commands.

diff --git a/debian/changelog b/debian/changelog
index 57ff227..df6eceb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -36,6 +36,8 @@ dpkg (1.16.1) UNRELEASED; urgency=low
 Based on a patch by Christopher Baines cbain...@gmail.com.
   * Document in dpkg-deb(1) that --fsys-tarfile will always process the
 input archive sequentially. Closes: #616609
+  * Remove long non-functional --new and --old dpkg-deb option handling
+from dpkg which were being treated as dpkg commands.
 
   [ Updated man page translations ]
   * German (Helge Kreutzmann).
diff --git a/man/dpkg.1 b/man/dpkg.1
index ce5e8a4..f0af1eb 100644
--- a/man/dpkg.1
+++ b/man/dpkg.1
@@ -482,10 +482,6 @@ Install a package even if it fails authenticity check.
 Ignore dependency-checking for specified packages (actually, checking is
 performed, but only warnings about conflicts are given, nothing else).
 .TP
-\fB\-\-new\fP, \fB\-\-old\fP
-Select new or old binary package format. This is a \fBdpkg\-deb\fP(1)
-option.
-.TP
 .B \-\-nocheck
 Don't read or check contents of control file while building a package.
 This is a \fBdpkg\-deb\fP(1) option.
diff --git a/src/main.c b/src/main.c
index fef8e40..000e589 100644
--- a/src/main.c
+++ b/src/main.c
@@ -601,8 +601,6 @@ static const struct cmdinfo cmdinfos[]= {
   ACTIONBACKEND( info,   'I', BACKEND),
   ACTIONBACKEND( field,  'f', BACKEND),
   ACTIONBACKEND( extract,'x', BACKEND),
-  ACTIONBACKEND( new,0,  BACKEND),
-  ACTIONBACKEND( old,0,  BACKEND),
   ACTIONBACKEND( vextract,   'X', BACKEND),
   ACTIONBACKEND( fsys-tarfile,   0,   BACKEND),
   { NULL,0,   0, NULL,  NULL,  NULL,  0 }

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



[SCM] dpkg's main repository branch, master, updated. 1.16.0.2-55-gfa406fa

2011-04-29 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 487a7a85a44e75d3bcd40e4e736e093eb74e0612
Author: Guillem Jover guil...@debian.org
Date:   Wed Apr 27 07:56:11 2011 +0200

dpkg(1): Remove reference to --nocheck dpkg-deb option

dpkg does not pass this option when running dpkg-deb.

diff --git a/debian/changelog b/debian/changelog
index df6eceb..7ed9a4b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -38,6 +38,8 @@ dpkg (1.16.1) UNRELEASED; urgency=low
 input archive sequentially. Closes: #616609
   * Remove long non-functional --new and --old dpkg-deb option handling
 from dpkg which were being treated as dpkg commands.
+  * Remove reference to --nocheck dpkg-deb option from dpkg man page as
+the latter does not pass it to the former.
 
   [ Updated man page translations ]
   * German (Helge Kreutzmann).
diff --git a/man/dpkg.1 b/man/dpkg.1
index f0af1eb..de39f38 100644
--- a/man/dpkg.1
+++ b/man/dpkg.1
@@ -482,10 +482,6 @@ Install a package even if it fails authenticity check.
 Ignore dependency-checking for specified packages (actually, checking is
 performed, but only warnings about conflicts are given, nothing else).
 .TP
-.B \-\-nocheck
-Don't read or check contents of control file while building a package.
-This is a \fBdpkg\-deb\fP(1) option.
-.TP
 \fB\-\-no\-act\fP, \fB\-\-dry\-run\fP, \fB\-\-simulate\fP
 Do everything which is supposed to be done, but don't write any
 changes. This is used to see what would happen with the specified

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



[SCM] dpkg's main repository branch, master, updated. 1.16.0.2-55-gfa406fa

2011-04-29 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 65eceb8eabc3e1547148af1072d695044ece97aa
Author: Guillem Jover guil...@debian.org
Date:   Wed Apr 27 08:10:23 2011 +0200

dpkg(1): Clarify the current dpkg behaviour when running the back-ends

When running the dpkg-deb and dpkg-query back-ends, dpkg does not pass
through back-end specific options.

Closes: #610940

diff --git a/debian/changelog b/debian/changelog
index 7ed9a4b..a3d252e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -40,6 +40,9 @@ dpkg (1.16.1) UNRELEASED; urgency=low
 from dpkg which were being treated as dpkg commands.
   * Remove reference to --nocheck dpkg-deb option from dpkg man page as
 the latter does not pass it to the former.
+  * Clarify the current dpkg behaviour when running the dpkg-deb and
+dpkg-query back-ends, of not passing through back-end specific options
+when running them from dpkg. Closes: #610940
 
   [ Updated man page translations ]
   * German (Helge Kreutzmann).
diff --git a/man/dpkg.1 b/man/dpkg.1
index de39f38..a6e0969 100644
--- a/man/dpkg.1
+++ b/man/dpkg.1
@@ -1,4 +1,4 @@
-.TH dpkg 1 2011-02-05 Debian Project dpkg suite
+.TH dpkg 1 2011-04-27 Debian Project dpkg suite
 .SH NAME
 dpkg \- package manager for Debian
 .
@@ -24,21 +24,12 @@ controlled entirely via command line parameters, which 
consist of exactly
 one action and zero or more options. The action-parameter tells \fBdpkg\fP
 what to do and options control the behavior of the action in some way.
 
-\fBdpkg\fP can also be used as a front-end to \fBdpkg\-deb\fP(1).
-The following
-are \fBdpkg\-deb\fP actions, and if they are encountered, \fBdpkg\fP
-just runs \fBdpkg\-deb\fP with the parameters given to it:
-.nf
-\fB\-b\fP, \fB\-\-build\fP,
-\fB\-c\fP, \fB\-\-contents\fP,
-\fB\-I\fP, \fB\-\-info\fP,
-\fB\-f\fP, \fB\-\-field\fP,
-\fB\-e\fP, \fB\-\-control\fP,
-\fB\-x\fP, \fB\-\-extract\fP,
-\fB\-X\fP, \fB\-\-vextract\fP, and
-\fB\-\-fsys\-tarfile\fP.
-.fi
-Please refer to \fBdpkg\-deb\fP(1) for information about these actions.
+\fBdpkg\fP can also be used as a front-end to \fBdpkg\-deb\fP(1) and
+\fBdpkg\-query\fP(1). The list of supported actions can be found later on
+in the \fBACTIONS\fP section. If any such action is encountered \fBdpkg\fP
+just runs \fBdpkg\-deb\fP or \fBdpkg\-query\fP with the parameters given
+to it, but no specific options are currently passed to them, to use
+any such option the back-ends need to be called directly.
 .
 .SH INFORMATION ABOUT PACKAGES
 \fBdpkg\fP maintains some usable information about available

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



[SCM] dpkg's main repository branch, master, updated. 1.16.0.2-55-gfa406fa

2011-04-29 Thread Guillem Jover
The following commit has been merged in the master branch:
commit bb19d944502d30b966dc5ec1664a19a0872800f2
Author: Guillem Jover guil...@debian.org
Date:   Thu Apr 28 03:22:38 2011 +0200

Fix typos in Vietnamese translation (deselect → dselect)

diff --git a/po/vi.po b/po/vi.po
index 36fc09d..4e05b3b 100644
--- a/po/vi.po
+++ b/po/vi.po
@@ -8,7 +8,7 @@ msgstr 
 Project-Id-Version: dpkg 1.15.8.5\n
 Report-Msgid-Bugs-To: debian-d...@lists.debian.org\n
 POT-Creation-Date: 2011-04-02 00:59+0200\n
-PO-Revision-Date: 2010-09-29 19:34+0930\n
+PO-Revision-Date: 2011-04-28 03:22+0200\n
 Last-Translator: Clytie Siddall cly...@riverland.net.au\n
 Language-Team: Vietnamese vi...@googlegroups.com\n
 Language: vi\n
@@ -2549,7 +2549,7 @@ msgstr 
 Những gói sau đang đợi chức năng xử lý các bộ gây nên\n
 chúng đã kích hoạt trong gói khác.\n
 Chức năng xử lý này có thể được yêu cầu dùng:\n
- • deselect\n
+ • dselect\n
  • dpkg --configure --pending\n
  • dpkg --triggers-only\n
 
@@ -2561,7 +2561,7 @@ msgid 
 msgstr 
 Những gói sau đã được gây nên, nhưng chưa xử lý bộ gây nên.\n
 Chức năng xử lý này có thể được yêu cầu dùng:\n
- • deselect\n
+ • dselect\n
  • dpkg --configure --pending\n
  • dpkg --triggers-only\n
 

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



[SCM] dpkg's main repository branch, master, updated. 1.16.0.2-55-gfa406fa

2011-04-29 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 8b9315219d7a4dbb8520427ceccd00cdfac55a77
Author: Guillem Jover guil...@debian.org
Date:   Thu Apr 28 03:38:10 2011 +0200

dpkg: Use “unselected” as an adjective instead of “deselected”

When being used as an adjective “unselected” is the correct word to use.

Closes: #231089

diff --git a/debian/changelog b/debian/changelog
index a3d252e..30d8fc9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -43,6 +43,8 @@ dpkg (1.16.1) UNRELEASED; urgency=low
   * Clarify the current dpkg behaviour when running the dpkg-deb and
 dpkg-query back-ends, of not passing through back-end specific options
 when running them from dpkg. Closes: #610940
+  * Use “unselected” as an adjective in dpkg output messages instead of
+“deselected”. Closes: #231089
 
   [ Updated man page translations ]
   * German (Helge Kreutzmann).
diff --git a/lib/dpkg/parse.c b/lib/dpkg/parse.c
index 21755e4..a611515 100644
--- a/lib/dpkg/parse.c
+++ b/lib/dpkg/parse.c
@@ -168,7 +168,7 @@ pkg_parse_verify(struct parsedb_state *ps,
   parse_must_have_field(ps, pkg, pkg-name, package name);
 
   /* XXX: We need to check for status != stat_halfinstalled as while
-   * unpacking a deselected package, it will not have yet all data in
+   * unpacking an unselected package, it will not have yet all data in
* place. But we cannot check for  stat_halfinstalled as stat_configfiles
* always should have those fields. */
   if ((ps-flags  pdb_recordavailable) ||
diff --git a/src/archives.c b/src/archives.c
index e76e1c6..4483842 100644
--- a/src/archives.c
+++ b/src/archives.c
@@ -1352,11 +1352,11 @@ wanttoinstall(struct pkginfo *pkg)
 
   if (pkg-want != want_install  pkg-want != want_hold) {
 if (f_alsoselect) {
-  printf(_(Selecting previously deselected package %s.\n), pkg-name);
+  printf(_(Selecting previously unselected package %s.\n), pkg-name);
   pkg-want = want_install;
   return true;
 } else {
-  printf(_(Skipping deselected package %s.\n), pkg-name);
+  printf(_(Skipping unselected package %s.\n), pkg-name);
   return false;
 }
   }

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



[SCM] dpkg's main repository branch, master, updated. 1.16.0.2-55-gfa406fa

2011-04-29 Thread Guillem Jover
The following commit has been merged in the master branch:
commit a41fb4e3364eae47d3379a69e3e041843f064f78
Author: Guillem Jover guil...@debian.org
Date:   Thu Apr 28 07:25:59 2011 +0200

Clarify exit status in dpkg-split and start-stop-daemon --help output

diff --git a/debian/changelog b/debian/changelog
index 30d8fc9..0521b98 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -45,6 +45,7 @@ dpkg (1.16.1) UNRELEASED; urgency=low
 when running them from dpkg. Closes: #610940
   * Use “unselected” as an adjective in dpkg output messages instead of
 “deselected”. Closes: #231089
+  * Clarify exit status in dpkg-split and start-stop-daemon --help output.
 
   [ Updated man page translations ]
   * German (Helge Kreutzmann).
diff --git a/dpkg-split/main.c b/dpkg-split/main.c
index 1f4eed9..860fca5 100644
--- a/dpkg-split/main.c
+++ b/dpkg-split/main.c
@@ -86,9 +86,14 @@ usage(const struct cmdinfo *cip, const char *value)
  package_version_arch.deb).\n
   -Q|--npquiet Be quiet when -a is not a part.\n
   --msdos  Generate 8.3 filenames.\n
-\n
-Exit status: 0 = OK;  1 = -a is not a part;  2 = trouble!\n),
- ADMINDIR, PARTSDIR);
+\n), ADMINDIR, PARTSDIR);
+
+  printf(_(
+Exit status:\n
+  0 = ok\n
+  1 = with --auto, file is not a part\n
+  2 = trouble\n));
+
 
   m_output(stdout, _(standard output));
 
diff --git a/utils/start-stop-daemon.c b/utils/start-stop-daemon.c
index 716f6a2..1bcd75a 100644
--- a/utils/start-stop-daemon.c
+++ b/utils/start-stop-daemon.c
@@ -420,8 +420,11 @@ usage(void)
 The IO scheduler class can be one of:\n
   real-time, best-effort or idle\n
 \n
-Exit status:  0 = done  1 = nothing done (= 0 if --oknodo)\n
-  3 = trouble   2 = with --retry, processes wouldn't die\n);
+Exit status:\n
+  0 = done\n
+  1 = nothing done (= 0 if --oknodo)\n
+  2 = with --retry, processes would not die\n
+  3 = trouble\n);
 }
 
 static void

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



[SCM] dpkg's main repository branch, master, updated. 1.16.0.2-55-gfa406fa

2011-04-29 Thread Guillem Jover
The following commit has been merged in the master branch:
commit ac41b5fef42683b4640b0bb746889100fb8a9a20
Author: Guillem Jover guil...@debian.org
Date:   Thu Apr 28 04:22:28 2011 +0200

s-s-d: Use a single action variable to track the command line actions

This makes it easier to add new commands w/o having to check for the
setting of any of the other action variables against each other.

diff --git a/utils/start-stop-daemon.c b/utils/start-stop-daemon.c
index 615ea35..716f6a2 100644
--- a/utils/start-stop-daemon.c
+++ b/utils/start-stop-daemon.c
@@ -137,11 +137,16 @@ enum {
IOPRIO_CLASS_IDLE,
 };
 
+enum action_code {
+   action_none,
+   action_start,
+   action_stop,
+};
+
+static enum action_code action;
 static int testmode = 0;
 static int quietmode = 0;
 static int exitnodo = 1;
-static int start = 0;
-static int stop = 0;
 static int background = 0;
 static int mpidfile = 0;
 static int signal_nr = SIGTERM;
@@ -709,6 +714,18 @@ parse_schedule(const char *schedule_str)
 }
 
 static void
+set_action(enum action_code new_action)
+{
+   if (action == new_action)
+   return;
+
+   if (action != action_none)
+   badusage(only one command can be specified);
+
+   action = new_action;
+}
+
+static void
 parse_options(int argc, char * const *argv)
 {
static struct option longopts[] = {
@@ -757,10 +774,10 @@ parse_options(int argc, char * const *argv)
usage();
exit(0);
case 'K':  /* --stop */
-   stop = 1;
+   set_action(action_stop);
break;
case 'S':  /* --start */
-   start = 1;
+   set_action(action_start);
break;
case 'V':  /* --version */
do_version();
@@ -859,7 +876,7 @@ parse_options(int argc, char * const *argv)
badusage(umask value must be a positive number);
}
 
-   if (start == stop)
+   if (action == action_none)
badusage(need one of --start or --stop);
 
if (!execname  !pidfile  !userspec  !cmdname)
@@ -875,15 +892,14 @@ parse_options(int argc, char * const *argv)
if (!startas)
startas = execname;
 
-   if (start  !startas)
+   if (action == action_start  !startas)
badusage(--start needs --exec or --startas);
 
if (mpidfile  pidfile == NULL)
badusage(--make-pidfile requires --pidfile);
 
-   if (background  !start)
+   if (background  action != action_start)
badusage(--background is only relevant with --start);
-
 }
 
 #if defined(OSHurd)
@@ -1165,7 +1181,7 @@ pid_check(pid_t pid)
return;
if (cmdname  !pid_is_cmd(pid, cmdname))
return;
-   if (start  !pid_is_running(pid))
+   if (action == action_start  !pid_is_running(pid))
return;
pid_list_push(found, pid);
 }
@@ -1538,7 +1554,7 @@ main(int argc, char **argv)
setenv(HOME, pw-pw_dir, 1);
}
 
-   if (stop) {
+   if (action == action_stop) {
int i = run_stop_schedule();
exit(i);
}

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



[SCM] dpkg's main repository branch, master, updated. 1.16.0.2-55-gfa406fa

2011-04-29 Thread Guillem Jover
The following commit has been merged in the master branch:
commit ad188eee157ac71a7e2a9be31eb6c61af7adae94
Author: Guillem Jover guil...@debian.org
Date:   Thu Apr 28 08:23:12 2011 +0200

man: Clarify “EXIT STATUS” sections by using bold and a table

Change the status codes to bold and list them with a table to makes
it easier to visually distinguish them.

diff --git a/debian/changelog b/debian/changelog
index 0521b98..69beec1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -46,6 +46,7 @@ dpkg (1.16.1) UNRELEASED; urgency=low
   * Use “unselected” as an adjective in dpkg output messages instead of
 “deselected”. Closes: #231089
   * Clarify exit status in dpkg-split and start-stop-daemon --help output.
+  * Clarify “EXIT STATUS” section in man pages by using a table.
 
   [ Updated man page translations ]
   * German (Helge Kreutzmann).
diff --git a/man/dpkg-query.1 b/man/dpkg-query.1
index c67b987..afc6fbc 100644
--- a/man/dpkg-query.1
+++ b/man/dpkg-query.1
@@ -1,4 +1,4 @@
-.TH dpkg\-query 1 2011-04-20 Debian Project dpkg suite
+.TH dpkg\-query 1 2011-04-28 Debian Project dpkg suite
 .SH NAME
 dpkg\-query \- a tool to query the dpkg database
 .
@@ -193,9 +193,11 @@ run:
 .fi
 .
 .SH EXIT STATUS
-.IP 0
+.TP
+.B 0
 The requested query was successfully performed.
-.IP 1
+.TP
+.B 1
 Problems were encountered while parsing the command line or performing the
 query, including no file or package being found (except for \-\-control\-path).
 .
diff --git a/man/dpkg-split.1 b/man/dpkg-split.1
index d4be24d..45654ad 100644
--- a/man/dpkg-split.1
+++ b/man/dpkg-split.1
@@ -1,5 +1,5 @@
 .\ Authors: Ian Jackson
-.TH dpkg\-split 1 2011-04-15 Debian Project dpkg utilities
+.TH dpkg\-split 1 2011-04-28 Debian Project dpkg utilities
 .SH NAME
 dpkg\-split \- Debian package archive split/join tool
 .
@@ -178,19 +178,22 @@ the form
 are generated.
 .
 .SH EXIT STATUS
-An exit status of 0 indicates that the requested split, merge, or
-other command succeeded.
+.TP
+.B 0
+The requested split, merge, or other command succeeded.
 .B \-\-info
 commands count as successful even if the files are not binary package
 parts.
-
-An exit status of 1 occurs only with
+.TP
+.B 1
+Only occurs with
 .B \-\-auto
 and indicates that the
 .I part
 file was not a binary package part.
-
-An exit status of 2 indicates some kind of trouble, such as a system
+.TP
+.B 2
+Some kind of trouble happened, such as a system
 call failure, a file that looked like a package part file but was
 corrupted, a usage error or some other problem.
 .
diff --git a/man/start-stop-daemon.8 b/man/start-stop-daemon.8
index a2ab55b..c7b34c9 100644
--- a/man/start-stop-daemon.8
+++ b/man/start-stop-daemon.8
@@ -1,4 +1,4 @@
-.TH start\-stop\-daemon 8 2011-03-04 Debian Project dpkg utilities
+.TH start\-stop\-daemon 8 2011-04-28 Debian Project dpkg utilities
 .SH NAME
 start\-stop\-daemon \- start and stop system daemon programs
 .
@@ -254,21 +254,31 @@ option.
 Print verbose informational messages.
 .
 .SH EXIT STATUS
-.B start\-stop\-daemon
-returns 0 if the requested action was performed, or if
+.TP
+.B 0
+The requested action was performed, or if
 .B \-\-oknodo
 is specified and either
 .B \-\-start
 was specified and a matching process was already running, or
 .B \-\-stop
-was specified and there were no matching processes. If
+was specified and there were no matching processes.
+.TP
+.B 1
+If
 .B \-\-oknodo
-was not specified and nothing was done, 1 is returned. If
+was not specified and nothing was done.
+.TP
+.B 2
+If
 .B \-\-stop
 and
 .B \-\-retry
 were specified, but the end of the schedule was reached and the processes were
-still running, the error value is 2. For all other errors, the status is 3.
+still running.
+.TP
+.B 3
+Any other error.
 .
 .SH EXAMPLE
 Start the \fBfood\fP daemon, unless one is already running (a process named
diff --git a/man/update-alternatives.8 b/man/update-alternatives.8
index b5683f1..f9f64d0 100644
--- a/man/update-alternatives.8
+++ b/man/update-alternatives.8
@@ -5,7 +5,7 @@
 .\ by the Free Software Foundation; either version 2 of the License, or
 .\ (at your option) any later version.  There is NO WARRANTY.  You can
 .\ find the GNU GPL in /usr/share/common-licenses/GPL on any Debian system.
-.TH update\-alternatives 8 2011-03-04 Debian Project dpkg utilities
+.TH update\-alternatives 8 2011-04-28 Debian Project dpkg utilities
 .SH NAME
 update\-alternatives \- maintain symbolic links determining default commands
 .
@@ -373,9 +373,11 @@ Can be overridden by the
 option.
 .
 .SH EXIT STATUS
-.IP 0
+.TP
+.B 0
 The requested action was successfully performed.
-.IP 2
+.TP
+.B 2
 Problems were encountered whilst parsing the command line
 or performing the action.
 .

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



[SCM] dpkg's main repository branch, master, updated. 1.16.0.2-55-gfa406fa

2011-04-29 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 5bced9fc3bc757ba5e4642d11422596667625dce
Author: Guillem Jover guil...@debian.org
Date:   Thu Apr 28 09:11:28 2011 +0200

s-s-d: Add LSB --status command to check for process status

The new command follows the LSB Init Script status action specification,
and returns exit codes accordingly.

diff --git a/debian/changelog b/debian/changelog
index 69beec1..106a2f8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -47,6 +47,8 @@ dpkg (1.16.1) UNRELEASED; urgency=low
 “deselected”. Closes: #231089
   * Clarify exit status in dpkg-split and start-stop-daemon --help output.
   * Clarify “EXIT STATUS” section in man pages by using a table.
+  * Add a --status command to start-stop-daemon returning LSB Init Script
+status action exit codes.
 
   [ Updated man page translations ]
   * German (Helge Kreutzmann).
diff --git a/man/start-stop-daemon.8 b/man/start-stop-daemon.8
index c7b34c9..310b9af 100644
--- a/man/start-stop-daemon.8
+++ b/man/start-stop-daemon.8
@@ -69,6 +69,10 @@ is specified, then
 .B start\-stop\-daemon
 will check that the process(es) have terminated.
 .TP
+.BR \-T ,  \-\-status
+Check for the existence of a specified process, and returns an exit status
+code, according to the LSB Init Script Actions.
+.TP
 .BR \-H ,  \-\-help
 Show usage information and exit.
 .TP
@@ -279,6 +283,21 @@ still running.
 .TP
 .B 3
 Any other error.
+.PP
+When using the \fB\-\-status\fP command, the following status codes are
+returned:
+.TP
+.B 0
+Program is running.
+.TP
+.B 1
+Program is not running and the pid file exists.
+.TP
+.B 3
+Program is not running.
+.TP
+.B 4
+Unable to determine program status.
 .
 .SH EXAMPLE
 Start the \fBfood\fP daemon, unless one is already running (a process named
diff --git a/utils/start-stop-daemon.c b/utils/start-stop-daemon.c
index 1bcd75a..e954a24 100644
--- a/utils/start-stop-daemon.c
+++ b/utils/start-stop-daemon.c
@@ -141,6 +141,7 @@ enum action_code {
action_none,
action_start,
action_stop,
+   action_status,
 };
 
 static enum action_code action;
@@ -177,6 +178,14 @@ static struct stat exec_stat;
 static struct proc_stat_list *procset = NULL;
 #endif
 
+/* LSB Init Script process status exit codes. */
+enum status_code {
+   status_ok = 0,
+   status_dead_pidfile = 1,
+   status_dead_lockfile = 2,
+   status_dead = 3,
+   status_unknown = 4,
+};
 
 struct pid_list {
struct pid_list *next;
@@ -238,7 +247,10 @@ fatal(const char *format, ...)
else
fprintf(stderr, \n);
 
-   exit(2);
+   if (action == action_status)
+   exit(status_unknown);
+   else
+   exit(2);
 }
 
 static void *
@@ -375,6 +387,7 @@ usage(void)
 Commands:\n
   -S|--start -- argument ...  start a program and pass arguments to it\n
   -K|--stop stop a program\n
+  -T|--status   get the program status\n
   -H|--help print help information\n
   -V|--version  print version\n
 \n
@@ -424,7 +437,12 @@ usage(void)
   0 = done\n
   1 = nothing done (= 0 if --oknodo)\n
   2 = with --retry, processes would not die\n
-  3 = trouble\n);
+  3 = trouble\n
+Exit status with --status:\n
+  0 = program is running\n
+  1 = program is not running and the pid file exists\n
+  3 = program is not running\n
+  4 = unable to determine status\n);
 }
 
 static void
@@ -441,7 +459,11 @@ badusage(const char *msg)
if (msg)
fprintf(stderr, %s: %s\n, progname, msg);
fprintf(stderr, Try '%s --help' for more information.\n, progname);
-   exit(3);
+
+   if (action == action_status)
+   exit(status_unknown);
+   else
+   exit(3);
 }
 
 struct sigpair {
@@ -735,6 +757,7 @@ parse_options(int argc, char * const *argv)
{ help, 0, NULL, 'H'},
{ stop, 0, NULL, 'K'},
{ start,0, NULL, 'S'},
+   { status,   0, NULL, 'T'},
{ version,  0, NULL, 'V'},
{ startas,  1, NULL, 'a'},
{ name, 1, NULL, 'n'},
@@ -768,7 +791,7 @@ parse_options(int argc, char * const *argv)
 
for (;;) {
c = getopt_long(argc, argv,
-   HKSVa:n:op:qr:s:tu:vx:c:N:P:I:k:bmR:g:d:,
+   HKSVTa:n:op:qr:s:tu:vx:c:N:P:I:k:bmR:g:d:,
longopts, NULL);
if (c == -1)
break;
@@ -782,6 +805,9 @@ parse_options(int argc, char * const *argv)
case 'S':  /* --start */
set_action(action_start);
break;
+   case 'T':  /* --status */
+   set_action(action_status);
+   break;
case 'V':  /* --version */

[SCM] dpkg's main repository branch, master, updated. 1.16.0.2-55-gfa406fa

2011-04-29 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 6de064f083117ed6944d629baf7b543818edcf30
Author: Guillem Jover guil...@debian.org
Date:   Thu Apr 28 09:44:20 2011 +0200

s-s-d: Add process name kernel limits for several systems

Specifically: Solaris, NetBSD, OpenBSD, FreeBSD and Darwin.

diff --git a/debian/changelog b/debian/changelog
index 106a2f8..4136af8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -49,6 +49,8 @@ dpkg (1.16.1) UNRELEASED; urgency=low
   * Clarify “EXIT STATUS” section in man pages by using a table.
   * Add a --status command to start-stop-daemon returning LSB Init Script
 status action exit codes.
+  * Add start-stop-daemon process name kernel limits for Solaris, NetBSD,
+OpenBSD, FreeBSD and Darwin.
 
   [ Updated man page translations ]
   * German (Helge Kreutzmann).
diff --git a/utils/start-stop-daemon.c b/utils/start-stop-daemon.c
index e954a24..2fba385 100644
--- a/utils/start-stop-daemon.c
+++ b/utils/start-stop-daemon.c
@@ -118,6 +118,16 @@
 #if defined(OSLinux)
 /* This comes from TASK_COMM_LEN defined in Linux's include/linux/sched.h. */
 #define PROCESS_NAME_SIZE 15
+#elif defined(OSsunos)
+#define PROCESS_NAME_SIZE 15
+#elif defined(OSDarwin)
+#define PROCESS_NAME_SIZE 16
+#elif defined(OSNetBSD)
+#define PROCESS_NAME_SIZE 16
+#elif defined(OSOpenBSD)
+#define PROCESS_NAME_SIZE 16
+#elif defined(OSFreeBSD)
+#define PROCESS_NAME_SIZE 19
 #endif
 
 #if defined(SYS_ioprio_set)  defined(linux)

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



[SCM] dpkg's main repository branch, master, updated. 1.16.0.2-55-gfa406fa

2011-04-29 Thread Guillem Jover
The following commit has been merged in the master branch:
commit d14c72ffee3ffd98b8ecb0b189f197b404b56a9e
Author: Guillem Jover guil...@debian.org
Date:   Fri Apr 29 07:20:53 2011 +0200

libdpkg: Move version module declarations to a new version.h

diff --git a/lib/dpkg/Makefile.am b/lib/dpkg/Makefile.am
index 59f7d52..04c4be9 100644
--- a/lib/dpkg/Makefile.am
+++ b/lib/dpkg/Makefile.am
@@ -98,4 +98,5 @@ pkginclude_HEADERS = \
tarfn.h \
trigdeferred.h \
triglib.h \
-   varbuf.h
+   varbuf.h \
+   version.h
diff --git a/lib/dpkg/dpkg-db.h b/lib/dpkg/dpkg-db.h
index 952fee5..86b2490 100644
--- a/lib/dpkg/dpkg-db.h
+++ b/lib/dpkg/dpkg-db.h
@@ -29,15 +29,10 @@
 
 #include dpkg/macros.h
 #include dpkg/varbuf.h
+#include dpkg/version.h
 
 DPKG_BEGIN_DECLS
 
-struct versionrevision {
-  unsigned long epoch;
-  const char *version;
-  const char *revision;
-};
-
 enum deptype {
   dep_suggests,
   dep_recommends,
@@ -244,7 +239,6 @@ void modstatdb_shutdown(void);
 
 void pkg_blank(struct pkginfo *pp);
 void pkgbin_blank(struct pkgbin *pifp);
-void blankversion(struct versionrevision*);
 bool pkg_is_informative(struct pkginfo *pkg, struct pkgbin *info);
 
 struct pkginfo *pkg_db_find(const char *name);
diff --git a/lib/dpkg/version.c b/lib/dpkg/version.c
index c7d8f68..9e7cc82 100644
--- a/lib/dpkg/version.c
+++ b/lib/dpkg/version.c
@@ -21,7 +21,7 @@
 #include config.h
 #include compat.h
 
-#include dpkg/dpkg-db.h
+#include dpkg/version.h
 
 void
 blankversion(struct versionrevision *version)
diff --git a/lib/dpkg/dir.h b/lib/dpkg/version.h
similarity index 69%
copy from lib/dpkg/dir.h
copy to lib/dpkg/version.h
index ad8fa83..3eb70f1 100644
--- a/lib/dpkg/dir.h
+++ b/lib/dpkg/version.h
@@ -1,8 +1,8 @@
 /*
  * libdpkg - Debian packaging suite library routines
- * dir.h - directory handling routines
+ * version.h - version handling routines
  *
- * Copyright © 2010 Guillem Jover guil...@debian.org
+ * Copyright © 1994,1995 Ian Jackson i...@chiark.greenend.org.uk
  *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -18,19 +18,21 @@
  * along with this program.  If not, see http://www.gnu.org/licenses/.
  */
 
-#ifndef LIBDPKG_DIR_H
-#define LIBDPKG_DIR_H
+#ifndef LIBDPKG_VERSION_H
+#define LIBDPKG_VERSION_H
 
 #include dpkg/macros.h
 
-#include dirent.h
-
 DPKG_BEGIN_DECLS
 
-void dir_sync_path(const char *path);
-void dir_sync_path_parent(const char *path);
-void dir_sync_contents(const char *path);
+struct versionrevision {
+   unsigned long epoch;
+   const char *version;
+   const char *revision;
+};
+
+void blankversion(struct versionrevision *version);
 
 DPKG_END_DECLS
 
-#endif /* LIBDPKG_DIR_H */
+#endif /* LIBDPKG_VERSION_H */

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



[SCM] dpkg's main repository branch, master, updated. 1.16.0.2-55-gfa406fa

2011-04-29 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 222996f8c64e6263384ae35331ed0d04cce3cbcc
Author: Guillem Jover guil...@debian.org
Date:   Fri Apr 29 07:19:29 2011 +0200

libdpkg: Move informativeversion() to the version module

diff --git a/lib/dpkg/dpkg-db.h b/lib/dpkg/dpkg-db.h
index 86b2490..1ddde86 100644
--- a/lib/dpkg/dpkg-db.h
+++ b/lib/dpkg/dpkg-db.h
@@ -287,8 +287,6 @@ extern const struct namevalue statusinfos[];
 extern const struct namevalue eflaginfos[];
 extern const struct namevalue wantinfos[];
 
-bool informativeversion(const struct versionrevision *version);
-
 enum versiondisplayepochwhen { vdew_never, vdew_nonambig, vdew_always };
 void varbufversion(struct varbuf*, const struct versionrevision*,
enum versiondisplayepochwhen);
diff --git a/lib/dpkg/parsehelp.c b/lib/dpkg/parsehelp.c
index dd9b20d..2b001fe 100644
--- a/lib/dpkg/parsehelp.c
+++ b/lib/dpkg/parsehelp.c
@@ -140,14 +140,6 @@ pkg_name_is_illegal(const char *p, const char **ep)
   return buf;
 }
 
-bool
-informativeversion(const struct versionrevision *version)
-{
-  return (version-epoch ||
-  (version-version  *version-version) ||
-  (version-revision  *version-revision));
-}
-
 void varbufversion
 (struct varbuf *vb,
  const struct versionrevision *version,
diff --git a/lib/dpkg/version.c b/lib/dpkg/version.c
index 9e7cc82..4bdf782 100644
--- a/lib/dpkg/version.c
+++ b/lib/dpkg/version.c
@@ -30,3 +30,11 @@ blankversion(struct versionrevision *version)
version-version = NULL;
version-revision = NULL;
 }
+
+bool
+informativeversion(const struct versionrevision *version)
+{
+   return (version-epoch ||
+   (version-version  *version-version) ||
+   (version-revision  *version-revision));
+}
diff --git a/lib/dpkg/version.h b/lib/dpkg/version.h
index 3eb70f1..c03ceb5 100644
--- a/lib/dpkg/version.h
+++ b/lib/dpkg/version.h
@@ -21,6 +21,8 @@
 #ifndef LIBDPKG_VERSION_H
 #define LIBDPKG_VERSION_H
 
+#include stdbool.h
+
 #include dpkg/macros.h
 
 DPKG_BEGIN_DECLS
@@ -32,6 +34,7 @@ struct versionrevision {
 };
 
 void blankversion(struct versionrevision *version);
+bool informativeversion(const struct versionrevision *version);
 
 DPKG_END_DECLS
 

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



[SCM] dpkg's main repository branch, master, updated. 1.16.0.2-55-gfa406fa

2011-04-29 Thread Guillem Jover
The following commit has been merged in the master branch:
commit fa406fa856d9ec898d171e51a6e6c5e5c9677d00
Author: Guillem Jover guil...@debian.org
Date:   Fri Apr 29 09:31:39 2011 +0200

dpkg: Move dpkg/tarfn.h inclusion from cleanup.c to archives.h

The former is not using any declarations from tarfn.h, but the latter
is.

diff --git a/src/archives.h b/src/archives.h
index 803aadd..eb0e468 100644
--- a/src/archives.h
+++ b/src/archives.h
@@ -23,6 +23,8 @@
 
 #include stdbool.h
 
+#include dpkg/tarfn.h
+
 struct tarcontext {
   int backendpipe;
   struct pkginfo *pkg;
diff --git a/src/cleanup.c b/src/cleanup.c
index 1adb551..91ffb2c 100644
--- a/src/cleanup.c
+++ b/src/cleanup.c
@@ -37,7 +37,6 @@
 #include dpkg/i18n.h
 #include dpkg/dpkg.h
 #include dpkg/dpkg-db.h
-#include dpkg/tarfn.h
 #include dpkg/myopt.h
 
 #include filesdb.h

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org