[SCM] dpkg's main repository branch, master, updated. 1.16.0.3-165-g01f081f

2011-07-07 Thread Helge Kreutzmann
The following commit has been merged in the master branch:
commit 01f081f28e88bc52a6609cd53ff1776c95a91c6d
Author: Helge Kreutzmann 
Date:   Thu Jul 7 22:42:03 2011 +0200

Update German scripts translation

Update to 518t

diff --git a/scripts/po/de.po b/scripts/po/de.po
index bb8010e..a092938 100644
--- a/scripts/po/de.po
+++ b/scripts/po/de.po
@@ -6,8 +6,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: dpkg-scripts\n"
 "Report-Msgid-Bugs-To: debian-d...@lists.debian.org\n"
-"POT-Creation-Date: 2011-06-12 12:02+\n"
-"PO-Revision-Date: 2011-06-12 14:04+0200\n"
+"POT-Creation-Date: 2011-07-07 20:35+\n"
+"PO-Revision-Date: 2011-07-07 22:40+0200\n"
 "Last-Translator: Helge Kreutzmann \n"
 "Language-Team: de \n"
 "Language: de\n"
@@ -23,7 +23,7 @@ msgstr ""
 #: scripts/dpkg-mergechangelogs.pl:53 scripts/dpkg-name.pl:46
 #: scripts/dpkg-parsechangelog.pl:31 scripts/dpkg-scanpackages.pl:60
 #: scripts/dpkg-scansources.pl:78 scripts/dpkg-shlibdeps.pl:533
-#: scripts/dpkg-source.pl:435 scripts/changelog/debian.pl:34
+#: scripts/dpkg-source.pl:440 scripts/changelog/debian.pl:34
 #, perl-format
 msgid "Debian %s version %s.\n"
 msgstr "Debian %s Version %s.\n"
@@ -42,7 +42,7 @@ msgstr ""
 #: scripts/dpkg-buildpackage.pl:46 scripts/dpkg-distaddfile.pl:38
 #: scripts/dpkg-genchanges.pl:102 scripts/dpkg-gencontrol.pl:62
 #: scripts/dpkg-gensymbols.pl:55 scripts/dpkg-parsechangelog.pl:37
-#: scripts/dpkg-shlibdeps.pl:542 scripts/dpkg-source.pl:442
+#: scripts/dpkg-shlibdeps.pl:542 scripts/dpkg-source.pl:447
 #: scripts/changelog/debian.pl:39
 msgid ""
 "\n"
@@ -515,7 +515,7 @@ msgstr "%s: Nicht erfüllte Bauabhängigkeiten: "
 msgid "%s: Build conflicts: "
 msgstr "%s: Baukonflikte: "
 
-#: scripts/dpkg-checkbuilddeps.pl:184 scripts/dpkg-source.pl:239
+#: scripts/dpkg-checkbuilddeps.pl:184 scripts/dpkg-source.pl:241
 #, perl-format
 msgid "error occurred while parsing %s"
 msgstr "Fehler beim Parsen von %s"
@@ -553,27 +553,27 @@ msgstr "genau ein Dateiname, Bereich und eine Priorität 
wird benötigt"
 msgid "filename, section and priority may contain no whitespace"
 msgstr "Dateiname, Bereich und Priorität dürfen keine Leerzeichen enthalten"
 
-#: scripts/dpkg-distaddfile.pl:79 scripts/dpkg-gencontrol.pl:333
+#: scripts/dpkg-distaddfile.pl:79 scripts/dpkg-gencontrol.pl:334
 msgid "open new files list file"
 msgstr "neue Dateienliste-Datei öffnen"
 
-#: scripts/dpkg-distaddfile.pl:84 scripts/dpkg-gencontrol.pl:344
+#: scripts/dpkg-distaddfile.pl:84 scripts/dpkg-gencontrol.pl:345
 msgid "copy old entry to new files list file"
 msgstr "alten Eintrag in neue Dateienlist-Datei kopieren"
 
-#: scripts/dpkg-distaddfile.pl:87 scripts/dpkg-gencontrol.pl:348
+#: scripts/dpkg-distaddfile.pl:87 scripts/dpkg-gencontrol.pl:349
 msgid "read old files list file"
 msgstr "alte Dateienliste-Datei lesen"
 
-#: scripts/dpkg-distaddfile.pl:90 scripts/dpkg-gencontrol.pl:358
+#: scripts/dpkg-distaddfile.pl:90 scripts/dpkg-gencontrol.pl:359
 msgid "write new entry to new files list file"
 msgstr "neuen Eintrag in neue Dateienliste-Datei schreiben"
 
-#: scripts/dpkg-distaddfile.pl:91 scripts/dpkg-gencontrol.pl:359
+#: scripts/dpkg-distaddfile.pl:91 scripts/dpkg-gencontrol.pl:360
 msgid "close new files list file"
 msgstr "neue Dateienliste-Datei schließen"
 
-#: scripts/dpkg-distaddfile.pl:93 scripts/dpkg-gencontrol.pl:360
+#: scripts/dpkg-distaddfile.pl:93 scripts/dpkg-gencontrol.pl:361
 msgid "install new files list file"
 msgstr "neue Dateienliste-Datei installieren"
 
@@ -733,7 +733,7 @@ msgstr "fehlender Bereich für Quelldateien"
 msgid "missing Priority for source files"
 msgstr "fehlende Priorität für Quelldateien"
 
-#: scripts/dpkg-genchanges.pl:398 scripts/dpkg-source.pl:329
+#: scripts/dpkg-genchanges.pl:398 scripts/dpkg-source.pl:334
 #: scripts/Dpkg/Vendor.pm:71
 #, perl-format
 msgid "%s is empty"
@@ -898,32 +898,32 @@ msgstr "fork kann für %s nicht ausgeführt werden"
 msgid "chdir for du to `%s'"
 msgstr "chdir nach »%s« für du"
 
-#: scripts/dpkg-gencontrol.pl:304 scripts/dpkg-shlibdeps.pl:843
+#: scripts/dpkg-gencontrol.pl:305 scripts/dpkg-shlibdeps.pl:843
 #: scripts/Dpkg/IPC.pm:271 scripts/Dpkg/Shlibs/Cppfilt.pm:50
 #, perl-format
 msgid "unable to execute %s"
 msgstr "%s konnte nicht ausgeführt werden"
 
-#: scripts/dpkg-gencontrol.pl:311
+#: scripts/dpkg-gencontrol.pl:312
 #, perl-format
 msgid "du in `%s'"
 msgstr "du in »%s«"
 
-#: scripts/dpkg-gencontrol.pl:313
+#: scripts/dpkg-gencontrol.pl:314
 #, perl-format
 msgid "du gave unexpected output `%s'"
 msgstr "du lieferte unerwartete Ausgabe »%s«"
 
-#: scripts/dpkg-gencontrol.pl:346
+#: scripts/dpkg-gencontrol.pl:347
 msgid "close old files list file"
 msgstr "schließen der alten Dateienliste-Datei"
 
-#: scripts/dpkg-gencontrol.pl:368
+#: scripts/dpkg-gencontrol.pl:369
 #, perl-format
 msgid "cannot open new output control file `%s'"
 msgstr "neue Ausgabe-Steuerdatei »%s« kann nicht geöffnet werden"
 
-#: scripts/dpkg-gencontrol.pl:379
+#: scripts/dpkg-g

[SCM] dpkg's main repository branch, master, updated. 1.16.0.3-164-g9c39b85

2011-07-07 Thread Sven Joachim
The following commit has been merged in the master branch:
commit 9c39b853fe4354476714f34a2ea52f030500bbc6
Author: Sven Joachim 
Date:   Thu Jul 7 20:11:50 2011 +0200

build: Update po/POTFILES.in for renamed source file

Commit cf22cf6118035ab8ee5cc25e5298a987073c8dc8 broke 'make update-po'.

diff --git a/po/POTFILES.in b/po/POTFILES.in
index fc6961d..f8e4f9b 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -15,8 +15,8 @@ lib/dpkg/glob.c
 lib/dpkg/log.c
 lib/dpkg/md5.c
 lib/dpkg/mlib.c
-lib/dpkg/myopt.c
 lib/dpkg/nfmalloc.c
+lib/dpkg/options.c
 lib/dpkg/parse.c
 lib/dpkg/parsehelp.c
 lib/dpkg/path.c

-- 
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.3-163-g2d23326

2011-07-07 Thread Raphaël Hertzog
The following commit has been merged in the master branch:
commit 2d233269cbf8cc1529e0c49a8c03a8b2227d49ff
Author: Raphaël Hertzog 
Date:   Thu Jul 7 16:49:32 2011 +0200

dpkg-source(1): improve the description of --before-build & --after-build

diff --git a/debian/changelog b/debian/changelog
index 1d25bb8..7883cf0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -58,6 +58,8 @@ dpkg (1.16.1) UNRELEASED; urgency=low
 slave alternative. Closes: #631547
   * Improve dpkg-source's logic to identify ignored files. Closes: #632168
   * Fix a small typo in dpkg-source(1). Closes: #632937
+  * Reword the description of dpkg-source --before-build and --after-build
+to be clearer. Closes: #608260
 
   [ Guillem Jover ]
   * Install deb-src-control(5) man pages in dpkg-dev. Closes: #620520
diff --git a/man/dpkg-source.1 b/man/dpkg-source.1
index c9b1b22..025f7db 100644
--- a/man/dpkg-source.1
+++ b/man/dpkg-source.1
@@ -71,20 +71,21 @@ with the same parameters).
 
 .TP
 .RI "\fB\-\-before\-build\fP " directory
-This command should be called before any build of the package
-(\fBdpkg\-buildpackage\fP calls it very early even before \fBdebian/rules
-clean\fP). This command should be idempotent and can be called multiple
-times. Not all source formats implement something in this hook, and those
-that do usually prepare the source tree for the build for example by
-ensuring that the Debian patches are applied.
+Run the corresponding hook of the source package format. This hook is
+called before any build of the package (\fBdpkg\-buildpackage\fP calls it
+very early even before \fBdebian/rules clean\fP). This command is
+idempotent and can be called multiple times. Not all source formats
+implement something in this hook, and those that do usually prepare the
+source tree for the build for example by ensuring that the Debian patches
+are applied.
 
 .TP
 .RI "\fB\-\-after\-build\fP " directory
-This command should be called after any build of the package
-(\fBdpkg\-buildpackage\fP calls it last). This command should be idempotent
-and can be called multiple times. Not all source formats implement
-something in this hook, and those that do usually use it to undo what
-\fB\-\-before\-build\fP has done.
+Run the corresponding hook of the source package format. This hook is
+called after any build of the package (\fBdpkg\-buildpackage\fP calls it
+last). This command is idempotent and can be called multiple times. Not
+all source formats implement something in this hook, and those that do
+usually use it to undo what \fB\-\-before\-build\fP has done.
 
 .TP
 .BR \-h ", " \-\-help

-- 
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.3-162-ge0ce9b4

2011-07-07 Thread Raphaël Hertzog
The following commit has been merged in the master branch:
commit e0ce9b4ac351a921de12bf0302cfa97f1c7251e2
Author: Raphaël Hertzog 
Date:   Thu Jul 7 16:09:33 2011 +0200

dpkg-source(1): fix a small typo

Replace ", under as" with "under". Add missing dot at the end of the
sentence.

Reported-by: "Barak A. Pearlmutter" 

diff --git a/debian/changelog b/debian/changelog
index 41607a6..1d25bb8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -57,6 +57,7 @@ dpkg (1.16.1) UNRELEASED; urgency=low
   * update-alternatives: do not allow to reuse a slave link in another
 slave alternative. Closes: #631547
   * Improve dpkg-source's logic to identify ignored files. Closes: #632168
+  * Fix a small typo in dpkg-source(1). Closes: #632937
 
   [ Guillem Jover ]
   * Install deb-src-control(5) man pages in dpkg-dev. Closes: #620520
diff --git a/man/dpkg-source.1 b/man/dpkg-source.1
index bb01523..c9b1b22 100644
--- a/man/dpkg-source.1
+++ b/man/dpkg-source.1
@@ -563,8 +563,8 @@ the cloned git repository.
 .PP
 Note that by default the new repository will have the same branch checked
 out that was checked out in the original source. (Typically "master", but
-it could be anything.) Any other branches will be available, under as
-`remotes/origin/`
+it could be anything.) Any other branches will be available under
+`remotes/origin/`.
 .PP
 .B Building
 .PP
diff --git a/man/po/de.po b/man/po/de.po
index 220a8d1..23c8301 100644
--- a/man/po/de.po
+++ b/man/po/de.po
@@ -14243,8 +14243,8 @@ msgstr ""
 msgid ""
 "Note that by default the new repository will have the same branch checked "
 "out that was checked out in the original source. (Typically \"master\", but "
-"it could be anything.) Any other branches will be available, under as "
-"`remotes/origin/`"
+"it could be anything.) Any other branches will be available under "
+"`remotes/origin/`."
 msgstr ""
 "Beachten Sie, dass standardmäßig im neuen Depot der gleiche Zweig "
 "ausgecheckt ist, der auch in der ursprünglichen Quelle ausgecheckt war "
diff --git a/man/po/dpkg-man.pot b/man/po/dpkg-man.pot
index 65f4730..93a1a17 100644
--- a/man/po/dpkg-man.pot
+++ b/man/po/dpkg-man.pot
@@ -10998,8 +10998,8 @@ msgstr ""
 msgid ""
 "Note that by default the new repository will have the same branch checked "
 "out that was checked out in the original source. (Typically \"master\", but "
-"it could be anything.) Any other branches will be available, under as "
-"`remotes/origin/`"
+"it could be anything.) Any other branches will be available under "
+"`remotes/origin/`."
 msgstr ""
 
 #. type: Plain text
diff --git a/man/po/es.po b/man/po/es.po
index 502cce9..cc15344 100644
--- a/man/po/es.po
+++ b/man/po/es.po
@@ -14069,8 +14069,8 @@ msgstr ""
 msgid ""
 "Note that by default the new repository will have the same branch checked "
 "out that was checked out in the original source. (Typically \"master\", but "
-"it could be anything.) Any other branches will be available, under as "
-"`remotes/origin/`"
+"it could be anything.) Any other branches will be available under "
+"`remotes/origin/`."
 msgstr ""
 "Tenga en cuenta que, por omisión, el nuevo repositorio tendrá un «checkout» "
 "de la misma rama de la que se realizó el «checkout» de la fuente original. "
diff --git a/man/po/fr.po b/man/po/fr.po
index 4e73bb9..6ec4f94 100644
--- a/man/po/fr.po
+++ b/man/po/fr.po
@@ -14088,8 +14088,8 @@ msgstr ""
 msgid ""
 "Note that by default the new repository will have the same branch checked "
 "out that was checked out in the original source. (Typically \"master\", but "
-"it could be anything.) Any other branches will be available, under as "
-"`remotes/origin/`"
+"it could be anything.) Any other branches will be available under "
+"`remotes/origin/`."
 msgstr ""
 "Veuillez noter que, par défaut, le nouveau dépôt aura la même branche "
 "récupérée que celle qui était récupérée dans les sources d'origine (souvent "
diff --git a/man/po/hu.po b/man/po/hu.po
index 16eb0ad..1bbac79 100644
--- a/man/po/hu.po
+++ b/man/po/hu.po
@@ -11458,8 +11458,8 @@ msgstr ""
 msgid ""
 "Note that by default the new repository will have the same branch checked "
 "out that was checked out in the original source. (Typically \"master\", but "
-"it could be anything.) Any other branches will be available, under as "
-"`remotes/origin/`"
+"it could be anything.) Any other branches will be available under "
+"`remotes/origin/`."
 msgstr ""
 
 #. type: Plain text
diff --git a/man/po/ja.po b/man/po/ja.po
index ca940cd..9764eaf 100644
--- a/man/po/ja.po
+++ b/man/po/ja.po
@@ -12193,8 +12193,8 @@ msgstr ""
 msgid ""
 "Note that by default the new repository will have the same branch checked "
 "out that was checked out in the original source. (Typically \"master\", but "
-"it could be anything.) Any other branches will be available, under as "
-"`remotes/origin/`"
+"it could be anything.) Any other branches will be available under "
+"`remotes/origin/`."
 msgstr ""
 
 #. type: Pla

[SCM] dpkg's main repository branch, master, updated. 1.16.0.3-161-g2533ebc

2011-07-07 Thread Raphaël Hertzog
The following commit has been merged in the master branch:
commit 2533ebc755dc0e197d51e7d50beaac2ec3a70e22
Author: Raphaël Hertzog 
Date:   Thu Jul 7 15:18:31 2011 +0200

dpkg-deb: adjust code now that extracthalf() no longer chdir() as a 
side-effect

dpkg-deb -I, -f, -W were no longer working because they relied on the fact
that extracthalf() changed the current directory to the extracted
one.

Regression introduced in commit 87809163331a320f9562d75591fcc6c954b9f80c.

diff --git a/dpkg-deb/info.c b/dpkg-deb/info.c
index 2bd0a5d..cd67d78 100644
--- a/dpkg-deb/info.c
+++ b/dpkg-deb/info.c
@@ -130,22 +130,31 @@ info_list(const char *debar, const char *dir)
 {
   char interpreter[INTERPRETER_MAX+1], *p;
   int il, lines;
+  struct varbuf controlfile = VARBUF_INIT;
   struct dirent **cdlist, *cdep;
   int cdn, n;
   FILE *cc;
   struct stat stab;
   int c;
+  size_t dirlen;
 
-  cdn= scandir(".", &cdlist, &ilist_select, alphasort);
+  cdn = scandir(dir, &cdlist, &ilist_select, alphasort);
   if (cdn == -1)
 ohshite(_("cannot scan directory `%.255s'"), dir);
+  varbuf_add_str(&controlfile, dir);
+  varbuf_add_char(&controlfile, '/');
+  dirlen = controlfile.used;
 
   for (n = 0; n < cdn; n++) {
 cdep = cdlist[n];
-if (stat(cdep->d_name,&stab))
+varbuf_trunc(&controlfile, dirlen);
+varbuf_add_str(&controlfile, cdep->d_name);
+varbuf_end_str(&controlfile);
+if (stat(controlfile.buf, &stab))
   ohshite(_("cannot stat `%.255s' (in `%.255s')"), cdep->d_name, dir);
 if (S_ISREG(stab.st_mode)) {
-  if (!(cc= fopen(cdep->d_name,"r")))
+  cc = fopen(controlfile.buf, "r");
+  if (!cc)
 ohshite(_("cannot open `%.255s' (in `%.255s')"), cdep->d_name, dir);
   lines = 0;
   interpreter[0] = '\0';
@@ -174,7 +183,11 @@ info_list(const char *debar, const char *dir)
   }
   free(cdlist);
 
-  if (!(cc= fopen("control","r"))) {
+  varbuf_trunc(&controlfile, dirlen);
+  varbuf_add_str(&controlfile, "control");
+  varbuf_end_str(&controlfile);
+  cc = fopen(controlfile.buf, "r");
+  if (!cc) {
 if (errno != ENOENT)
   ohshite(_("failed to read `%.255s' (in `%.255s')"), "control", dir);
 fputs(_("(no `control' file in control archive!)\n"), stdout);
@@ -195,12 +208,14 @@ info_list(const char *debar, const char *dir)
   }
 
   m_output(stdout, _(""));
+  varbuf_destroy(&controlfile);
 }
 
 static void
 info_field(const char *debar, const char *dir, const char *const *fields,
bool showfieldname)
 {
+  struct varbuf controlfile = VARBUF_INIT;
   FILE *cc;
   char fieldname[MAXFIELDNAME+1];
   char *pf;
@@ -208,7 +223,13 @@ info_field(const char *debar, const char *dir, const char 
*const *fields,
   int c, lno, fnl;
   bool doing;
 
-  if (!(cc= fopen("control","r"))) ohshite(_("could not open the `control' 
component"));
+  varbuf_add_str(&controlfile, dir);
+  varbuf_add_char(&controlfile, '/');
+  varbuf_add_str(&controlfile, CONTROLFILE);
+  varbuf_end_str(&controlfile);
+  cc = fopen(controlfile.buf, "r");
+  if (!cc)
+ohshite(_("could not open the `control' component"));
   doing = true;
   lno = 1;
   for (;;) {
@@ -252,11 +273,13 @@ info_field(const char *debar, const char *dir, const char 
*const *fields,
 ohshite(_("error closing the '%s' component"), "control");
   if (doing) putc('\n',stdout);
   m_output(stdout, _(""));
+  varbuf_destroy(&controlfile);
 }
 
 int
 do_showinfo(const char *const *argv)
 {
+  struct varbuf controlfile = VARBUF_INIT;
   const char *debar, *dir;
   struct pkginfo *pkg;
   struct pkg_format_node *fmt = pkg_format_parse(showformat);
@@ -266,9 +289,14 @@ do_showinfo(const char *const *argv)
 
   info_prepare(&argv, &debar, &dir, 1);
 
-  parsedb(CONTROLFILE, pdb_recordavailable | pdb_rejectstatus | 
pdb_ignorefiles,
-  &pkg);
+  varbuf_add_str(&controlfile, dir);
+  varbuf_add_char(&controlfile, '/');
+  varbuf_add_str(&controlfile, CONTROLFILE);
+  varbuf_end_str(&controlfile);
+  parsedb(controlfile.buf,
+  pdb_recordavailable | pdb_rejectstatus | pdb_ignorefiles, &pkg);
   pkg_format_show(fmt, pkg, &pkg->available);
+  varbuf_destroy(&controlfile);
 
   return 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.3-160-gc819a40

2011-07-07 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 2825370120d3adf3c1ef0c1b16d09bb2637ff358
Author: Guillem Jover 
Date:   Thu Jul 7 06:15:57 2011 +0200

man: Correctly format text with bold and italics

diff --git a/debian/changelog b/debian/changelog
index b8d8aec..49bc4e7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -129,6 +129,7 @@ dpkg (1.16.1) UNRELEASED; urgency=low
   dpkg-query(1).
 - Use [option...] instead of [options] and friends.
 - Use italics or bold instead of surrounding the text with <>.
+- Correctly format text with bold and italics.
   * Refer to Sources and Packages files as part of a repository instead of
 as being of exclusive use or owned by APT, which has never been the case.
 
diff --git a/man/deb-control.5 b/man/deb-control.5
index 4184262..4072061 100644
--- a/man/deb-control.5
+++ b/man/deb-control.5
@@ -70,7 +70,7 @@ A list of these values can be obtained from the latest 
version of the
 package.
 .TP
 .BR Essential: " \fByes\fP|\fBno\fP"
-This field is usually only needed when the answer is `yes'. It denotes
+This field is usually only needed when the answer is \fByes\fP. It denotes
 a package that is required for proper operation of the system. Dpkg
 or any other installation tool will not allow an
 .B Essential
@@ -88,12 +88,12 @@ of this are shell and Perl scripts, and documentation.
 The name of the distribution this package is originating from.
 .TP
 .BI Bugs: " url"
-The url of the bug tracking system for this package. The current used format
-is \fIbts-type\fP\fB://\fP\fIbts-address\fP, like
+The \fIurl\fP of the bug tracking system for this package. The current
+used format is \fIbts-type\fP\fB://\fP\fIbts-address\fP, like
 \fBdebbugs://bugs.debian.org\fP.
 .TP
 .BI Homepage: " url"
-The upstream project home page URL.
+The upstream project home page \fIurl\fP.
 .TP
 .BI Tag: " tag-list"
 List of tags describing the qualities of the package. The description and
@@ -101,14 +101,15 @@ list of supported tags can be found in the \fBdebtags\fP 
package.
 .TP
 .BR Multi\-Arch: " \fBsame\fP|\fBforeign\fP|\fBallowed\fP"
 This field is used to indicate how this package should behave on a multi-arch
-installations. The value `same' means that the package is co-installable with
-itself, but it must not be used to satisfy the dependency of any package of a
-different architecture from itself. The value `foreign' means that the package 
is
-not co-installable with itself, but should be allowed to satisfy the dependency
-of a package of a different arch from itself. The value `allowed` allows
-reverse-dependencies to indicate in their Depends field that they need a 
package
-from a foreign architecture, but has no effect otherwise. This field should not
-be present in packages with the Architecture: all field.
+installations. The value \fBsame\fP means that the package is co-installable
+with itself, but it must not be used to satisfy the dependency of any package
+of a different architecture from itself. The value \fBforeign\fP means that
+the package is not co-installable with itself, but should be allowed to
+satisfy the dependency of a package of a different arch from itself. The
+value \fBallowed\fP allows reverse-dependencies to indicate in their
+Depends field that they need a package from a foreign architecture, but
+has no effect otherwise. This field should not be present in packages
+with the \fBArchitecture: all\fP field.
 .TP
 .BI Source: " source-name"
 The name of the source package that this binary package came from, if
diff --git a/man/deb-shlibs.5 b/man/deb-shlibs.5
index 920d8ea..6aeac68 100644
--- a/man/deb-shlibs.5
+++ b/man/deb-shlibs.5
@@ -27,7 +27,7 @@ entry per line. Blank lines are \fBnot\fP allowed.  Lines 
beginning
 with an \fB#\fP character are considered commentary, and are ignored.
 All other lines must have the format
 .IP
-.RI [ type: ]
+.RI [ type\fB:\fP ]
 .I library
 .I version
 .I dependencies
diff --git a/man/deb-split.5 b/man/deb-split.5
index 213fe1b..9346d1b 100644
--- a/man/deb-split.5
+++ b/man/deb-split.5
@@ -1,4 +1,4 @@
-.TH deb\-split 5 "2011-04-15" "Debian Project" "Debian"
+.TH deb\-split 5 "2011-07-04" "Debian Project" "Debian"
 .SH NAME
 deb\-split \- Debian multi-part binary package format
 .SH SYNOPSIS
@@ -39,11 +39,11 @@ and the program should stop. If it has not, then the 
program should
 be able to safely continue, unless it encounters an unexpected member
 in the archive (except at the end), as described below.
 .PP
-The second, last required member is named \fBdata.\fPN, where N denotes
-the part number. It contains the raw part data.
+The second, last required member is named \fBdata.\fP\fIN\fP, where \fIN\fP
+denotes the part number. It contains the raw part data.
 .PP
 These members must occur in this exact order. Current implementations
-should ignore any additional members after \fBdata.\fPN.
+should ignore any additional members after \fBdata.\fP\fIN\fP.
 Further member

[SCM] dpkg's main repository branch, master, updated. 1.16.0.3-160-gc819a40

2011-07-07 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 9c757bf4c00f777f089e0ab6f83f10edd5892679
Author: Guillem Jover 
Date:   Wed Jul 6 17:19:38 2011 +0200

man: Use italics or bold instead of surrounding the text with <>

Using <> to delimit parts of text is necessary when using plain text
output, but not when we have some formatting available around, which
is the case with the man pages, but not with the program output.

diff --git a/TODO b/TODO
index 75606a2..0d1bc39 100644
--- a/TODO
+++ b/TODO
@@ -63,7 +63,6 @@ TODO
  * Man pages:
- Add example to dpkg-scanfoo manpages?
- Merge synopsis lines in dpkg-triggers.
-   - Check all '<>' use bold instead.
- Check all command vs action.
- Check usage of '|' instead of ', '.
- Check position of short option before long option.
diff --git a/debian/changelog b/debian/changelog
index cdff489..b8d8aec 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -128,6 +128,7 @@ dpkg (1.16.1) UNRELEASED; urgency=low
 - Clarify that several front-end fields are not dselect specific in
   dpkg-query(1).
 - Use [option...] instead of [options] and friends.
+- Use italics or bold instead of surrounding the text with <>.
   * Refer to Sources and Packages files as part of a repository instead of
 as being of exclusive use or owned by APT, which has never been the case.
 
diff --git a/man/deb-control.5 b/man/deb-control.5
index 8a4f8c9..4184262 100644
--- a/man/deb-control.5
+++ b/man/deb-control.5
@@ -1,6 +1,6 @@
 .\" Author: Raul Miller
 .\" Includes text from the debian Guidelines by Ian Jackson, Ian Murdock
-.TH deb\-control 5 "2010-07-29" "Debian Project" "Debian"
+.TH deb\-control 5 "2011-07-04" "Debian Project" "Debian"
 .SH NAME
 deb\-control \- Debian packages' master control file format
 .
@@ -24,24 +24,24 @@ field, see below).
 .
 .SH REQUIRED FIELDS
 .TP
-.BR Package: " "
+.BI Package: " package-name"
 The value of this field determines the package name, and is used to
 generate file names by most installation tools.
 .TP
-.BR Version: " "
+.BI Version: " version-string"
 Typically, this is the original package's version number in whatever form
 the program's author uses. It may also include a Debian revision number
 (for non-native packages). The exact format and sorting algorithm
 are described in
 .BR deb\-version (5).
 .TP
-.BR Maintainer: " "
+.BI Maintainer: " fullname-email"
 Should be in the format `Joe Bloggs ', and is typically
 the person who created the package, as opposed to the author of the
 software that was packaged.
 .TP
-.BR Description: " "
-.BR " " ""
+.BI Description: " short-description"
+.BI " " "long-description"
 .br
 The format for the package description is a short brief summary on the
 first line (after the "Description" field). The following lines should be
@@ -51,12 +51,12 @@ contain a single '.' following the preceding space.
 .
 .SH OPTIONAL FIELDS
 .TP
-.BR Section: " "
+.BI Section: " section"
 This is a general field that gives the package a category based on the
 software that it installs. Some common sections are `utils', `net',
 `mail', `text', `x11' etc.
 .TP
-.BR Priority: " "
+.BI Priority: " priority"
 Sets the importance of this package in relation to the system as a whole.
 Common priorities are `required', `standard', `optional', `extra' etc.
 .LP
@@ -69,14 +69,14 @@ A list of these values can be obtained from the latest 
version of the
 .B debian\-policy
 package.
 .TP
-.BR Essential: " "
+.BR Essential: " \fByes\fP|\fBno\fP"
 This field is usually only needed when the answer is `yes'. It denotes
 a package that is required for proper operation of the system. Dpkg
 or any other installation tool will not allow an
 .B Essential
 package to be removed (at least not without using one of the force options).
 .TP
-.BR Architecture: " "
+.BR Architecture: " \fIarch\fP|\fBall\fP"
 The architecture specifies which type of hardware this package was compiled
 for. Common architectures are `i386', `m68k', `sparc', `alpha', `powerpc'
 etc. Note that the
@@ -84,21 +84,22 @@ etc. Note that the
 option is meant for packages that are architecture independent. Some examples
 of this are shell and Perl scripts, and documentation.
 .TP
-.BR Origin: " "
+.BI Origin: " name"
 The name of the distribution this package is originating from.
 .TP
-.BR Bugs: " "
+.BI Bugs: " url"
 The url of the bug tracking system for this package. The current used format
-is \fB://\fP, like \fBdebbugs://bugs.debian.org\fP.
+is \fIbts-type\fP\fB://\fP\fIbts-address\fP, like
+\fBdebbugs://bugs.debian.org\fP.
 .TP
-.BR Homepage: " "
+.BI Homepage: " url"
 The upstream project home page URL.
 .TP
-.BR Tag: " "
+.BI Tag: " tag-list"
 List of tags describing the qualities of the package. The description and
 list of supported tags can be found in the \fBdebtags\fP package.
 .TP
-.BR Multi\-Arch: " "
+.BR Multi\-Arch: " \fBsame\fP|\fBforeign\fP|\fBallowed\fP"
 This field is used to indicate how

[SCM] dpkg's main repository branch, master, updated. 1.16.0.3-160-gc819a40

2011-07-07 Thread Guillem Jover
The following commit has been merged in the master branch:
commit c819a400aa596e513ca8b28710ab9e2c62fcacd2
Author: Guillem Jover 
Date:   Thu Jul 7 06:24:37 2011 +0200

dpkg-maintscript-helper: Unify somewhat --help output with other commands

diff --git a/debian/changelog b/debian/changelog
index 49bc4e7..41607a6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -132,6 +132,7 @@ dpkg (1.16.1) UNRELEASED; urgency=low
 - Correctly format text with bold and italics.
   * Refer to Sources and Packages files as part of a repository instead of
 as being of exclusive use or owned by APT, which has never been the case.
+  * Unify somewhat dpkg-maintscript-helper --help output with other commands.
 
   [ Bill Allombert]
   * Add support for Build-Features: build-arch. Closes: #229357
diff --git a/scripts/dpkg-maintscript-helper.sh 
b/scripts/dpkg-maintscript-helper.sh
index 631a5a1..92088ae 100755
--- a/scripts/dpkg-maintscript-helper.sh
+++ b/scripts/dpkg-maintscript-helper.sh
@@ -234,22 +234,16 @@ warning() {
 
 usage() {
cat <  -- 
-
-Commands and parameters:
+Usage: $PROGNAME  ... -- ...
 
+Commands:
   supports 
-   Returns 0 (success) if the given command is supported, 1
-   otherwise.
-
+   Returns 0 (success) if the given command is supported, 1 otherwise.
   rm_conffile  [ []]
-   Remove obsolete conffile.
-   Must be called in preinst, postinst and postrm.
-
+   Remove obsolete conffile. Must be called in preinst, postinst and
+   postrm.
   mv_conffile   [ []]
-   Rename a conffile.
-   Must be called in preinst, postinst and postrm.
-
+   Rename a conffile. Must be called in preinst, postinst and postrm.
   help
Display this usage information.
 END

-- 
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.3-160-gc819a40

2011-07-07 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 37b01269a3735a3213d5fe5fce377d5360f55ff7
Author: Guillem Jover 
Date:   Thu Jul 7 05:41:06 2011 +0200

dselect(1): Rename USAGE section to ACTIONS

Document the ways actions can be performed, either interactively or from
the command line.

diff --git a/debian/changelog b/debian/changelog
index e4e9444..190476d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -119,6 +119,9 @@ dpkg (1.16.1) UNRELEASED; urgency=low
   * Do not require programs to define thisname, provide two new functions
 to handle the program name (dpkg_set_progname and dpkg_get_progname).
 Closes: #631757
+  * Man pages cleanup:
+- Rename “USAGE” dselect(1) section to “ACTIONS” and clarify they can
+  be performed interactively or from command line.
 
   [ Bill Allombert]
   * Add support for Build-Features: build-arch. Closes: #229357
diff --git a/man/dselect.1 b/man/dselect.1
index d20d499..b422193 100644
--- a/man/dselect.1
+++ b/man/dselect.1
@@ -125,11 +125,12 @@ Print a brief help text and exit successfully.
 .B \-\-version
 Print version information and exit successfully.
 .
-.SH USAGE
+.SH ACTIONS
 When
 .B dselect
-is started interactively, it prompts the user with a menu of available
-actions:
+is started it can perform the following actions, either directly if it
+was specified on the command line or by prompting the user with a menu
+of available actions if running interactively:
 .SS access
 Choose and configure an access method to access package repositories.
 .sp

-- 
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.3-160-gc819a40

2011-07-07 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 5190ed2c6b5c3d9e4f21db2cbdfddeca6ace2d46
Author: Guillem Jover 
Date:   Mon Jul 4 19:06:38 2011 +0200

man: Use [option...] instead of [options] and friends

diff --git a/TODO b/TODO
index 6af952e..75606a2 100644
--- a/TODO
+++ b/TODO
@@ -67,7 +67,6 @@ TODO
- Check all command vs action.
- Check usage of '|' instead of ', '.
- Check position of short option before long option.
-   - Use [option...] instead of [options] and friends?
- Fix dpkg man page, refs to dpkg-deb and dpkg-split, etc.
- Fix «.  ».
 
diff --git a/debian/changelog b/debian/changelog
index d183637..cdff489 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -127,6 +127,7 @@ dpkg (1.16.1) UNRELEASED; urgency=low
 - Use dashes instead of underscores for variable text.
 - Clarify that several front-end fields are not dselect specific in
   dpkg-query(1).
+- Use [option...] instead of [options] and friends.
   * Refer to Sources and Packages files as part of a repository instead of
 as being of exclusive use or owned by APT, which has never been the case.
 
diff --git a/man/dpkg-architecture.1 b/man/dpkg-architecture.1
index 511e683..0710da1 100644
--- a/man/dpkg-architecture.1
+++ b/man/dpkg-architecture.1
@@ -1,11 +1,10 @@
-.TH dpkg\-architecture 1 "2009-08-15" "Debian Project" "dpkg utilities"
+.TH dpkg\-architecture 1 "2011-07-04" "Debian Project" "dpkg utilities"
 .SH "NAME"
 dpkg\-architecture \- set and determine the architecture for package building
 .
 .SH SYNOPSIS
 .B dpkg-architecture
-.RI [ options ]
-.RI [ commands ]
+.RI [ option "...] [" command ]
 .PP
 .
 .SH DESCRIPTION
diff --git a/man/dpkg-buildpackage.1 b/man/dpkg-buildpackage.1
index f747ab7..b3932cb 100644
--- a/man/dpkg-buildpackage.1
+++ b/man/dpkg-buildpackage.1
@@ -1,10 +1,10 @@
-.TH dpkg\-buildpackage 1 "2010-07-29" "Debian Project" "dpkg utilities"
+.TH dpkg\-buildpackage 1 "2011-07-04" "Debian Project" "dpkg utilities"
 .SH NAME
 dpkg\-buildpackage \- build binary or source packages from sources
 .
 .SH SYNOPSIS
 .B dpkg\-buildpackage
-.RI [ options ]
+.RI [ option ...]
 .
 .SH DESCRIPTION
 .B dpkg\-buildpackage
diff --git a/man/dpkg-checkbuilddeps.1 b/man/dpkg-checkbuilddeps.1
index 1ac3bad..0b90849 100644
--- a/man/dpkg-checkbuilddeps.1
+++ b/man/dpkg-checkbuilddeps.1
@@ -1,10 +1,10 @@
-.TH dpkg\-checkbuilddeps 1 "2009-11-21" "Debian Project" "dpkg utilities"
+.TH dpkg\-checkbuilddeps 1 "2011-07-04" "Debian Project" "dpkg utilities"
 .SH NAME
 dpkg\-checkbuilddeps \- check build dependencies and conflicts
 .
 .SH SYNOPSIS
 .B dpkg\-checkbuilddeps
-.RI [ options ]
+.RI [ option ...]
 .RI [ control-file ]
 .
 .SH DESCRIPTION
diff --git a/man/dpkg-deb.1 b/man/dpkg-deb.1
index d3d8987..99cdc8e 100644
--- a/man/dpkg-deb.1
+++ b/man/dpkg-deb.1
@@ -1,11 +1,10 @@
-.TH dpkg\-deb 1 "2011-04-26" "Debian Project" "dpkg suite"
+.TH dpkg\-deb 1 "2011-07-04" "Debian Project" "dpkg suite"
 .SH NAME
 dpkg\-deb \- Debian package archive (.deb) manipulation tool
 .
 .SH SYNOPSIS
 .B dpkg\-deb
-.RI [ options ]
-.I command
+.RI [ option "...] " command
 .
 .SH DESCRIPTION
 .B dpkg\-deb
diff --git a/man/dpkg-distaddfile.1 b/man/dpkg-distaddfile.1
index 24138ea..50e616d 100644
--- a/man/dpkg-distaddfile.1
+++ b/man/dpkg-distaddfile.1
@@ -1,10 +1,10 @@
-.TH dpkg\-distaddfile 1 "2008-08-18" "Debian Project" "dpkg utilities"
+.TH dpkg\-distaddfile 1 "2011-07-04" "Debian Project" "dpkg utilities"
 .SH NAME
 dpkg\-distaddfile \- add entries to debian/files
 .
 .SH SYNOPSIS
 .B dpkg\-distaddfile
-.RI [ options ] " filename section priority"
+.RI [ option ...] " filename section priority"
 .
 .SH DESCRIPTION
 .B dpkg\-distaddfile
diff --git a/man/dpkg-divert.8 b/man/dpkg-divert.8
index 1c2fe05..23e5207 100644
--- a/man/dpkg-divert.8
+++ b/man/dpkg-divert.8
@@ -1,10 +1,10 @@
-.TH dpkg\-divert 8 "2010-10-12" "Debian Project" "dpkg utilities"
+.TH dpkg\-divert 8 "2011-07-04" "Debian Project" "dpkg utilities"
 .SH NAME
 dpkg\-divert \- override a package's version of a file
 .
 .SH SYNOPSIS
 .B dpkg\-divert
-.RI [ options ]
+.RI [ option ...]
 .I command
 .
 .SH DESCRIPTION
diff --git a/man/dpkg-genchanges.1 b/man/dpkg-genchanges.1
index b4f8511..63d8bb0 100644
--- a/man/dpkg-genchanges.1
+++ b/man/dpkg-genchanges.1
@@ -1,10 +1,10 @@
-.TH dpkg\-genchanges 1 "2008-08-18" "Debian Project" "dpkg utilities"
+.TH dpkg\-genchanges 1 "2011-07-04" "Debian Project" "dpkg utilities"
 .SH NAME
 dpkg\-genchanges \- generate Debian .changes files
 .
 .SH SYNOPSIS
 .B dpkg\-genchanges
-.RI [ options ]
+.RI [ option ...]
 .br
 .
 .SH DESCRIPTION
diff --git a/man/dpkg-gencontrol.1 b/man/dpkg-gencontrol.1
index e13b556..c3f761b 100644
--- a/man/dpkg-gencontrol.1
+++ b/man/dpkg-gencontrol.1
@@ -1,10 +1,10 @@
-.TH dpkg\-gencontrol 1 "2008-08-18" "Debian Project" "dpkg utilities"
+.TH dpkg\-gencontrol 1 "2011-07-04" "Debian Project" "dpkg utilities"
 .SH NAME
 dpkg\-gencontrol \- generate Debian contro

[SCM] dpkg's main repository branch, master, updated. 1.16.0.3-160-gc819a40

2011-07-07 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 9e53fcc54bddbbab53e964f3339bd712e41806e5
Author: Guillem Jover 
Date:   Mon Jul 4 18:55:03 2011 +0200

Refer to Sources and Packages files as part of a repository

Instead of as being of exclusive use or owned by APT, which has never
been the case. Those files existed long before APT even existed.

diff --git a/debian/changelog b/debian/changelog
index c3106de..d183637 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -127,6 +127,8 @@ dpkg (1.16.1) UNRELEASED; urgency=low
 - Use dashes instead of underscores for variable text.
 - Clarify that several front-end fields are not dselect specific in
   dpkg-query(1).
+  * Refer to Sources and Packages files as part of a repository instead of
+as being of exclusive use or owned by APT, which has never been the case.
 
   [ Bill Allombert]
   * Add support for Build-Features: build-arch. Closes: #229357
diff --git a/man/dpkg-query.1 b/man/dpkg-query.1
index 0612725..5237166 100644
--- a/man/dpkg-query.1
+++ b/man/dpkg-query.1
@@ -1,4 +1,4 @@
-.TH dpkg\-query 1 "2011-04-28" "Debian Project" "dpkg suite"
+.TH dpkg\-query 1 "2011-07-04" "Debian Project" "dpkg suite"
 .SH NAME
 dpkg\-query \- a tool to query the dpkg database
 .
@@ -175,7 +175,7 @@ fields or fields stored in the binary package end up in it):
 \fBSource\fP
 \fBStatus\fP (internal)
 \fBSuggests\fP
-\fBTag\fP (usually not in the .deb but in APT's Packages files)
+\fBTag\fP (usually not in the .deb but in the repository Packages files)
 \fBTriggers-Awaited\fP (internal)
 \fBTriggers-Pending\fP (internal)
 \fBVersion\fP
diff --git a/scripts/Dpkg/Control.pm b/scripts/Dpkg/Control.pm
index b3b8939..01d8d28 100644
--- a/scripts/Dpkg/Control.pm
+++ b/scripts/Dpkg/Control.pm
@@ -66,12 +66,12 @@ in a Debian source package.
 
 =item CTRL_INDEX_SRC
 
-Corresponds to an entry in a Sources file of an APT source package
+Corresponds to an entry in a Sources file of a source package
 repository.
 
 =item CTRL_INDEX_PKG
 
-Corresponds to an entry in a Packages file of an APT binary package
+Corresponds to an entry in a Packages file of a binary package
 repository.
 
 =item CTRL_PKG_SRC
@@ -153,9 +153,9 @@ sub set_options {
 } elsif ($t == CTRL_CHANGELOG) {
 $$self->{'name'} = _g("parsed version of changelog");
 } elsif ($t == CTRL_INDEX_SRC) {
-$$self->{'name'} = sprintf(_g("entry of APT's %s file"), 
"Sources");
+$$self->{'name'} = sprintf(_g("entry in repository's %s file"), 
"Sources");
 } elsif ($t == CTRL_INDEX_PKG) {
-$$self->{'name'} = sprintf(_g("entry of APT's %s file"), 
"Packages");
+$$self->{'name'} = sprintf(_g("entry in repository's %s file"), 
"Packages");
 } elsif ($t == CTRL_PKG_SRC) {
 $$self->{'name'} = sprintf(_g("%s file"), ".dsc");
 } elsif ($t == CTRL_PKG_DEB) {
diff --git a/scripts/Dpkg/Control/Types.pm b/scripts/Dpkg/Control/Types.pm
index 56ddeca..a1a6590 100644
--- a/scripts/Dpkg/Control/Types.pm
+++ b/scripts/Dpkg/Control/Types.pm
@@ -38,8 +38,8 @@ use constant {
 CTRL_UNKNOWN => 0,
 CTRL_INFO_SRC => 1,  # First control block in debian/control
 CTRL_INFO_PKG => 2,  # Subsequent control blocks in debian/control
-CTRL_INDEX_SRC => 4, # Entry in APT's Packages files
-CTRL_INDEX_PKG => 8, # Entry in APT's Sources files
+CTRL_INDEX_SRC => 4, # Entry in repository's Packages files
+CTRL_INDEX_PKG => 8, # Entry in repository's Sources files
 CTRL_PKG_SRC => 16,  # .dsc file of source package
 CTRL_PKG_DEB => 32,  # DEBIAN/control in binary packages
 CTRL_FILE_CHANGES => 64, # .changes file

-- 
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.3-160-gc819a40

2011-07-07 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 971e0bd2005b06ab718a90e77067f7c6ff01c0b3
Author: Guillem Jover 
Date:   Wed Jul 6 16:45:26 2011 +0200

dselect(1): Add missing built-in methods

diff --git a/debian/changelog b/debian/changelog
index 190476d..eed3e05 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -122,6 +122,7 @@ dpkg (1.16.1) UNRELEASED; urgency=low
   * Man pages cleanup:
 - Rename “USAGE” dselect(1) section to “ACTIONS” and clarify they can
   be performed interactively or from command line.
+- Add missing built-in methods to dselect(1).
 
   [ Bill Allombert]
   * Add support for Build-Features: build-arch. Closes: #229357
diff --git a/man/dselect.1 b/man/dselect.1
index b422193..a7ffea7 100644
--- a/man/dselect.1
+++ b/man/dselect.1
@@ -135,10 +135,10 @@ of available actions if running interactively:
 Choose and configure an access method to access package repositories.
 .sp
 By default, \fBdselect\fP provides several methods such
-as \fIfloppy\fP, \fIharddisk\fP or \fIcdrom\fP, but other packages
-may provide additional methods, eg. the \fIapt\fP access method provided
-by the \fBapt\fP package or \fImulti_cd\fP by the \fBdpkg\-multicd\fP
-package.
+as \fIcdrom\fP, \fImulti_cd\fP, \fInfs\fP, \fImulti_nfs\fP, \fIharddisk\fP,
+\fImounted\fP, \fImulti_mount\fP, \fIfloppy\fP or \fIftp\fP, but other
+packages may provide additional methods, eg. the \fIapt\fP access method
+provided by the \fBapt\fP package.
 .sp
 The use of the \fIapt\fP access method is strongly recommended.
 .sp

-- 
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.3-160-gc819a40

2011-07-07 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 7f3892f184d9accd250600dfc54173a6436a5d3a
Author: Guillem Jover 
Date:   Wed Jul 6 16:46:26 2011 +0200

dpkg-shlibdeps(1): Add missing “with”

diff --git a/man/dpkg-shlibdeps.1 b/man/dpkg-shlibdeps.1
index 9295d07..487dd02 100644
--- a/man/dpkg-shlibdeps.1
+++ b/man/dpkg-shlibdeps.1
@@ -18,7 +18,7 @@ as variable names
 .BI shlibs: dependencyfield
 where
 .I dependencyfield
-is a dependency field name. Any other variables starting
+is a dependency field name. Any other variables starting with
 .I shlibs:
 are removed from the file.
 .P

-- 
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.3-160-gc819a40

2011-07-07 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 86878684cd098e4ca6f879492842e24eb9a6
Author: Guillem Jover 
Date:   Wed Jul 6 16:46:54 2011 +0200

dpkg-query(1): Clarify that several fields are not dselect specific

These apply to most dpkg front-ends not just dselect.

diff --git a/debian/changelog b/debian/changelog
index 0fd1cee..c3106de 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -125,6 +125,8 @@ dpkg (1.16.1) UNRELEASED; urgency=low
 - Add missing built-in methods to dselect(1).
 - Add missing escaping to field dashes in deb-control(5).
 - Use dashes instead of underscores for variable text.
+- Clarify that several front-end fields are not dselect specific in
+  dpkg-query(1).
 
   [ Bill Allombert]
   * Add support for Build-Features: build-arch. Closes: #229357
diff --git a/man/dpkg-query.1 b/man/dpkg-query.1
index afc6fbc..0612725 100644
--- a/man/dpkg-query.1
+++ b/man/dpkg-query.1
@@ -156,11 +156,11 @@ fields or fields stored in the binary package end up in 
it):
 \fBDescription\fP
 \fBEnhances\fP
 \fBEssential\fP
-\fBFilename\fP (internal, dselect related)
+\fBFilename\fP (internal, front-end related)
 \fBHomepage\fP
 \fBInstalled\-Size\fP
-\fBMD5sum\fP (internal, dselect related)
-\fBMSDOS\-Filename\fP (internal, dselect related)
+\fBMD5sum\fP (internal, front-end related)
+\fBMSDOS\-Filename\fP (internal, front-end related)
 \fBMaintainer\fP
 \fBOrigin\fP
 \fBPackage\fP
@@ -171,7 +171,7 @@ fields or fields stored in the binary package end up in it):
 \fBReplaces\fP
 \fBRevision\fP (obsolete)
 \fBSection\fP
-\fBSize\fP (internal, dselect related)
+\fBSize\fP (internal, front-end related)
 \fBSource\fP
 \fBStatus\fP (internal)
 \fBSuggests\fP

-- 
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.3-160-gc819a40

2011-07-07 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 0a9586213086723c5962bbfa6659df240c77433c
Author: Guillem Jover 
Date:   Thu Jul 7 06:19:02 2011 +0200

man: Use dashes instead of underscores for variable text

This makes the text more clear by avoiding the clashes when italics
are rendered as underlined text.

diff --git a/debian/changelog b/debian/changelog
index 52ef7a3..0fd1cee 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -124,6 +124,7 @@ dpkg (1.16.1) UNRELEASED; urgency=low
   be performed interactively or from command line.
 - Add missing built-in methods to dselect(1).
 - Add missing escaping to field dashes in deb-control(5).
+- Use dashes instead of underscores for variable text.
 
   [ Bill Allombert]
   * Add support for Build-Features: build-arch. Closes: #229357
diff --git a/man/deb-control.5 b/man/deb-control.5
index 42c4473..8a4f8c9 100644
--- a/man/deb-control.5
+++ b/man/deb-control.5
@@ -89,7 +89,7 @@ The name of the distribution this package is originating from.
 .TP
 .BR Bugs: " "
 The url of the bug tracking system for this package. The current used format
-is \fB://\fP, like \fBdebbugs://bugs.debian.org\fP.
+is \fB://\fP, like \fBdebbugs://bugs.debian.org\fP.
 .TP
 .BR Homepage: " "
 The upstream project home page URL.
diff --git a/man/deb-src-control.5 b/man/deb-src-control.5
index 94a0aa4..0ef7f17 100644
--- a/man/deb-src-control.5
+++ b/man/deb-src-control.5
@@ -66,7 +66,7 @@ The upstream project home page URL.
 .TP
 .BR Bugs: " "
 The url of the bug tracking system for this package. The current used format
-is \fB://\fP, like \fBdebbugs://bugs.debian.org\fP. This
+is \fB://\fP, like \fBdebbugs://bugs.debian.org\fP. This
 field is usually not needed.
 
 .TP
diff --git a/man/deb-version.5 b/man/deb-version.5
index da9372f..79076f9 100644
--- a/man/deb-version.5
+++ b/man/deb-version.5
@@ -2,12 +2,12 @@
 .\" The copyright given below is that of the whole policy, but probably
 .\" incomplete.
 .\" Conversion to roff by Frank Lichtenheld
-.TH deb\-version 5 "2008-08-18" "Debian Project" "Debian"
+.TH deb\-version 5 "2011-07-04" "Debian Project" "Debian"
 .SH NAME
 deb\-version \- Debian package version number format
 .
 .SH SYNOPSIS
-.RI "[ " epoch ":] " upstream_version " [\-" debian_revision " ]"
+.RI "[ " epoch ":] " upstream-version " [\-" debian-revision " ]"
 .SH DESCRIPTION
 Version numbers as used for Debian binary and source packages
 consist of three components. These are:
@@ -15,14 +15,14 @@ consist of three components. These are:
 .I epoch
 This is a single (generally small) unsigned integer.  It
 may be omitted, in which case zero is assumed.  If it is
-omitted then the \fIupstream_version\fP may not
+omitted then the \fIupstream-version\fP may not
 contain any colons.
 .IP
 It is provided to allow mistakes in the version numbers
 of older versions of a package, and also a package's
 previous version numbering schemes, to be left behind.
 .TP
-.I upstream_version
+.I upstream-version
 This is the main part of the version number.  It is
 usually the version number of the original ("upstream")
 package from which the \fI.deb\fP file has been made,
@@ -33,48 +33,48 @@ package management system's format and comparison
 scheme.
 .IP
 The comparison behavior of the package management system
-with respect to the \fIupstream_version\fP is
-described below.  The \fIupstream_version\fP
+with respect to the \fIupstream-version\fP is
+described below. The \fIupstream-version\fP
 portion of the version number is mandatory.
 .IP
-The \fIupstream_version\fP may contain only
+The \fIupstream-version\fP may contain only
 alphanumerics ("A-Za-z0-9") and the characters
 .BR . " " + " " \- " " : " " ~
 (full stop, plus, hyphen, colon, tilde) and should
 start with a digit.  If there is no
-\fIdebian_revision\fP then hyphens are not allowed;
+\fIdebian-revision\fP then hyphens are not allowed;
 if there is no \fIepoch\fP then colons are not
 allowed.
 .TP
-.I debian_revision
+.I debian-revision
 This part of the version number specifies the version of
 the Debian package based on the upstream version.  It
 may contain only alphanumerics and the characters
 .BR + " " . " " ~
 (plus, full stop, tilde) and is
 compared in the same way as the
-\fIupstream_version\fP is.
+\fIupstream-version\fP is.
 .IP
 It is optional; if it isn't present then the
-\fIupstream_version\fP may not contain a hyphen.
+\fIupstream-version\fP may not contain a hyphen.
 This format represents the case where a piece of
 software was written specifically to be turned into a
 Debian package, and so there is only one "debianisation"
 of it and therefore no revision indication is required.
 .IP
 It is conventional to restart the
-\fIdebian_revision\fP at '1' each time time the
-\fIupstream_version\fP is increased.
+\fIdebian-revision\fP at '1' each time time the
+\fIupstream-version\fP is increased.
 .IP
 Dpkg will break the version
 number apart at the last hyphen i

[SCM] dpkg's main repository branch, master, updated. 1.16.0.3-160-gc819a40

2011-07-07 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 7dcd875e084213fa65c09cd23a3e45edfbfcb94b
Author: Guillem Jover 
Date:   Thu Jul 7 06:17:19 2011 +0200

deb-control(5): Add missing escaping to field dashes

diff --git a/debian/changelog b/debian/changelog
index eed3e05..52ef7a3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -123,6 +123,7 @@ dpkg (1.16.1) UNRELEASED; urgency=low
 - Rename “USAGE” dselect(1) section to “ACTIONS” and clarify they can
   be performed interactively or from command line.
 - Add missing built-in methods to dselect(1).
+- Add missing escaping to field dashes in deb-control(5).
 
   [ Bill Allombert]
   * Add support for Build-Features: build-arch. Closes: #229357
diff --git a/man/deb-control.5 b/man/deb-control.5
index 8afc724..42c4473 100644
--- a/man/deb-control.5
+++ b/man/deb-control.5
@@ -230,14 +230,14 @@ and
 fields.
 .
 .TP
-.BR Built-Using: " "
+.BR Built\-Using: " "
 This field lists extra source packages that were used during the build of this
 binary package.  This is an indication to the archive maintenance software that
 these extra source packages must be kept whilst this binary package is
 maintained.  This field must be a list of source package names with strict (=)
 version relationships.  Note that the archive maintenance software is likely to
 refuse to accept an upload which declares a
-.B Built-Using
+.B Built\-Using
 relationship which cannot be satisfied within the archive.
 .
 .SH EXAMPLE

-- 
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.3-160-gc819a40

2011-07-07 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 23cd39aae01f1b3b1aee834befa02201e8824819
Author: Guillem Jover 
Date:   Thu Jul 7 09:04:32 2011 +0200

libdpkg: Rename catch_signals to signo_ignores in subproc module

diff --git a/lib/dpkg/subproc.c b/lib/dpkg/subproc.c
index f38eafe..e00141c 100644
--- a/lib/dpkg/subproc.c
+++ b/lib/dpkg/subproc.c
@@ -35,8 +35,8 @@
 #include 
 #include 
 
-static int catch_signals[] = { SIGQUIT, SIGINT };
-static struct sigaction sa_save[array_count(catch_signals)];
+static int signo_ignores[] = { SIGQUIT, SIGINT };
+static struct sigaction sa_save[array_count(signo_ignores)];
 
 void
 subproc_signals_setup(const char *name)
@@ -50,10 +50,10 @@ subproc_signals_setup(const char *name)
sa.sa_handler = SIG_IGN;
sa.sa_flags = 0;
 
-   for (i = 0; i < array_count(catch_signals); i++)
-   if (sigaction(catch_signals[i], &sa, &sa_save[i]))
+   for (i = 0; i < array_count(signo_ignores); i++)
+   if (sigaction(signo_ignores[i], &sa, &sa_save[i]))
ohshite(_("unable to ignore signal %s before running 
%.250s"),
-   strsignal(catch_signals[i]), name);
+   strsignal(signo_ignores[i]), name);
push_cleanup(subproc_signals_cleanup, ~0, NULL, 0, 0);
onerr_abort--;
 }
@@ -63,10 +63,10 @@ subproc_signals_cleanup(int argc, void **argv)
 {
size_t i;
 
-   for (i = 0; i < array_count(catch_signals); i++) {
-   if (sigaction(catch_signals[i], &sa_save[i], NULL)) {
+   for (i = 0; i < array_count(signo_ignores); i++) {
+   if (sigaction(signo_ignores[i], &sa_save[i], NULL)) {
fprintf(stderr, _("error un-catching signal %s: %s\n"),
-   strsignal(catch_signals[i]), strerror(errno));
+   strsignal(signo_ignores[i]), strerror(errno));
onerr_abort++;
}
}

-- 
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.3-160-gc819a40

2011-07-07 Thread Guillem Jover
The following commit has been merged in the master branch:
commit e342a8fc3bc777971f76aff0f89b8b121876a532
Author: Guillem Jover 
Date:   Sun Jul 3 21:29:43 2011 +0200

Use “command line” instead of commandline or command-line

diff --git a/TODO b/TODO
index e1b1f18..6af952e 100644
--- a/TODO
+++ b/TODO
@@ -69,7 +69,6 @@ TODO
- Check position of short option before long option.
- Use [option...] instead of [options] and friends?
- Fix dpkg man page, refs to dpkg-deb and dpkg-split, etc.
-   - Fix «commandline» vs «command line».
- Fix «.  ».
 
  * L10n:
diff --git a/debian/usertags b/debian/usertags
index 0a0d9c1..9353bc8 100644
--- a/debian/usertags
+++ b/debian/usertags
@@ -27,7 +27,7 @@ file-metadata File metadata tracking (perm, 
acl, cap, hash).
 trivial[TRIVIAL]   Bug should be trivial to fix.
 perf   [PERF]  Performance problems.
 new-field  Request for new control file fields.
-new-option Request for new command-line option.
+new-option Request for new command line option.
 deb-format Changes to the binary (.deb) format.
 dsc-format Changes to the source (.dsc) format.
 arch   [ARCH]  Updates to ‘cputable’, ‘ostable’ and porting
@@ -155,7 +155,7 @@ usercategory dpkg-class [hidden]
   + Performance issue [perf]
   + Trivial fix [trivial]
   + New control field [new-field]
-  + New command-line option [new-option]
+  + New command line option [new-option]
   + Binary package format [deb-format]
   + Source package format [dsc-format]
   + Architecture specific issue [arch]
diff --git a/doc/README.api b/doc/README.api
index fe575ad..6cd8eb2 100644
--- a/doc/README.api
+++ b/doc/README.api
@@ -31,7 +31,7 @@ What: custom changelog parsers in /usr/lib/dpkg/parsechangelog
 Status: stable
 Version: 2.0
 Description:
- Since dpkg 1.14.16, the set of command-line options that custom
+ Since dpkg 1.14.16, the set of command line options that custom
  changelog parsers must support has been expanded (see
  dpkg-parsechangelog(1)). For compatibility, changelog parsers supporting
  only the old options are supported in lenny. In lenny+1, that support
diff --git a/doc/triggers.txt b/doc/triggers.txt
index 77668ed..75579fa 100644
--- a/doc/triggers.txt
+++ b/doc/triggers.txt
@@ -312,7 +312,7 @@ by dpkg-trigger).  dpkg-deb will be changed to warn about 
unrecognised
 trigger names syntaxes and unrecognised trigger control directives.
 
 
-New command-line interfaces to dpkg tools
+New command line interfaces to dpkg tools
 -
 
 See dpkg(1).
diff --git a/man/dpkg-source.1 b/man/dpkg-source.1
index 2d83146..f752a4e 100644
--- a/man/dpkg-source.1
+++ b/man/dpkg-source.1
@@ -1,5 +1,5 @@
 .\" Authors: Ian Jackson, Raphaël Hertzog
-.TH dpkg\-source 1 "2011-03-04" "Debian Project" "dpkg utilities"
+.TH dpkg\-source 1 "2011-07-03" "Debian Project" "dpkg utilities"
 .SH NAME
 dpkg\-source \- Debian source package (.dsc) manipulation tool
 .
@@ -57,7 +57,7 @@ additional parameters might be accepted.
 
 \fBdpkg\-source\fP will build the source package with the first format
 found in this ordered list:
-the format indicated with the \fI\-\-format\fP command-line option,
+the format indicated with the \fI\-\-format\fP command line option,
 the format indicated in \fBdebian/source/format\fP,
 "1.0". The fallback to "1.0" is deprecated and will be removed at some
 point in the future, you should always document the desired source format
diff --git a/man/dselect.1 b/man/dselect.1
index cddf29e..d20d499 100644
--- a/man/dselect.1
+++ b/man/dselect.1
@@ -1,4 +1,4 @@
-.TH dselect 1 "2010-03-07" "Debian Project" "Debian"
+.TH dselect 1 "2011-07-03" "Debian Project" "Debian"
 .SH NAME
 dselect \- Debian package management frontend
 .
@@ -38,15 +38,15 @@ package \fBapt\fP.
 Normally \fBdselect\fP is invoked without parameters. An interactive
 menu is presented, offering the user a list of actions. If an action
 is given as argument, then that action is started immediately. Several
-commandline parameters are still available to modify the running behaviour
+command line parameters are still available to modify the running behaviour
 of \fBdselect\fP or show additional information about the program.
 .
 .SH OPTIONS
-All options can be specified both on the commandline and in the \fBdselect\fP
+All options can be specified both on the command line and in the \fBdselect\fP
 configuration file \fI/etc/dpkg/dselect.cfg\fP or the files on the
 configuration directory \fI/etc/dpkg/dpkg.cfg.d/\fP. Each line in the
 configuration file is either an option (exactly the same as the
-commandline option but without leading dashes) or a comment (if it starts
+command line option but without leading dashes) or a comment (if it starts
 with a \fB#\fR).
 .br
 .TP
diff --git a/man/dselect.cfg.5 b/man/dselect.cfg.5
index c6cfbed..877

[SCM] dpkg's main repository branch, master, updated. 1.16.0.3-160-gc819a40

2011-07-07 Thread Guillem Jover
The following commit has been merged in the master branch:
commit ec206bf34be3733a665840432f70faf149f2c008
Author: Guillem Jover 
Date:   Sat Jul 2 01:58:33 2011 +0200

libdpkg: Add new progname module handling functions

diff --git a/configure.ac b/configure.ac
index 390a868..9b33080 100644
--- a/configure.ac
+++ b/configure.ac
@@ -80,11 +80,12 @@ DPKG_FUNC_C99_SNPRINTF
 DPKG_CHECK_DECL([offsetof], [stddef.h])
 DPKG_CHECK_DECL([WCOREDUMP], [sys/wait.h])
 DPKG_CHECK_DECL([TIOCNOTTY], [sys/ioctl.h])
+DPKG_CHECK_PROGNAME
 DPKG_CHECK_COMPAT_FUNCS([getopt getopt_long obstack_free \
  strnlen strerror strsignal asprintf \
  scandir alphasort unsetenv])
 AC_CHECK_FUNCS([strtoul strtoimax isascii bcopy memcpy setsid getdtablesize \
-lutimes posix_fadvise])
+getprogname getexecname lutimes posix_fadvise])
 
 DPKG_MMAP
 
diff --git a/lib/dpkg/Makefile.am b/lib/dpkg/Makefile.am
index 04c4be9..a1c8f8e 100644
--- a/lib/dpkg/Makefile.am
+++ b/lib/dpkg/Makefile.am
@@ -56,6 +56,7 @@ libdpkg_a_SOURCES = \
pkg-list.c \
pkg-queue.c \
pkg-show.c \
+   progname.c \
progress.c \
string.c \
subproc.c \
@@ -92,6 +93,7 @@ pkginclude_HEADERS = \
pkg-list.h \
pkg-queue.h \
pkg-show.h \
+   progname.h \
progress.h \
string.h \
subproc.h \
diff --git a/lib/dpkg/libdpkg.Versions b/lib/dpkg/libdpkg.Versions
index c3311e6..b035276 100644
--- a/lib/dpkg/libdpkg.Versions
+++ b/lib/dpkg/libdpkg.Versions
@@ -1,5 +1,9 @@
 LIBDPKG_0 {
 global:
+   # Program name
+   dpkg_set_progname;
+   dpkg_get_progname;
+
# Ar support
dpkg_ar_normalize_name;
 
diff --git a/lib/dpkg/progname.c b/lib/dpkg/progname.c
new file mode 100644
index 000..0d4ef37
--- /dev/null
+++ b/lib/dpkg/progname.c
@@ -0,0 +1,83 @@
+/*
+ * libdpkg - Debian packaging suite library routines
+ * progname.c - program name handling functions
+ *
+ * Copyright © 2011 Guillem Jover 
+ *
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see .
+ */
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+
+static const char *progname;
+
+/**
+ * Set the program name.
+ *
+ * This function will set the program name which will be used by error
+ * reporting functions, among others.
+ *
+ * @param name The new program name.
+ */
+void
+dpkg_set_progname(const char *name)
+{
+   const char *last_slash;
+
+   last_slash = strrchr(name, '/');
+   if (last_slash == NULL)
+   progname = name;
+   else
+   progname = last_slash + 1;
+}
+
+#if defined(HAVE___PROGNAME)
+extern const char *__progname;
+#endif
+
+/**
+ * Get the program name.
+ *
+ * The program name might have been set previously by dpkg_set_progname(),
+ * but if not this function will try to initialize it by system dependant
+ * means, so it's half safe to not call dpkg_set_progname() at all. At worst
+ * the function might return NULL in that case.
+ *
+ * @return A pointer to a static buffer with the program name.
+ */
+const char *
+dpkg_get_progname(void)
+{
+   if (progname == NULL) {
+#if defined(HAVE_PROGRAM_INVOCATION_SHORT_NAME)
+   progname = program_invocation_short_name;
+#elif defined(HAVE___PROGNAME)
+   progname = __progname;
+#elif defined(HAVE_GETPROGNAME)
+   progname = getprogname();
+#elif defined(HAVE_GETEXECNAME)
+   /* getexecname(3) returns an absolute path, normalize it. */
+   dpkg_set_progname(getexecname());
+#endif
+   }
+
+   return progname;
+}
diff --git a/lib/dpkg/dir.h b/lib/dpkg/progname.h
similarity index 70%
copy from lib/dpkg/dir.h
copy to lib/dpkg/progname.h
index ad8fa83..14034b9 100644
--- a/lib/dpkg/dir.h
+++ b/lib/dpkg/progname.h
@@ -1,8 +1,8 @@
 /*
  * libdpkg - Debian packaging suite library routines
- * dir.h - directory handling routines
+ * progname.h - program name handling functions
  *
- * Copyright © 2010 Guillem Jover 
+ * Copyright © 2011 Guillem Jover 
  *
  * 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,16 @@
  * along with this program.  If not, see .
  */
 
-#ifndef LIBDPKG_DIR_H
-#define LIBDPKG_DIR_H
+#ifndef LIBDPKG_PROGNAM

[SCM] dpkg's main repository branch, master, updated. 1.16.0.3-160-gc819a40

2011-07-07 Thread Guillem Jover
The following commit has been merged in the master branch:
commit cf22cf6118035ab8ee5cc25e5298a987073c8dc8
Author: Guillem Jover 
Date:   Sun Jul 3 03:23:11 2011 +0200

libdpkg: Rename myopt module to options

diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c
index a88cb0e..75132ee 100644
--- a/dpkg-deb/build.c
+++ b/dpkg-deb/build.c
@@ -48,7 +48,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 
 #include "dpkg-deb.h"
 
diff --git a/dpkg-deb/extract.c b/dpkg-deb/extract.c
index 365be5d..2dde994 100644
--- a/dpkg-deb/extract.c
+++ b/dpkg-deb/extract.c
@@ -47,7 +47,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 
 #include "dpkg-deb.h"
 
diff --git a/dpkg-deb/info.c b/dpkg-deb/info.c
index 6f43f55..2bd0a5d 100644
--- a/dpkg-deb/info.c
+++ b/dpkg-deb/info.c
@@ -44,7 +44,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 
 #include "dpkg-deb.h"
 
diff --git a/dpkg-deb/main.c b/dpkg-deb/main.c
index 5aa6c4d..49cf5e5 100644
--- a/dpkg-deb/main.c
+++ b/dpkg-deb/main.c
@@ -42,7 +42,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 
 #include "dpkg-deb.h"
 
diff --git a/dpkg-split/info.c b/dpkg-split/info.c
index 30e0c27..6066f73 100644
--- a/dpkg-split/info.c
+++ b/dpkg-split/info.c
@@ -37,7 +37,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 
 #include "dpkg-split.h"
 
diff --git a/dpkg-split/join.c b/dpkg-split/join.c
index 03017c8..95ed64a 100644
--- a/dpkg-split/join.c
+++ b/dpkg-split/join.c
@@ -33,7 +33,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 
 #include "dpkg-split.h"
 
diff --git a/dpkg-split/main.c b/dpkg-split/main.c
index c6d956d..c4e7b33 100644
--- a/dpkg-split/main.c
+++ b/dpkg-split/main.c
@@ -37,7 +37,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 
 #include "dpkg-split.h"
 
diff --git a/dpkg-split/queue.c b/dpkg-split/queue.c
index 5372434..e758feb 100644
--- a/dpkg-split/queue.c
+++ b/dpkg-split/queue.c
@@ -39,7 +39,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 
 #include "dpkg-split.h"
 
diff --git a/dpkg-split/split.c b/dpkg-split/split.c
index d4fe4bc..1b40f34 100644
--- a/dpkg-split/split.c
+++ b/dpkg-split/split.c
@@ -43,7 +43,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 
 #include "dpkg-split.h"
 
diff --git a/dselect/main.cc b/dselect/main.cc
index fa58def..6508b1f 100644
--- a/dselect/main.cc
+++ b/dselect/main.cc
@@ -51,7 +51,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 
 #include "dselect.h"
 #include "bindings.h"
diff --git a/lib/dpkg/Makefile.am b/lib/dpkg/Makefile.am
index a1c8f8e..7950835 100644
--- a/lib/dpkg/Makefile.am
+++ b/lib/dpkg/Makefile.am
@@ -43,9 +43,9 @@ libdpkg_a_SOURCES = \
log.c \
md5.c md5.h \
mlib.c \
-   myopt.c \
namevalue.c \
nfmalloc.c \
+   options.c \
parse.c \
parsehelp.c \
path.c \
@@ -83,8 +83,8 @@ pkginclude_HEADERS = \
file.h \
glob.h \
macros.h \
-   myopt.h \
namevalue.h \
+   options.h \
parsedump.h \
path.h \
pkg.h \
diff --git a/lib/dpkg/myopt.c b/lib/dpkg/options.c
similarity index 99%
rename from lib/dpkg/myopt.c
rename to lib/dpkg/options.c
index 4181a90..3575e29 100644
--- a/lib/dpkg/myopt.c
+++ b/lib/dpkg/options.c
@@ -1,6 +1,6 @@
 /*
  * libdpkg - Debian packaging suite library routines
- * myopt.c - my very own option parsing
+ * options.c - option parsing functions
  *
  * Copyright © 1994,1995 Ian Jackson 
  * Copyright © 2000,2002 Wichert Akkerman 
@@ -33,7 +33,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 
 static const char *printforhelp;
 
diff --git a/lib/dpkg/myopt.h b/lib/dpkg/options.h
similarity index 94%
rename from lib/dpkg/myopt.h
rename to lib/dpkg/options.h
index 230fd89..ba415bf 100644
--- a/lib/dpkg/myopt.h
+++ b/lib/dpkg/options.h
@@ -1,6 +1,6 @@
 /*
  * libdpkg - Debian packaging suite library routines
- * myopt.h - declarations for my very own option parsing
+ * options.h - option parsing functions
  *
  * Copyright © 1994,1995 Ian Jackson 
  *
@@ -18,8 +18,8 @@
  * along with this program.  If not, see .
  */
 
-#ifndef MYOPT_H
-#define MYOPT_H
+#ifndef LIBDPKG_OPTIONS_H
+#define LIBDPKG_OPTIONS_H
 
 #include 
 
@@ -72,4 +72,4 @@ void setobsolete(const struct cmdinfo *cip, const char 
*value);
 
 DPKG_END_DECLS
 
-#endif /* MYOPT_H */
+#endif /* LIBDPKG_OPTIONS_H */
diff --git a/src/archives.c b/src/archives.c
index ff1d273..f060e70 100644
--- a/src/archives.c
+++ b/src/archives.c
@@ -51,7 +51,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 
 #ifdef WITH_SELINUX
diff --git a/src/cleanup.c b/src/cleanup.c
index 91ffb2c..eff81aa 100644
--- a/src/cleanup.c
+++ b/src/cleanup.c
@@ -37,7 +37,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 
 #include "filesdb.h"
 #include "main.h"
diff --git a/src/divertcmd.c b/src/divertcmd.c
index efd08b5..a37624e 100644
--- a/src/divertcmd

[SCM] dpkg's main repository branch, master, updated. 1.16.0.3-160-gc819a40

2011-07-07 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 668ab0d8ab99dcc7a63d58bc1d859d857e3e939e
Author: Guillem Jover 
Date:   Mon Jul 4 04:10:32 2011 +0200

libdpkg: Rename sigaction variables in subproc module to sa and sa_save

diff --git a/lib/dpkg/subproc.c b/lib/dpkg/subproc.c
index 4006ffe..f38eafe 100644
--- a/lib/dpkg/subproc.c
+++ b/lib/dpkg/subproc.c
@@ -36,21 +36,22 @@
 #include 
 
 static int catch_signals[] = { SIGQUIT, SIGINT };
-static struct sigaction uncatch_signals[array_count(catch_signals)];
+static struct sigaction sa_save[array_count(catch_signals)];
 
 void
 subproc_signals_setup(const char *name)
 {
+   struct sigaction sa;
size_t i;
-   struct sigaction catchsig;
 
onerr_abort++;
-   memset(&catchsig, 0, sizeof(catchsig));
-   catchsig.sa_handler = SIG_IGN;
-   sigemptyset(&catchsig.sa_mask);
-   catchsig.sa_flags = 0;
+   memset(&sa, 0, sizeof(sa));
+   sigemptyset(&sa.sa_mask);
+   sa.sa_handler = SIG_IGN;
+   sa.sa_flags = 0;
+
for (i = 0; i < array_count(catch_signals); i++)
-   if (sigaction(catch_signals[i], &catchsig, &uncatch_signals[i]))
+   if (sigaction(catch_signals[i], &sa, &sa_save[i]))
ohshite(_("unable to ignore signal %s before running 
%.250s"),
strsignal(catch_signals[i]), name);
push_cleanup(subproc_signals_cleanup, ~0, NULL, 0, 0);
@@ -63,7 +64,7 @@ subproc_signals_cleanup(int argc, void **argv)
size_t i;
 
for (i = 0; i < array_count(catch_signals); i++) {
-   if (sigaction(catch_signals[i], &uncatch_signals[i], NULL)) {
+   if (sigaction(catch_signals[i], &sa_save[i], NULL)) {
fprintf(stderr, _("error un-catching signal %s: %s\n"),
strsignal(catch_signals[i]), strerror(errno));
onerr_abort++;

-- 
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.3-160-gc819a40

2011-07-07 Thread Guillem Jover
The following commit has been merged in the master branch:
commit b81ec0a39b7ccba925fb0fb8f0664a0671dbc2dc
Author: Guillem Jover 
Date:   Mon Jul 4 03:19:04 2011 +0200

libdpkg: Rename variable r to pid in subproc_fork()

diff --git a/lib/dpkg/subproc.c b/lib/dpkg/subproc.c
index 4b9c1e5..4006ffe 100644
--- a/lib/dpkg/subproc.c
+++ b/lib/dpkg/subproc.c
@@ -80,21 +80,21 @@ print_subproc_error(const char *emsg, const char 
*contextstring)
 pid_t
 subproc_fork(void)
 {
-   pid_t r;
+   pid_t pid;
 
-   r = fork();
-   if (r == -1) {
+   pid = fork();
+   if (pid == -1) {
onerr_abort++;
ohshite(_("fork failed"));
}
-   if (r > 0)
-   return r;
+   if (pid > 0)
+   return pid;
 
/* Push a new error context, so that we don't do the other cleanups,
 * because they'll be done by/in the parent process. */
push_error_context_func(catch_fatal_error, print_subproc_error, NULL);
 
-   return r;
+   return pid;
 }
 
 int

-- 
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.3-160-gc819a40

2011-07-07 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 01d9ba9dfa1695ab12bd4a09f9f35a6e18c09788
Author: Guillem Jover 
Date:   Sat Jul 2 02:23:27 2011 +0200

Fix comment header lines describing the subproject

diff --git a/dselect/bindings.h b/dselect/bindings.h
index 7a7fe6f..2566e49 100644
--- a/dselect/bindings.h
+++ b/dselect/bindings.h
@@ -1,5 +1,5 @@
 /* -*- c++ -*-
- * dselect - selection of Debian packages
+ * dselect - Debian package maintenance user interface
  * bindings.h - keybindings class header file
  *
  * Copyright © 1994,1995 Ian Jackson 
diff --git a/dselect/dselect-curses.h b/dselect/dselect-curses.h
index f670d27..6a3ffdb 100644
--- a/dselect/dselect-curses.h
+++ b/dselect/dselect-curses.h
@@ -1,5 +1,5 @@
 /* -*- c++ -*-
- * dselect - selection of Debian packages
+ * dselect - Debian package maintenance user interface
  * dselect-curses.h - curses header wrapper
  *
  * Copyright © 2009 Guillem Jover 
diff --git a/dselect/dselect.h b/dselect/dselect.h
index 1d05e44..1c8589d 100644
--- a/dselect/dselect.h
+++ b/dselect/dselect.h
@@ -1,5 +1,5 @@
 /* -*- c++ -*-
- * dselect - selection of Debian packages
+ * dselect - Debian package maintenance user interface
  * dselect.h - external definitions for this program
  *
  * Copyright © 1994,1995 Ian Jackson 
diff --git a/dselect/pkglist.h b/dselect/pkglist.h
index 2169255..5c538e9 100644
--- a/dselect/pkglist.h
+++ b/dselect/pkglist.h
@@ -1,5 +1,5 @@
 /* -*- c++ -*-
- * dselect - selection of Debian packages
+ * dselect - Debian package maintenance user interface
  * pkglist.h - external definitions for package list handling
  *
  * Copyright © 1994,1995 Ian Jackson 
diff --git a/lib/dpkg/dbmodify.c b/lib/dpkg/dbmodify.c
index b12b487..f514ddc 100644
--- a/lib/dpkg/dbmodify.c
+++ b/lib/dpkg/dbmodify.c
@@ -1,5 +1,5 @@
 /*
- * dpkg - main program for package management
+ * libdpkg - Debian packaging suite library routines
  * dbmodify.c - routines for managing dpkg database updates
  *
  * Copyright © 1994,1995 Ian Jackson 
diff --git a/lib/dpkg/fdio.c b/lib/dpkg/fdio.c
index bfc2d16..a3f46a3 100644
--- a/lib/dpkg/fdio.c
+++ b/lib/dpkg/fdio.c
@@ -1,5 +1,5 @@
 /*
- * libdpkg - main program for package management
+ * libdpkg - Debian packaging suite library routines
  * fdio.c - safe file descriptor based input/output
  *
  * Copyright © 2009-2010 Guillem Jover 
diff --git a/lib/dpkg/fdio.h b/lib/dpkg/fdio.h
index 3a4e8ee..fd5bdaa 100644
--- a/lib/dpkg/fdio.h
+++ b/lib/dpkg/fdio.h
@@ -1,5 +1,5 @@
 /*
- * libdpkg - main program for package management
+ * libdpkg - Debian packaging suite library routines
  * fdio.h - safe file descriptor based input/output
  *
  * Copyright © 2009-2010 Guillem Jover 
diff --git a/lib/dpkg/glob.c b/lib/dpkg/glob.c
index f2a6e50..92da6a3 100644
--- a/lib/dpkg/glob.c
+++ b/lib/dpkg/glob.c
@@ -1,5 +1,5 @@
 /*
- * dpkg - main program for package management
+ * libdpkg - Debian packaging suite library routines
  * glob.c - file globing functions
  *
  * Copyright © 2009, 2010 Guillem Jover 
diff --git a/lib/dpkg/glob.h b/lib/dpkg/glob.h
index 5cd44f2..eaf2af7 100644
--- a/lib/dpkg/glob.h
+++ b/lib/dpkg/glob.h
@@ -1,5 +1,5 @@
 /*
- * dpkg - main program for package management
+ * libdpkg - Debian packaging suite library routines
  * glob.h - file globing functions
  *
  * Copyright © 2009, 2010 Guillem Jover 
diff --git a/lib/dpkg/log.c b/lib/dpkg/log.c
index b8e5e9f..00b2f68 100644
--- a/lib/dpkg/log.c
+++ b/lib/dpkg/log.c
@@ -1,5 +1,5 @@
 /*
- * dpkg - main program for package management
+ * libdpkg - Debian packaging suite library routines
  * log.c - logging related functions
  *
  * Copyright © 2005 Scott James Remnant 
diff --git a/lib/dpkg/pkg-array.c b/lib/dpkg/pkg-array.c
index 0f1d9bf..20ff02e 100644
--- a/lib/dpkg/pkg-array.c
+++ b/lib/dpkg/pkg-array.c
@@ -1,5 +1,5 @@
 /*
- * dpkg - main program for package management
+ * libdpkg - Debian packaging suite library routines
  * pkg-array.c - primitives for pkg array handling
  *
  * Copyright © 1995,1996 Ian Jackson 
diff --git a/lib/dpkg/pkg-array.h b/lib/dpkg/pkg-array.h
index 68724c3..4e4eff5 100644
--- a/lib/dpkg/pkg-array.h
+++ b/lib/dpkg/pkg-array.h
@@ -1,5 +1,5 @@
 /*
- * dpkg - main program for package management
+ * libdpkg - Debian packaging suite library routines
  * pkg-array.h - primitives for pkg array handling
  *
  * Copyright © 2009 Guillem Jover 
diff --git a/lib/dpkg/pkg-list.c b/lib/dpkg/pkg-list.c
index 70baa08..fa7bc14 100644
--- a/lib/dpkg/pkg-list.c
+++ b/lib/dpkg/pkg-list.c
@@ -1,5 +1,5 @@
 /*
- * dpkg - main program for package management
+ * libdpkg - Debian packaging suite library routines
  * pkg-list.c - primitives for pkg linked list handling
  *
  * Copyright © 2009 Guillem Jover 
diff --git a/lib/dpkg/pkg-list.h b/lib/dpkg/pkg-list.h
index bbf26f3..73b226f 100644
--- a/lib/dpkg/pkg-list.h
+++ b/lib/dpkg/pkg-list.h
@@ -1,5 +1,5 @@
 /*
- * dpkg - main program for package management
+ * libdpkg - Debian packaging suite

[SCM] dpkg's main repository branch, master, updated. 1.16.0.3-160-gc819a40

2011-07-07 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 16354a961ce86778a3e0ca56f2fa5314855ccf3c
Author: Guillem Jover 
Date:   Sun Jul 3 03:12:40 2011 +0200

Fix printforhelp string in dpkg-divert and dpkg-statoverride

diff --git a/src/divertcmd.c b/src/divertcmd.c
index 595e25a..efd08b5 100644
--- a/src/divertcmd.c
+++ b/src/divertcmd.c
@@ -47,7 +47,7 @@
 
 
 static const char printforhelp[] = N_(
-"Use --help for help about querying packages.");
+"Use --help for help about diverting files.");
 
 static const char *admindir;
 
diff --git a/src/statcmd.c b/src/statcmd.c
index fcbbba0..b59d1b8 100644
--- a/src/statcmd.c
+++ b/src/statcmd.c
@@ -49,7 +49,7 @@
 #include "filesdb.h"
 
 static const char printforhelp[] = N_(
-"Use --help for help about querying packages.");
+"Use --help for help about overriding file stat information.");
 
 static void DPKG_ATTR_NORET
 printversion(const struct cmdinfo *cip, const char *value)

-- 
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.3-160-gc819a40

2011-07-07 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 9fe0a1b16d3045534f7863aed2e35f5177156a15
Author: Guillem Jover 
Date:   Sat Jul 2 02:00:51 2011 +0200

Use new dpkg_set_progname and dpkg_get_progname instead of thisname

The current implementation demanded libdpkg users to define thisname
themselves, which is not really a nice interface to offer to programs.

Closes: #631757

diff --git a/debian/changelog b/debian/changelog
index 2c153dc..e4e9444 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -116,6 +116,9 @@ dpkg (1.16.1) UNRELEASED; urgency=low
 Thanks to Ludovic Brenta . Closes: #630533
   * Do not fail to unpack shared directories missing on the file system
 from packages being replaced by other packages. Closes: #631808
+  * Do not require programs to define thisname, provide two new functions
+to handle the program name (dpkg_set_progname and dpkg_get_progname).
+Closes: #631757
 
   [ Bill Allombert]
   * Add support for Build-Features: build-arch. Closes: #229357
diff --git a/dpkg-deb/main.c b/dpkg-deb/main.c
index 4512a98..5aa6c4d 100644
--- a/dpkg-deb/main.c
+++ b/dpkg-deb/main.c
@@ -125,7 +125,6 @@ usage(const struct cmdinfo *cip, const char *value)
   exit(0);
 }
 
-const char thisname[]= BACKEND;
 static const char printforhelp[] =
   N_("Type dpkg-deb --help for help about manipulating *.deb files;\n"
  "Type dpkg --help for help about installing and deinstalling packages.");
@@ -189,6 +188,7 @@ int main(int argc, const char *const *argv) {
   bindtextdomain(PACKAGE, LOCALEDIR);
   textdomain(PACKAGE);
 
+  dpkg_set_progname(BACKEND);
   standard_startup();
   myopt(&argv, cmdinfos, printforhelp);
 
diff --git a/dpkg-split/main.c b/dpkg-split/main.c
index e92ba29..c6d956d 100644
--- a/dpkg-split/main.c
+++ b/dpkg-split/main.c
@@ -100,7 +100,6 @@ usage(const struct cmdinfo *cip, const char *value)
   exit(0);
 }
 
-const char thisname[]= SPLITTER;
 static const char printforhelp[] = N_("Type dpkg-split --help for help.");
 
 struct partqueue *queue= NULL;
@@ -159,6 +158,7 @@ int main(int argc, const char *const *argv) {
   bindtextdomain(PACKAGE, LOCALEDIR);
   textdomain(PACKAGE);
 
+  dpkg_set_progname(SPLITTER);
   standard_startup();
   myopt(&argv, cmdinfos, printforhelp);
 
diff --git a/dselect/main.cc b/dselect/main.cc
index 15c86a9..fa58def 100644
--- a/dselect/main.cc
+++ b/dselect/main.cc
@@ -57,7 +57,6 @@
 #include "bindings.h"
 #include "pkglist.h"
 
-const char thisname[]= DSELECT;
 static const char printforhelp[] = N_("Type dselect --help for help.");
 
 modstatdb_rw readwrite;
@@ -514,6 +513,8 @@ main(int, const char *const *argv)
   bindtextdomain(DSELECT, LOCALEDIR);
   textdomain(DSELECT);
 
+  dpkg_set_progname(DSELECT);
+
   push_error_context_func(dselect_catch_fatal_error, print_fatal_error, 0);
 
   loadcfgfile(DSELECT, cmdinfos);
diff --git a/lib/dpkg/dpkg.h b/lib/dpkg/dpkg.h
index d191233..3bfbd7a 100644
--- a/lib/dpkg/dpkg.h
+++ b/lib/dpkg/dpkg.h
@@ -98,6 +98,7 @@ DPKG_BEGIN_DECLS
 
 #define FIND_EXPRSTARTCHARS "-(),!"
 
+#include 
 #include 
 
 /*** from startup.c ***/
diff --git a/lib/dpkg/ehandle.c b/lib/dpkg/ehandle.c
index f73648d..c2fbd6f 100644
--- a/lib/dpkg/ehandle.c
+++ b/lib/dpkg/ehandle.c
@@ -31,6 +31,7 @@
 
 #include 
 #include 
+#include 
 #include 
 
 /* 6x255 for inserted strings (%.255s &c in fmt; and %s with limited length 
arg)
@@ -91,13 +92,13 @@ run_error_handler(void)
  * abort. Hopefully the user can fix the situation (out of disk, out
  * of memory, etc). */
 fprintf(stderr, _("%s: unrecoverable fatal error, aborting:\n %s\n"),
-thisname, errmsg);
+dpkg_get_progname(), errmsg);
 exit(2);
   }
 
   if (econtext == NULL) {
 fprintf(stderr, _("%s: outside error context, aborting:\n %s\n"),
-thisname, errmsg);
+dpkg_get_progname(), errmsg);
 exit(2);
   } else if (econtext->handler_type == handler_type_func) {
 econtext->handler.func();
@@ -179,7 +180,8 @@ push_error_context(void)
 static void
 print_cleanup_error(const char *emsg, const char *contextstring)
 {
-  fprintf(stderr, _("%s: error while cleaning up:\n %s\n"),thisname,emsg);
+  fprintf(stderr, _("%s: error while cleaning up:\n %s\n"),
+  dpkg_get_progname(), emsg);
 }
 
 static void
@@ -197,7 +199,7 @@ run_cleanups(struct error_context *econ, int flagsetin)
   if (++preventrecurse > 3) {
 onerr_abort++;
 fprintf(stderr, _("%s: too many nested errors during error recovery!!\n"),
-thisname);
+dpkg_get_progname());
 flagset= 0;
   } else {
 flagset= flagsetin;
@@ -347,7 +349,7 @@ catch_fatal_error(void)
 void
 print_fatal_error(const char *emsg, const char *contextstring)
 {
-  fprintf(stderr, _("%s: error: %s\n"), thisname, emsg);
+  fprintf(stderr, _("%s: error: %s\n"), dpkg_get_progname(), emsg);
 }
 
 void
@@ -388,7 +390,7 @@ warningv(const char *fmt, va_list args)
 
   warn_count++;
   vsnprint

[SCM] dpkg's main repository branch, master, updated. 1.16.0.3-160-gc819a40

2011-07-07 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 0fc0d6d598c045c77d056b40446208448b9ec6e2
Author: Guillem Jover 
Date:   Fri Jul 1 04:22:51 2011 +0200

libdpkg: Do not require programs to define printforhelp

Instead define it in myopt.c and initialize it through a new argument to
myopt().

diff --git a/dpkg-deb/main.c b/dpkg-deb/main.c
index 9543412..4512a98 100644
--- a/dpkg-deb/main.c
+++ b/dpkg-deb/main.c
@@ -126,7 +126,7 @@ usage(const struct cmdinfo *cip, const char *value)
 }
 
 const char thisname[]= BACKEND;
-const char printforhelp[]=
+static const char printforhelp[] =
   N_("Type dpkg-deb --help for help about manipulating *.deb files;\n"
  "Type dpkg --help for help about installing and deinstalling packages.");
 
@@ -190,7 +190,7 @@ int main(int argc, const char *const *argv) {
   textdomain(PACKAGE);
 
   standard_startup();
-  myopt(&argv, cmdinfos);
+  myopt(&argv, cmdinfos, printforhelp);
 
   if (!cipaction) badusage(_("need an action option"));
 
diff --git a/dpkg-split/main.c b/dpkg-split/main.c
index 860fca5..e92ba29 100644
--- a/dpkg-split/main.c
+++ b/dpkg-split/main.c
@@ -101,7 +101,7 @@ usage(const struct cmdinfo *cip, const char *value)
 }
 
 const char thisname[]= SPLITTER;
-const char printforhelp[]= N_("Type dpkg-split --help for help.");
+static const char printforhelp[] = N_("Type dpkg-split --help for help.");
 
 struct partqueue *queue= NULL;
 
@@ -160,7 +160,7 @@ int main(int argc, const char *const *argv) {
   textdomain(PACKAGE);
 
   standard_startup();
-  myopt(&argv, cmdinfos);
+  myopt(&argv, cmdinfos, printforhelp);
 
   if (!cipaction) badusage(_("need an action option"));
 
diff --git a/dselect/main.cc b/dselect/main.cc
index b00bb12..15c86a9 100644
--- a/dselect/main.cc
+++ b/dselect/main.cc
@@ -58,7 +58,7 @@
 #include "pkglist.h"
 
 const char thisname[]= DSELECT;
-const char printforhelp[]= N_("Type dselect --help for help.");
+static const char printforhelp[] = N_("Type dselect --help for help.");
 
 modstatdb_rw readwrite;
 int expertmode= 0;
@@ -517,7 +517,7 @@ main(int, const char *const *argv)
   push_error_context_func(dselect_catch_fatal_error, print_fatal_error, 0);
 
   loadcfgfile(DSELECT, cmdinfos);
-  myopt(&argv,cmdinfos);
+  myopt(&argv, cmdinfos, printforhelp);
 
   admindir = dpkg_db_set_dir(admindir);
 
diff --git a/lib/dpkg/libdpkg.Versions b/lib/dpkg/libdpkg.Versions
index c72ffec..c3311e6 100644
--- a/lib/dpkg/libdpkg.Versions
+++ b/lib/dpkg/libdpkg.Versions
@@ -134,7 +134,6 @@ LIBDPKG_PRIVATE {
loadcfgfile;
myopt;
badusage;
-   # printforhelp; # XXX variable, do not require external
# thisname; # XXX variable, do not require external
cipaction;  # XXX variable, do not export
setaction;
diff --git a/lib/dpkg/myopt.c b/lib/dpkg/myopt.c
index ea8a310..4181a90 100644
--- a/lib/dpkg/myopt.c
+++ b/lib/dpkg/myopt.c
@@ -35,6 +35,8 @@
 #include 
 #include 
 
+static const char *printforhelp;
+
 void
 badusage(const char *fmt, ...)
 {
@@ -198,11 +200,16 @@ void loadcfgfile(const char *prog, const struct cmdinfo* 
cmdinfos) {
   }
 }
 
-void myopt(const char *const **argvp, const struct cmdinfo *cmdinfos) {
+void
+myopt(const char *const **argvp, const struct cmdinfo *cmdinfos,
+  const char *help_str)
+{
   const struct cmdinfo *cip;
   const char *p, *value;
   int l;
 
+  printforhelp = help_str;
+
   ++(*argvp);
   while ((p= **argvp) && *p == '-') {
 ++(*argvp);
diff --git a/lib/dpkg/myopt.h b/lib/dpkg/myopt.h
index d8e32fa..230fd89 100644
--- a/lib/dpkg/myopt.h
+++ b/lib/dpkg/myopt.h
@@ -48,14 +48,13 @@ struct cmdinfo {
   action_func *action;
 };
 
-extern const char printforhelp[];
-
 void badusage(const char *fmt, ...) DPKG_ATTR_NORET DPKG_ATTR_PRINTF(1);
 
 #define MAX_CONFIG_LINE 1024
 
 void myfileopt(const char* fn, const struct cmdinfo* cmdinfos);
-void myopt(const char *const **argvp, const struct cmdinfo *cmdinfos);
+void myopt(const char *const **argvp, const struct cmdinfo *cmdinfos,
+   const char *help_str);
 void loadcfgfile(const char *prog, const struct cmdinfo *cmdinfos);
 
 /**
diff --git a/src/divertcmd.c b/src/divertcmd.c
index 5ea6c65..d88ecd0 100644
--- a/src/divertcmd.c
+++ b/src/divertcmd.c
@@ -47,7 +47,8 @@
 
 
 const char thisname[] = "dpkg-divert";
-const char printforhelp[] = N_("Use --help for help about querying packages.");
+static const char printforhelp[] = N_(
+"Use --help for help about querying packages.");
 
 static const char *admindir;
 
@@ -698,7 +699,7 @@ main(int argc, const char * const *argv)
textdomain(PACKAGE);
 
standard_startup();
-   myopt(&argv, cmdinfos);
+   myopt(&argv, cmdinfos, printforhelp);
 
admindir = dpkg_db_set_dir(admindir);
 
diff --git a/src/main.c b/src/main.c
index 000e589..fbda5f1 100644
--- a/src/main.c
+++ b/src/main.c
@@ -167,7 +167,7 @@ usage(const struct cmdinfo *ci, const char *value)
 
 const char thisnam

[SCM] dpkg's main repository branch, master, updated. 1.16.0.3-160-gc819a40

2011-07-07 Thread Guillem Jover
The following commit has been merged in the master branch:
commit cd92cc77e5103b31ce15b746bd71095b859ac08b
Author: Guillem Jover 
Date:   Sat Jul 2 02:04:28 2011 +0200

libdpkg: Add missing macros for program names

Specifically for dpkg-divert, dpkg-statoverride and dpkg-trigger.

diff --git a/lib/dpkg/dpkg.h b/lib/dpkg/dpkg.h
index a0aa520..d191233 100644
--- a/lib/dpkg/dpkg.h
+++ b/lib/dpkg/dpkg.h
@@ -83,8 +83,11 @@ DPKG_BEGIN_DECLS
 #define MAXTRIGDIRECTIVE 256
 
 #define BACKEND"dpkg-deb"
-#define DPKGQUERY  "dpkg-query"
 #define SPLITTER   "dpkg-split"
+#define DPKGQUERY  "dpkg-query"
+#define DPKGDIVERT "dpkg-divert"
+#define DPKGSTAT   "dpkg-statoverride"
+#define DPKGTRIGGER"dpkg-trigger"
 #define DPKG   "dpkg"
 #define DEBSIGVERIFY   "/usr/bin/debsig-verify"
 

-- 
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.3-160-gc819a40

2011-07-07 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 4da4c894719c7d33a3e44645630f63172cfd4c99
Author: Guillem Jover 
Date:   Wed May 4 02:02:57 2011 +0200

libdpkg: Add missing symbols to the version script

diff --git a/lib/dpkg/libdpkg.Versions b/lib/dpkg/libdpkg.Versions
index 3997fb6..c72ffec 100644
--- a/lib/dpkg/libdpkg.Versions
+++ b/lib/dpkg/libdpkg.Versions
@@ -54,6 +54,7 @@ LIBDPKG_PRIVATE {
 
str_escape_fmt;
str_strip_quotes;
+   str_quote_meta;
 
# Variable buffer support
varbuf_init;
@@ -219,6 +220,10 @@ LIBDPKG_PRIVATE {
parsedb;
writedb;
 
+   dpkg_db_set_dir;
+   dpkg_db_get_dir;
+   dpkg_db_get_path;
+
# Log based package on-disk database support
modstatdb_init;
modstatdb_is_locked;

-- 
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.3-160-gc819a40

2011-07-07 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 87809163331a320f9562d75591fcc6c954b9f80c
Author: Guillem Jover 
Date:   Fri Jun 17 17:00:30 2011 +0200

dpkg-deb: Always chdir(2) in the childs to not change the global state

To not disturb the global program state we should always chdir(2) in the
childs that actually need it. This will allow in the future to switch
this code to be part of a library.

diff --git a/dpkg-deb/extract.c b/dpkg-deb/extract.c
index b458c1f..365be5d 100644
--- a/dpkg-deb/extract.c
+++ b/dpkg-deb/extract.c
@@ -288,19 +288,6 @@ extracthalf(const char *debar, const char *dir, const char 
*taroption,
   close(arfd);
   if (taroption) close(p2[1]);
 
-  if (taroption && dir) {
-if (chdir(dir)) {
-  if (errno == ENOENT) {
-if (mkdir(dir, 0777))
-  ohshite(_("failed to create directory"));
-if (chdir(dir))
-  ohshite(_("failed to chdir to directory after creating it"));
-  } else {
-ohshite(_("failed to chdir to directory"));
-  }
-}
-  }
-
   if (taroption) {
 c3 = subproc_fork();
 if (!c3) {
@@ -314,6 +301,18 @@ extracthalf(const char *debar, const char *dir, const char 
*taroption,
 
   unsetenv("TAR_OPTIONS");
 
+  if (dir) {
+if (chdir(dir)) {
+  if (errno != ENOENT)
+ohshite(_("failed to chdir to directory"));
+
+  if (mkdir(dir, 0777))
+ohshite(_("failed to create directory"));
+  if (chdir(dir))
+ohshite(_("failed to chdir to directory after creating it"));
+}
+  }
+
   execlp(TAR, "tar", buffer, "-", NULL);
   ohshite(_("unable to execute %s (%s)"), "tar", TAR);
 }
diff --git a/dpkg-deb/info.c b/dpkg-deb/info.c
index c20466d..6f43f55 100644
--- a/dpkg-deb/info.c
+++ b/dpkg-deb/info.c
@@ -54,13 +54,13 @@ static void cu_info_prepare(int argc, void **argv) {
   struct stat stab;
 
   dir = argv[0];
-  if (chdir("/"))
-ohshite(_("failed to chdir to `/' for cleanup"));
   if (lstat(dir, &stab) && errno == ENOENT)
 return;
 
   pid = subproc_fork();
   if (pid == 0) {
+if (chdir("/"))
+  ohshite(_("failed to chdir to `/' for cleanup"));
 execlp(RM, "rm", "-rf", dir, NULL);
 ohshite(_("unable to execute %s (%s)"), _("rm command for cleanup"), RM);
   }

-- 
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.3-160-gc819a40

2011-07-07 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 6ab502b6a7a3718b697e7c1020fcd5d7f9fd2d67
Author: Guillem Jover 
Date:   Thu Jul 7 07:11:06 2011 +0200

dpkg: Use braces on ‘if’ to avoid ambiguous ‘else’

Warning introduced in commit fc625d161382abc41b984ca9ee1e32ad4f295c67.

diff --git a/src/archives.c b/src/archives.c
index c9afe72..ff1d273 100644
--- a/src/archives.c
+++ b/src/archives.c
@@ -619,11 +619,12 @@ tarobject(void *ctx, struct tar_entry *ti)
  conff = conff->next) {
   if (!conff->obsolete)
 continue;
-  if (stat(conff->name, &stabtmp))
+  if (stat(conff->name, &stabtmp)) {
 if (errno == ENOENT || errno == ENOTDIR || errno == ELOOP)
   continue;
 else
   ohshite(_("cannot stat file '%s'"), conff->name);
+  }
   if (stabtmp.st_dev == stab.st_dev &&
   stabtmp.st_ino == stab.st_ino)
 break;

-- 
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