[SCM] dpkg's main repository branch, master, updated. 1.15.7.2-116-g8f57641

2010-06-27 Thread Sven Joachim
The following commit has been merged in the master branch:
commit 8f576412d15d80e34859c254aa748d6acc606749
Author: Sven Joachim 
Date:   Sun Jun 27 18:02:00 2010 +0200

German dpkg translation update

Update to 984t.

diff --git a/po/de.po b/po/de.po
index f0a49ce..4180661 100644
--- a/po/de.po
+++ b/po/de.po
@@ -11,7 +11,7 @@ msgstr ""
 "Project-Id-Version: Debian dpkg 1.15.8~\n"
 "Report-Msgid-Bugs-To: debian-d...@lists.debian.org\n"
 "POT-Creation-Date: 2010-06-27 10:40+0200\n"
-"PO-Revision-Date: 2010-06-15 20:22+0200\n"
+"PO-Revision-Date: 2010-06-27 18:01+0200\n"
 "Last-Translator: Sven Joachim \n"
 "Language-Team: German \n"
 "Language: de\n"
@@ -861,16 +861,12 @@ msgid "nothing after colon in version number"
 msgstr "nichts hinter Doppelpunkt in Versionsnummer"
 
 #: lib/dpkg/parsehelp.c:253
-#, fuzzy
-#| msgid "nothing after colon in version number"
 msgid "invalid character in version number"
-msgstr "nichts hinter Doppelpunkt in Versionsnummer"
+msgstr "ungültiges Zeichen in Versionsnummer"
 
 #: lib/dpkg/parsehelp.c:257
-#, fuzzy
-#| msgid "nothing after colon in version number"
 msgid "invalid character in revision number"
-msgstr "nichts hinter Doppelpunkt in Versionsnummer"
+msgstr "ungültiges Zeichen in Revisionsnummer"
 
 #: lib/dpkg/parsehelp.c:269 lib/dpkg/parsehelp.c:282
 #, c-format
@@ -1617,8 +1613,7 @@ msgid "unable to remove newly-extracted version of 
`%.250s'"
 msgstr "Kann eben entpackte Version von »%.250s« nicht entfernen"
 
 #: src/configure.c:101
-#, fuzzy, c-format
-#| msgid "unable to stat new dist conffile `%.250s'"
+#, c-format
 msgid "unable to stat new distributed conffile '%.250s'"
 msgstr "Kann kein stat auf neu verteiltes Conffile »%.250s« durchführen"
 
@@ -1654,8 +1649,7 @@ msgid "%s: failed to remove '%.250s': %s"
 msgstr "%s: Konnte »%.250s« nicht entfernen: %s"
 
 #: src/configure.c:180
-#, fuzzy, c-format
-#| msgid "%s: failed to remove old distrib version '%.250s': %s"
+#, c-format
 msgid "%s: failed to remove old distributed version '%.250s': %s"
 msgstr "%s: Konnte alte verteilte Version »%.250s« nicht löschen: %s"
 
@@ -2803,7 +2797,7 @@ msgstr ""
 #: src/main.c:384
 #, c-format
 msgid "error executing hook '%s', exit code %d"
-msgstr ""
+msgstr "Fehler beim Ausführen des Hooks »%s«, Exitkode %d"
 
 #: src/main.c:398
 #, c-format
@@ -3046,7 +3040,7 @@ msgstr "(keine Beschreibung vorhanden)"
 #: src/processarc.c:74
 #, c-format
 msgid ".../%s"
-msgstr ""
+msgstr ".../%s"
 
 #: src/processarc.c:132
 msgid "cannot access archive"

-- 
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.15.7.2-115-gad9b46b

2010-06-27 Thread Guillem Jover
The following commit has been merged in the master branch:
commit ad9b46bf8194a68291224d8a7f93af30d74982c9
Author: Guillem Jover 
Date:   Sun Jun 27 10:48:03 2010 +0200

Update Catalan translation

diff --git a/debian/changelog b/debian/changelog
index 21b21c0..0bf4d10 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -60,6 +60,7 @@ dpkg (1.15.8) UNRELEASED; urgency=low
 Closes: #574704
 
   [ Updated programs translations ]
+  * Catalan (Guillem Jover).
   * German (Sven Joachim).
   * Russian (Yuri Kozlov). Closes: #579149
   * Swedish (Peter Krefting).
diff --git a/po/ca.po b/po/ca.po
index cc3f294..6b5d946 100644
--- a/po/ca.po
+++ b/po/ca.po
@@ -10,7 +10,7 @@ msgstr ""
 "Project-Id-Version: dpkg 1.15.1\n"
 "Report-Msgid-Bugs-To: debian-d...@lists.debian.org\n"
 "POT-Creation-Date: 2010-06-27 10:40+0200\n"
-"PO-Revision-Date: 2010-03-12 00:09+0100\n"
+"PO-Revision-Date: 2010-06-27 10:46+0200\n"
 "Last-Translator: Jordi Mallach \n"
 "Language-Team: Catalan \n"
 "Language: ca\n"
@@ -3127,7 +3127,7 @@ msgstr "(no hi ha cap descripció disponible)"
 #: src/processarc.c:74
 #, c-format
 msgid ".../%s"
-msgstr ""
+msgstr "…/%s"
 
 #: src/processarc.c:132
 msgid "cannot access archive"

-- 
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.15.7.2-115-gad9b46b

2010-06-27 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 1079ed11dcbf3d9b20e841fb22fd501740e746b0
Author: Guillem Jover 
Date:   Sun Jun 27 10:27:10 2010 +0200

build: Add a top-level update-po target

This will ease maintainers and translators job when wanting to update
the po files.

diff --git a/Makefile.am b/Makefile.am
index b1b929c..b6d634e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -75,6 +75,14 @@ doc: doc/Doxyfile
 clean-local:
rm -rf doc/html/
 
+.PHONY: update-po
+
+update-po:
+   $(MAKE) -C po update-po
+   $(MAKE) -C scripts/po update-po
+   $(MAKE) -C dselect/po update-po
+   $(MAKE) -C man update-po
+
 .PHONY: ChangeLog
 DISTCLEANFILES = ChangeLog
 

-- 
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.15.7.2-115-gad9b46b

2010-06-27 Thread Guillem Jover
The following commit has been merged in the master branch:
commit b8799d9f107b23d8640ae7db852499f399792083
Author: Guillem Jover 
Date:   Sat Jun 26 13:16:17 2010 +0200

Use consistent naming for linked lists members

Use next/prev instead of next/back (which would complement forward).
Also move next to the end of member names and seprate it with an
underscore, to simulate it being a sub struct member.

diff --git a/TODO b/TODO
index 1957b8b..57b5776 100644
--- a/TODO
+++ b/TODO
@@ -35,7 +35,6 @@ TODO
- Cleanup status chars -> strings hardcoded mappings all over the place.
  (Fix tied field enum with its dselect description (pkgdisplay.cc))
- Refactor src/processarc.c.
-   - Fix naming consistency of next/prev members.
- Split dpkg.h into independent headers.
- Do more unused header include removal.
- Add needed includes to all header files.
diff --git a/dselect/method.h b/dselect/method.h
index b85991c..6c6b895 100644
--- a/dselect/method.h
+++ b/dselect/method.h
@@ -37,7 +37,7 @@
 #define OPTIONINDEXMAXLEN  5
 
 struct method {
-  struct method *next, *back;
+  struct method *next, *prev;
   char *name, *path, *pathinmeth;
 };
 
diff --git a/dselect/methparse.cc b/dselect/methparse.cc
index 958eddf..553869d 100644
--- a/dselect/methparse.cc
+++ b/dselect/methparse.cc
@@ -130,8 +130,9 @@ void readmethods(const char *pathbase, dselect_option 
**optionspp, int *nread) {
 strcpy(meth->path+baselen+1+methodlen,"/");
 meth->pathinmeth= meth->path+baselen+1+methodlen+1;
 meth->next= methods;
-meth->back= 0;
-if (methods) methods->back= meth;
+meth->prev = 0;
+if (methods)
+  methods->prev = meth;
 methods= meth;
 if (debug) fprintf(debug," readmethods(`%s',...) new method"
" name=`%s' path=`%s' pathinmeth=`%s'\n",
diff --git a/dselect/pkgdepcon.cc b/dselect/pkgdepcon.cc
index 9caa9ee..ca69ec7 100644
--- a/dselect/pkgdepcon.cc
+++ b/dselect/pkgdepcon.cc
@@ -60,12 +60,12 @@ pkginfoperfile *packagelist::findinfo(pkginfo *pkg) {
 int packagelist::checkdependers(pkginfo *pkg, int changemade) {
   struct deppossi *possi;
   
-  for (possi = pkg->available.depended; possi; possi = possi->nextrev) {
+  for (possi = pkg->available.depended; possi; possi = possi->rev_next) {
 if (!useavailable(possi->up->up))
   continue;
 changemade = max(changemade, resolvedepcon(possi->up));
   }
-  for (possi = pkg->installed.depended; possi; possi = possi->nextrev) {
+  for (possi = pkg->installed.depended; possi; possi = possi->rev_next) {
 if (useavailable(possi->up->up))
   continue;
 changemade = max(changemade, resolvedepcon(possi->up));
@@ -274,7 +274,7 @@ int packagelist::resolvedepcon(dependency *depends) {
 if (dep_update_best_to_change_stop(best, possi->ed)) goto mustdeselect;
 for (provider = possi->ed->available.depended;
  provider;
- provider= provider->nextrev) {
+ provider = provider->rev_next) {
   if (provider->up->type != dep_provides) continue;
   if (provider->up->up->clientdata) foundany= 1;
   if (dep_update_best_to_change_stop(best, provider->up->up)) goto 
mustdeselect;
@@ -340,7 +340,7 @@ int packagelist::resolvedepcon(dependency *depends) {
 }
 for (provider = depends->list->ed->available.depended;
  provider;
- provider= provider->nextrev) {
+ provider = provider->rev_next) {
   if (provider->up->type != dep_provides) continue;
   if (provider->up->up == depends->up) continue; // conflicts & provides 
same thing
   r= deselect_one_of(depends->up, provider->up->up, depends);  if (r) 
return r;
@@ -398,7 +398,7 @@ packagelist::deppossatisfied(deppossi *possi, 
perpackagestate **fixbyupgrade)
 
   for (provider = possi->ed->installed.depended;
provider;
-   provider = provider->nextrev) {
+   provider = provider->rev_next) {
 if (provider->up->type == dep_provides &&
 provider->up->up->clientdata &&
 !useavailable(provider->up->up) &&
@@ -408,7 +408,7 @@ packagelist::deppossatisfied(deppossi *possi, 
perpackagestate **fixbyupgrade)
   }
   for (provider = possi->ed->available.depended;
provider;
-   provider = provider->nextrev) {
+   provider = provider->rev_next) {
 if (provider->up->type != dep_provides ||
 !provider->up->up->clientdata ||
 !would_like_to_install(provider->up->up->clientdata->selected,
diff --git a/dselect/pkgsublist.cc b/dselect/pkgsublist.cc
index bb7dc49..9405695 100644
--- a/dselect/pkgsublist.cc
+++ b/dselect/pkgsublist.cc
@@ -151,7 +151,7 @@ packagelist::add(dependency *depends, showpriority 
displayimportance)
   deppossi *provider;
   for (provider = possi->ed->available.depended;
provider;
-   provider=provider->nextrev) {
+   provider = provider->rev_next) {
 if (provider->up->type != dep_provides) continue;
 

[SCM] dpkg's main repository branch, master, updated. 1.15.7.2-115-gad9b46b

2010-06-27 Thread Guillem Jover
The following commit has been merged in the master branch:
commit c69901cdda6500450f026d02b439b941e7cb147a
Author: Guillem Jover 
Date:   Sat Jun 26 12:38:27 2010 +0200

Remove 'vsnprintf return value check' item from TODO after code review

The few places where the vsnprintf callers are not checking the return
value, are about to ohshit anyway so there's no real damage by not
doing the check, the rest are harmless.

diff --git a/TODO b/TODO
index ffaa013..1957b8b 100644
--- a/TODO
+++ b/TODO
@@ -35,8 +35,6 @@ TODO
- Cleanup status chars -> strings hardcoded mappings all over the place.
  (Fix tied field enum with its dselect description (pkgdisplay.cc))
- Refactor src/processarc.c.
-   - Make sure all vsnprintf callers are checking the return value, as the
- system version will not ohsite on us.
- Fix naming consistency of next/prev members.
- Split dpkg.h into independent headers.
- Do more unused header include removal.

-- 
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.15.7.2-115-gad9b46b

2010-06-27 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 662d97913fe8d9f4aa784ca7595c415c65202148
Author: Guillem Jover 
Date:   Sat Jun 26 12:17:20 2010 +0200

libdpkg: Check version syntax when parsing

Remove the incomplete checkversion() from dpkg-deb as it's now unneeded.
Enable test-cases for invalid characters in version and revision parts.

Closes: #574704

diff --git a/debian/changelog b/debian/changelog
index ab691ad..21b21c0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -56,6 +56,8 @@ dpkg (1.15.8) UNRELEASED; urgency=low
 Martin Pitt, thanks! Closes: #68788, #68861, #497304, #525567, #583902
   * Remove obsolete internal status aliases “postinst-failed” for
 stat_halfconfigured and “removal-failed” for stat_halfinstalled.
+  * Check version syntax when parsing it from libdpkg based programs.
+Closes: #574704
 
   [ Updated programs translations ]
   * German (Sven Joachim).
diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c
index 3eaaf25..03e5966 100644
--- a/dpkg-deb/build.c
+++ b/dpkg-deb/build.c
@@ -85,19 +85,6 @@ known_arbitrary_field(const struct arbitraryfield *field)
   return false;
 }
 
-/* Do a quick check if vstring is a valid versionnumber. Valid in this case
- * means it contains at least one digit. If an error is found increment
- * *errs.
- */
-static void checkversion(const char *vstring, const char *valuename, int 
*errs) {
-  const char *p;
-  if (!vstring || !*vstring) return;
-  for (p=vstring; *p; p++) if (cisdigit(*p)) return;
-  fprintf(stderr, _("dpkg-deb - error: %s (`%s') doesn't contain any 
digits\n"),
-  valuename, vstring);
-  (*errs)++;
-}
-
 static struct file_info *
 file_info_new(const char *filename)
 {
@@ -228,7 +215,7 @@ void do_build(const char *const *argv) {
   struct pkginfo *checkedinfo;
   struct arbitraryfield *field;
   FILE *ar, *cf;
-  int p1[2],p2[2],p3[2], warns, errs, n, c, subdir, gzfd;
+  int p1[2], p2[2], p3[2], warns, n, c, subdir, gzfd;
   pid_t c1,c2,c3;
   struct stat controlstab, datastab, mscriptstab, debarstab;
   char conffilename[MAXCONFFILENAME+1];
@@ -277,7 +264,7 @@ void do_build(const char *const *argv) {
 /* Lets start by reading in the control-file so we can check its contents 
*/
 strcpy(controlfile, directory);
 strcat(controlfile, "/" BUILDCONTROLDIR "/" CONTROLFILE);
-warns= 0; errs= 0;
+warns = 0;
 parsedb(controlfile, pdb_recordavailable|pdb_rejectstatus,
 &checkedinfo, stderr, &warns);
 if (strspn(checkedinfo->name,
@@ -297,11 +284,6 @@ void do_build(const char *const *argv) {
   controlfile, field->name);
   warns++;
 }
-checkversion(checkedinfo->available.version.version,
- _("(upstream) version"), &errs);
-checkversion(checkedinfo->available.version.revision,
- _("Debian revision"), &errs);
-if (errs) ohshit(_("%d errors in control file"),errs);
 
 if (subdir) {
   versionstring= 
versiondescribe(&checkedinfo->available.version,vdew_never);
diff --git a/lib/dpkg/parsehelp.c b/lib/dpkg/parsehelp.c
index 928ffb7..5d80213 100644
--- a/lib/dpkg/parsehelp.c
+++ b/lib/dpkg/parsehelp.c
@@ -245,7 +245,18 @@ const char *parseversion(struct versionrevision *rversion, 
const char *string) {
   if (hyphen)
 *hyphen++ = '\0';
   rversion->revision= hyphen ? hyphen : "";
-  
+
+  /* Check for invalid chars in version and revision. */
+  /* XXX: Would be faster to use something like cisversion and cisrevision. */
+  for (ptr = rversion->version; *ptr; ptr++) {
+if (!cisdigit(*ptr) && !cisalpha(*ptr) && strchr(".-+~:", *ptr) == NULL)
+  return _("invalid character in version number");
+  }
+  for (ptr = rversion->revision; *ptr; ptr++) {
+if (!cisdigit(*ptr) && !cisalpha(*ptr) && strchr(".-+~", *ptr) == NULL)
+  return _("invalid character in revision number");
+  }
+
   return NULL;
 }
 
diff --git a/lib/dpkg/test/t-version.c b/lib/dpkg/test/t-version.c
index 8355c6d..c7dd035 100644
--- a/lib/dpkg/test/t-version.c
+++ b/lib/dpkg/test/t-version.c
@@ -136,14 +136,11 @@ test_version_parse(void)
test_fail(parseversion(&a, "a:0-0") == NULL);
test_fail(parseversion(&a, "A:0-0") == NULL);
 
-   /* FIXME: parseversion() should validate input! */
-#if 0
/* Test invalid characters in upstream version. */
test_fail(parseversion(&a, "0:!...@$%&/|\\<>()[]{};,=*^'-0") == NULL);
 
/* Test invalid characters in revision. */
test_fail(parseversion(&a, "0:0...@$%&/|\\<>()[]{};,=*^'") == NULL);
-#endif
 
/* FIXME: Complete. */
 }

-- 
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.15.7.2-115-gad9b46b

2010-06-27 Thread Guillem Jover
The following commit has been merged in the master branch:
commit c838e48663200b40ad13eec3ac5a40d3b12bff2c
Author: Guillem Jover 
Date:   Sat Jun 26 12:23:09 2010 +0200

libdpkg: Check in test-case that : is an illegal character in revision

diff --git a/lib/dpkg/test/t-version.c b/lib/dpkg/test/t-version.c
index c7dd035..3c37bf4 100644
--- a/lib/dpkg/test/t-version.c
+++ b/lib/dpkg/test/t-version.c
@@ -140,7 +140,8 @@ test_version_parse(void)
test_fail(parseversion(&a, "0:!...@$%&/|\\<>()[]{};,=*^'-0") == NULL);
 
/* Test invalid characters in revision. */
-   test_fail(parseversion(&a, "0:0...@$%&/|\\<>()[]{};,=*^'") == NULL);
+   test_fail(parseversion(&a, "0:0-0:0") == NULL);
+   test_fail(parseversion(&a, "0:0...@$%&/|\\<>()[]{}:;,=*^'") == NULL);
 
/* FIXME: Complete. */
 }

-- 
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.15.7.2-115-gad9b46b

2010-06-27 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 0a85d64a50ebb3bb2d5f06f368e68b6f902533fa
Author: Guillem Jover 
Date:   Sat Jun 26 07:26:25 2010 +0200

dpkg: Place deferred extract rename debug message closer to the action

diff --git a/src/archives.c b/src/archives.c
index ac268bb..2ca526e 100644
--- a/src/archives.c
+++ b/src/archives.c
@@ -848,8 +848,6 @@ tar_deferred_extract(struct fileinlist *files, struct 
pkginfo *pkg)
 if (!(cfile->namenode->flags & fnnf_deferred_rename))
   continue;
 
-debug(dbg_eachfiledetail, "deferred extract needs rename");
-
 usenode = namenodetouse(cfile->namenode, pkg);
 usename = usenode->name + 1; /* Skip the leading '/'. */
 
@@ -873,6 +871,8 @@ tar_deferred_extract(struct fileinlist *files, struct 
pkginfo *pkg)
 }
 #endif
 
+debug(dbg_eachfiledetail, "deferred extract needs rename");
+
 if (rename(fnamenewvb.buf, fnamevb.buf))
   ohshite(_("unable to install new version of `%.255s'"),
   cfile->namenode->name);

-- 
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.15.7.2-115-gad9b46b

2010-06-27 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 2b87ec98e266e6dcab59eacc4ea2b2e227960133
Author: Guillem Jover 
Date:   Sat Jun 26 04:42:31 2010 +0200

dpkg-query: Change actionfunction to return int instead of void

This avoids a global exit code variable.

diff --git a/src/query.c b/src/query.c
index 3f2b03f..7eb94e2 100644
--- a/src/query.c
+++ b/src/query.c
@@ -50,7 +50,6 @@
 #include "filesdb.h"
 #include "main.h"
 
-static int failures = 0;
 static const char* showformat  = "${Package}\t${Version}\n";
 
 static int getwidth(void) {
@@ -135,12 +134,13 @@ Desired=Unknown/Install/Remove/Purge/Hold\n\
  l, pdesc);
 }
 
-static void
+static int
 listpackages(const char *const *argv)
 {
   struct pkg_array array;
   struct pkginfo *pkg;
   int i;
+  int failures = 0;
   bool head;
 
   modstatdb_init(admindir,msdbrw_readonly);
@@ -189,6 +189,8 @@ listpackages(const char *const *argv)
 
   pkg_array_destroy(&array);
   modstatdb_shutdown();
+
+  return failures;
 }
 
 static int searchoutput(struct filenamenode *namenode) {
@@ -227,13 +229,14 @@ static int searchoutput(struct filenamenode *namenode) {
   return found + (namenode->divert ? 1 : 0);
 }
 
-static void
+static int
 searchfiles(const char *const *argv)
 {
   struct filenamenode *namenode;
   struct fileiterator *it;
   const char *thisarg;
   int found;
+  int failures = 0;
   struct varbuf path = VARBUF_INIT;
   static struct varbuf vb;
   
@@ -289,15 +292,18 @@ searchfiles(const char *const *argv)
   modstatdb_shutdown();
 
   varbuf_destroy(&path);
+
+  return failures;
 }
 
-static void
+static int
 enqperpackage(const char *const *argv)
 {
   const char *thisarg;
   struct fileinlist *file;
   struct pkginfo *pkg;
   struct filenamenode *namenode;
+  int failures = 0;
   
   if (!*argv)
 badusage(_("--%s needs at least one package name argument"), 
cipaction->olong);
@@ -387,19 +393,22 @@ enqperpackage(const char *const *argv)
 m_output(stderr, _(""));
   }
   modstatdb_shutdown();
+
+  return failures;
 }
 
-static void
+static int
 showpackages(const char *const *argv)
 {
   struct pkg_array array;
   struct pkginfo *pkg;
   struct pkg_format_node *fmt = pkg_format_parse(showformat);
   int i;
+  int failures = 0;
 
   if (!fmt) {
 failures++;
-return;
+return failures;
   }
 
   modstatdb_init(admindir,msdbrw_readonly);
@@ -447,6 +456,8 @@ showpackages(const char *const *argv)
   pkg_array_destroy(&array);
   pkg_format_free(fmt);
   modstatdb_shutdown();
+
+  return failures;
 }
 
 static void
@@ -528,7 +539,7 @@ control_path_pkg(struct pkginfo *pkg)
   varbuf_destroy(&db_path);
 }
 
-static void
+static int
 control_path(const char *const *argv)
 {
   struct pkginfo *pkg;
@@ -565,6 +576,8 @@ control_path(const char *const *argv)
 control_path_pkg(pkg);
 
   modstatdb_shutdown();
+
+  return 0;
 }
 
 static void DPKG_ATTR_NORET
@@ -666,7 +679,8 @@ static const struct cmdinfo cmdinfos[]= {
 
 int main(int argc, const char *const *argv) {
   jmp_buf ejbuf;
-  void (*actionfunction)(const char *const *argv);
+  int (*actionfunction)(const char *const *argv);
+  int ret;
 
   setlocale(LC_ALL, "");
   bindtextdomain(PACKAGE, LOCALEDIR);
@@ -680,11 +694,11 @@ int main(int argc, const char *const *argv) {
   setvbuf(stdout, NULL, _IONBF, 0);
   filesdbinit();
 
-  actionfunction= (void (*)(const char* const*))cipaction->farg;
+  actionfunction = (int (*)(const char *const *))cipaction->farg;
 
-  actionfunction(argv);
+  ret = actionfunction(argv);
 
   standard_shutdown();
 
-  return !!failures;
+  return !!ret;
 }

-- 
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.15.7.2-115-gad9b46b

2010-06-27 Thread Guillem Jover
The following commit has been merged in the master branch:
commit edd58fd64fb2f60ab5a2b933c7a9875db0725378
Author: Guillem Jover 
Date:   Sat Jun 26 03:10:38 2010 +0200

libdpkg: Add missing word in comment to make it grammatical

diff --git a/lib/dpkg/triglib.c b/lib/dpkg/triglib.c
index 8e494e5..2f17737 100644
--- a/lib/dpkg/triglib.c
+++ b/lib/dpkg/triglib.c
@@ -217,7 +217,7 @@ trig_enqueue_awaited_pend(struct pkginfo *pend)
  * Fix up packages in state triggers-awaited w/o the corresponding package
  * with pending triggers. This can happen when dpkg was interrupted
  * while in modstatdb_note, and the package in triggers-pending had its
- * state modified but dpkg could not clearing the awaiters.
+ * state modified but dpkg could not finish clearing the awaiters.
  *
  * XXX: possibly get rid of some of the checks done somewhere else for
  *  this condition at run-time.

-- 
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.15.7.2-115-gad9b46b

2010-06-27 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 346e694287e999e23e6885e9511bd8503ede1b93
Author: Guillem Jover 
Date:   Sat Jun 26 03:08:15 2010 +0200

libdpkg: Remove obsolete internal status aliases

The strings are “postinst-failed” for stat_halfconfigured and
“removal-failed” for stat_halfinstalled.

These were used for backward compatibility during upgrades from ancient
dpkg versions. As they should not appear in newer status files, it's
really safe to remove them now.

diff --git a/debian/changelog b/debian/changelog
index 3a3388f..ab691ad 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -54,6 +54,8 @@ dpkg (1.15.8) UNRELEASED; urgency=low
 files on package installation. This allows embedded systems to skip
 /usr/share/doc, manpages, etc. Based on work from Tollef Fog Heen and
 Martin Pitt, thanks! Closes: #68788, #68861, #497304, #525567, #583902
+  * Remove obsolete internal status aliases “postinst-failed” for
+stat_halfconfigured and “removal-failed” for stat_halfinstalled.
 
   [ Updated programs translations ]
   * German (Sven Joachim).
diff --git a/lib/dpkg/parsehelp.c b/lib/dpkg/parsehelp.c
index 7542b47..928ffb7 100644
--- a/lib/dpkg/parsehelp.c
+++ b/lib/dpkg/parsehelp.c
@@ -109,11 +109,6 @@ const struct namevalue statusinfos[] = {
   NAMEVALUE_DEF("triggers-awaited", stat_triggersawaited),
   NAMEVALUE_DEF("triggers-pending", stat_triggerspending),
   NAMEVALUE_DEF("installed",stat_installed),
-  /* These are additional entries for reading only, in any order ... */
-  /* XXX: backwards compat., remove. */
-  { .name = "postinst-failed", .value = stat_halfconfigured, .length = 15 },
-  /* XXX: backwards compat., remove. */
-  { .name = "removal-failed",  .value = stat_halfinstalled, .length = 14 },
   { .name = NULL }
 };
 

-- 
dpkg's main repository


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



[SCM] dpkg's main repository branch, master, updated. 1.15.7.2-115-gad9b46b

2010-06-27 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 254b3752d36376de47c2f04fbeb8cd439527c6a0
Author: Guillem Jover 
Date:   Fri Jun 25 19:16:52 2010 +0200

libdpkg: Remove unused nfields variable

diff --git a/lib/dpkg/parse.c b/lib/dpkg/parse.c
index fa0a712..75303bc 100644
--- a/lib/dpkg/parse.c
+++ b/lib/dpkg/parse.c
@@ -80,8 +80,6 @@ const struct fieldinfo fieldinfos[]= {
   {  NULL   /* sentinel - tells code that list is ended */ 
  }
 };
 
-const int nfields = array_count(fieldinfos);
-
 int parsedb(const char *filename, enum parsedbflags flags,
 struct pkginfo **donep, FILE *warnto, int *warncount) {
   /* warnto, warncount and donep may be null.
diff --git a/lib/dpkg/parsedump.h b/lib/dpkg/parsedump.h
index 5dff80c..0e2fad8 100644
--- a/lib/dpkg/parsedump.h
+++ b/lib/dpkg/parsedump.h
@@ -85,6 +85,5 @@ struct nickname {
 
 extern const struct fieldinfo fieldinfos[];
 extern const struct nickname nicknames[];
-extern const int nfields; /* = elements in fieldinfos, including the sentinels 
*/
 
 #endif /* LIBDPKG_PARSEDUMP_H */

-- 
dpkg's main repository


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



[SCM] dpkg's main repository branch, master, updated. 1.15.7.2-115-gad9b46b

2010-06-27 Thread Guillem Jover
The following commit has been merged in the master branch:
commit c88029bab1e02b866848736bf85b1a08ec419d2a
Author: Guillem Jover 
Date:   Fri Jun 25 18:37:42 2010 +0200

dpkg: Do not use abbreviations for 'distributed'

diff --git a/src/configure.c b/src/configure.c
index 0af95eb..aa2fad5 100644
--- a/src/configure.c
+++ b/src/configure.c
@@ -98,7 +98,8 @@ deferred_configure_conffile(struct pkginfo *pkg, struct 
conffile *conff)
if (lstat(cdr2.buf, &stab)) {
if (errno == ENOENT)
return;
-   ohshite(_("unable to stat new dist conffile `%.250s'"), 
cdr2.buf);
+   ohshite(_("unable to stat new distributed conffile '%.250s'"),
+   cdr2.buf);
}
md5hash(pkg, newdisthash, cdr2.buf);
 
@@ -176,7 +177,7 @@ deferred_configure_conffile(struct pkginfo *pkg, struct 
conffile *conff)
case cfo_install | cfof_backup:
strcpy(cdr2rest, DPKGDISTEXT);
if (unlink(cdr2.buf) && errno != ENOENT)
-   warning(_("%s: failed to remove old distrib version 
'%.250s': %s"),
+   warning(_("%s: failed to remove old distributed version 
'%.250s': %s"),
pkg->name, cdr2.buf, strerror(errno));
strcpy(cdr2rest, DPKGOLDEXT);
if (unlink(cdr2.buf) && errno != ENOENT)

-- 
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.15.7.2-115-gad9b46b

2010-06-27 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 50391de87ac2b0269ef3e2f64fb41e913baff415
Author: Guillem Jover 
Date:   Fri Jun 25 18:20:26 2010 +0200

libdpkg: Remove 'valid' member from struct pkginfoperfile

The two struct pkginfoperfile inside struct pkginfo are always valid,
as blankpackage does a blankpackageperfile on each. So there's no
actual need for the boolean member, neither for validity checks all
over the place and possible subsequent redundant initializations.

This is due to commit 5f100a01af636c14a600bf53b22e2ca3f2fcc546.

diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c
index 676af25..3eaaf25 100644
--- a/dpkg-deb/build.c
+++ b/dpkg-deb/build.c
@@ -280,7 +280,6 @@ void do_build(const char *const *argv) {
 warns= 0; errs= 0;
 parsedb(controlfile, pdb_recordavailable|pdb_rejectstatus,
 &checkedinfo, stderr, &warns);
-assert(checkedinfo->available.valid);
 if (strspn(checkedinfo->name,
"abcdefghijklmnopqrstuvwxyz0123456789+-.")
 != strlen(checkedinfo->name))
diff --git a/dselect/pkgdepcon.cc b/dselect/pkgdepcon.cc
index 7a902a9..9caa9ee 100644
--- a/dselect/pkgdepcon.cc
+++ b/dselect/pkgdepcon.cc
@@ -53,24 +53,22 @@ pkginfoperfile *packagelist::findinfo(pkginfo *pkg) {
   r= useavailable(pkg) ? &pkg->available : &pkg->installed;
   if (debug)
 fprintf(debug,"packagelist[%p]::findinfo(%s) 
useavailable=%d\n",this,pkg->name,useavailable(pkg));
-  if (!r->valid) blankpackageperfile(r);
+
   return r;
 }
   
 int packagelist::checkdependers(pkginfo *pkg, int changemade) {
   struct deppossi *possi;
   
-  if (pkg->available.valid) {
-for (possi= pkg->available.depended; possi; possi= possi->nextrev) {
-  if (!useavailable(possi->up->up)) continue;
-  changemade = max(changemade, resolvedepcon(possi->up));
-}
+  for (possi = pkg->available.depended; possi; possi = possi->nextrev) {
+if (!useavailable(possi->up->up))
+  continue;
+changemade = max(changemade, resolvedepcon(possi->up));
   }
-  if (pkg->installed.valid) {
-for (possi= pkg->installed.depended; possi; possi= possi->nextrev) {
-  if (useavailable(possi->up->up)) continue;
-  changemade = max(changemade, resolvedepcon(possi->up));
-}
+  for (possi = pkg->installed.depended; possi; possi = possi->nextrev) {
+if (useavailable(possi->up->up))
+  continue;
+changemade = max(changemade, resolvedepcon(possi->up));
   }
   return changemade;
 }
@@ -274,7 +272,7 @@ int packagelist::resolvedepcon(dependency *depends) {
 foundany= 0;
 if (possi->ed->clientdata) foundany= 1;
 if (dep_update_best_to_change_stop(best, possi->ed)) goto mustdeselect;
-for (provider= possi->ed->available.valid ? 
possi->ed->available.depended : 0;
+for (provider = possi->ed->available.depended;
  provider;
  provider= provider->nextrev) {
   if (provider->up->type != dep_provides) continue;
@@ -340,8 +338,7 @@ int packagelist::resolvedepcon(dependency *depends) {
 if (depends->up != depends->list->ed) {
   r= deselect_one_of(depends->up, depends->list->ed, depends);  if (r) 
return r;
 }
-for (provider= depends->list->ed->available.valid ?
-   depends->list->ed->available.depended : 0;
+for (provider = depends->list->ed->available.depended;
  provider;
  provider= provider->nextrev) {
   if (provider->up->type != dep_provides) continue;
@@ -398,37 +395,34 @@ packagelist::deppossatisfied(deppossi *possi, 
perpackagestate **fixbyupgrade)
   if (possi->verrel != dvr_none)
 return false;
   deppossi *provider;
-  if (possi->ed->installed.valid) {
-for (provider= possi->ed->installed.depended;
- provider;
- provider= provider->nextrev) {
-  if (provider->up->type == dep_provides &&
-  provider->up->up->clientdata &&
-  !useavailable(provider->up->up) &&
-  would_like_to_install(provider->up->up->clientdata->selected,
-provider->up->up))
-return true;
-}
+
+  for (provider = possi->ed->installed.depended;
+   provider;
+   provider = provider->nextrev) {
+if (provider->up->type == dep_provides &&
+provider->up->up->clientdata &&
+!useavailable(provider->up->up) &&
+would_like_to_install(provider->up->up->clientdata->selected,
+  provider->up->up))
+  return true;
   }
-  if (possi->ed->available.valid) {
-for (provider= possi->ed->available.depended;
- provider;
- provider= provider->nextrev) {
-  if (provider->up->type != dep_provides ||
-  !provider->up->up->clientdata ||
-  !would_like_to_install(provider->up->up->clientdata->selected,
- provider->up->up))
-continue;
-  if (useavailable(provider->up->up))
-return true;
-  if (fixb

[SCM] dpkg's main repository branch, master, updated. 1.15.7.2-115-gad9b46b

2010-06-27 Thread Guillem Jover
The following commit has been merged in the master branch:
commit acf7fe58c95c2ba4300ec4b60d614012483f4771
Author: Guillem Jover 
Date:   Fri Jun 25 08:46:23 2010 +0200

dpkg: Mark hook command error string for translation

diff --git a/src/main.c b/src/main.c
index e32cfa0..c933f24 100644
--- a/src/main.c
+++ b/src/main.c
@@ -381,7 +381,8 @@ run_invoke_hooks(const char *action, struct invoke_hook 
*hook_head)
  * used “!$=&|\\`'"^~;<>{}[]()?*#”. */
 status = system(hook->command);
 if (status != 0)
-  ohshit("error executing hook '%s', exit code %d", hook->command, status);
+  ohshit(_("error executing hook '%s', exit code %d"), hook->command,
+ status);
   }
 
   unsetenv("DPKG_HOOK_ACTION");

-- 
dpkg's main repository


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



[SCM] dpkg's main repository branch, master, updated. 1.15.7.2-115-gad9b46b

2010-06-27 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 88b5c91de144e1faace4f9777aba1b5da27a7bcd
Author: Guillem Jover 
Date:   Fri Jun 25 08:12:01 2010 +0200

dpkg: Remove redundant trailing newlines from debug output

debug() already prints a trailing newline, so there's no point in
including it in the string to be printed.

diff --git a/src/depcon.c b/src/depcon.c
index 61424ed..039242c 100644
--- a/src/depcon.c
+++ b/src/depcon.c
@@ -86,7 +86,7 @@ foundcyclebroken(struct cyclesofarlink *thislink, struct 
cyclesofarlink *sofar,
* occurrence of the current package in the list.
*/
   sol->possi->cyclebreak = true;
-  debug(dbg_depcon,"cycle broken at %s -> %s\n",
+  debug(dbg_depcon, "cycle broken at %s -> %s",
 sol->possi->up->up->name, sol->possi->ed->name);
   return true;
 }
diff --git a/src/processarc.c b/src/processarc.c
index 5b488ff..5d898af 100644
--- a/src/processarc.c
+++ b/src/processarc.c
@@ -1182,13 +1182,13 @@ void process_archive(const char *filename) {
 }
 iter = filepackages_iter_new(cfile->namenode);
 while ((otherpkg = filepackages_iter_next(iter))) {
-  debug(dbg_eachfiledetail, "process_archive ... found in %s\n", 
otherpkg->name);
+  debug(dbg_eachfiledetail, "process_archive ... found in %s", 
otherpkg->name);
   /* If !fileslistvalid then it's one of the disappeared packages above
* and we don't bother with it here, clearly. */
   if (otherpkg == pkg || !otherpkg->clientdata->fileslistvalid)
 continue;
   if (otherpkg == divpkg) {
-debug(dbg_eachfiledetail, "process_archive ... diverted, skipping\n");
+debug(dbg_eachfiledetail, "process_archive ... diverted, skipping");
 continue;
   }
 
diff --git a/src/remove.c b/src/remove.c
index f21b775..08650ed 100644
--- a/src/remove.c
+++ b/src/remove.c
@@ -60,7 +60,7 @@ static void checkforremoval(struct pkginfo *pkgtoremove,
   depender->status == stat_triggersawaited))
   continue;
 if (ignore_depends(depender)) {
-  debug(dbg_depcon,"ignoring depending package `%s'\n",depender->name);
+  debug(dbg_depcon, "ignoring depending package '%s'", depender->name);
   continue;
 }
 if (dependtry > 1) { if (findbreakcycle(pkgtoremove)) sincenothing= 0; }
@@ -416,7 +416,7 @@ static void removal_bulk_remove_configfiles(struct pkginfo 
*pkg) {
  (searchfile->namenode->divert->camefrom ||
   (searchfile->namenode->divert->useinstead &&
searchfile->namenode->divert->pkg != pkg))) {
-debug(dbg_conff,"removal_bulk conffile `%s' ignored due to 
diversion\n",
+debug(dbg_conff, "removal_bulk conffile '%s' ignored due to diversion",
   conff->name);
 *lconffp= conff->next;
   } else {

-- 
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.15.7.2-115-gad9b46b

2010-06-27 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 4eab697e64024d034220cc6366c80a5f090ff687
Author: Guillem Jover 
Date:   Thu Jun 24 21:22:32 2010 +0200

libdpkg: Remove outdated comment with test dataset package names

diff --git a/lib/dpkg/database.c b/lib/dpkg/database.c
index 370a3d2..675b963 100644
--- a/lib/dpkg/database.c
+++ b/lib/dpkg/database.c
@@ -204,23 +204,3 @@ void hashreport(FILE *file) {
 
   free(freq);
 }
-
-/*
- * Test dataset package names were:
- *
- * agetty bash bc bdflush biff bin86 binutil binutils bison bsdutils
- * byacc chfn cron dc dictionaries diff dlltools dpkg e2fsprogs ed
- * elisp19 elm emacs emacs-nox emacs-x emacs19 file fileutils find
- * flex fsprogs gas gawk gcc gcc1 gcc2 gdb ghostview ghstview glibcdoc
- * gnuplot grep groff gs gs_both gs_svga gs_x gsfonts gxditviw gzip
- * hello hostname idanish ifrench igerman indent inewsinn info inn
- * ispell kbd kern1148 language ldso less libc libgr libgrdev librl
- * lilo linuxsrc login lout lpr m4 mailx make man manpages more mount
- * mtools ncurses netbase netpbm netstd patch perl4 perl5 procps
- * psutils rcs rdev sed sendmail seyon shar shellutils smail svgalib
- * syslogd sysvinit tar tcpdump tcsh tex texidoc texinfo textutils
- * time timezone trn unzip uuencode wenglish wu-ftpd x8514 xaxe xbase
- * xbdm2 xcomp xcoral xdevel xfig xfnt100 xfnt75 xfntbig xfntscl
- * xgames xherc xmach32 xmach8 xmono xnet xs3 xsvga xtexstuff xv
- * xvga16 xxgdb zip
- */

-- 
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.15.7.2-115-gad9b46b

2010-06-27 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 45816c76839b9b4a50b048420d7ff4812eaf4277
Author: Guillem Jover 
Date:   Thu Jun 24 04:05:09 2010 +0200

libdpkg: Add new version symbol script

It's not used yet, but it's useful to keep track of the exported API,
and what needs to be removed, renamed, etc, in just one place.

diff --git a/lib/dpkg/Makefile.am b/lib/dpkg/Makefile.am
index 8ce01d8..76908ec 100644
--- a/lib/dpkg/Makefile.am
+++ b/lib/dpkg/Makefile.am
@@ -13,6 +13,7 @@ AM_CPPFLAGS = \
 
 
 EXTRA_DIST = \
+   libdpkg.Versions \
libdpkg.pc.in
 
 pkgconfigdir = $(libdir)/pkgconfig
diff --git a/lib/dpkg/libdpkg.Versions b/lib/dpkg/libdpkg.Versions
new file mode 100644
index 000..2caf3f6
--- /dev/null
+++ b/lib/dpkg/libdpkg.Versions
@@ -0,0 +1,228 @@
+LIBDPKG_0 {
+global:
+   # Ar support
+   dpkg_ar_normalize_name;
+
+local:
+   *;
+};
+
+LIBDPKG_PRIVATE {
+   # Error handling
+   set_error_display;
+   print_error_fatal;
+   push_error_handler;
+   push_checkpoint;
+   push_cleanup;
+   pop_cleanup;
+   error_unwind;
+   onerr_abort;# XXX variable, do not export
+   ohshitv;
+   ohshite;
+   ohshit;
+   werr;   # XXX: remove
+   do_internerr;
+   warning;
+
+   # Generic cleanup
+   cu_closepipe;
+   cu_closefile;
+   cu_closedir;
+   cu_closefd;
+
+   # ‘Must do’ functions
+   m_malloc;
+   m_realloc;
+   m_strdup;
+   m_dup2;
+   m_pipe;
+   m_output;
+   fgets_must;
+   fgets_checked;
+
+   # Charset and string functions
+   cisdigit;
+
+   str_escape_fmt;
+   str_strip_quotes;
+
+   # Variable buffer support
+   varbufinit;
+   varbufreset;
+   varbuf_grow;
+   varbufaddc;
+   varbufdupc;
+   varbufsubstc;
+   varbufaddbuf;
+   varbufprintf;
+   varbufvprintf;
+   varbuf_detach;
+   varbuf_destroy;
+
+   # Path, directory and file functions
+   path_rtrim_slash_slashdot;
+   path_skip_slash_dotslash;
+   path_make_temp_template;
+   path_quote_filename;
+
+   dir_sync;
+   dir_sync_path;
+   dir_sync_contents;
+
+   file_copy_perms;
+
+   # Buffer I/O functions
+   buffer_init;
+   buffer_read;
+   buffer_write;
+   buffer_hash;
+   buffer_copy;
+   buffer_copy_*;
+   buffer_done;
+
+   # Subprocess and command handling
+   subproc_signals_setup;
+   subproc_signals_cleanup;
+   subproc_fork;
+   subproc_wait;
+   subproc_check;
+   subproc_wait_check;
+
+   command_init;
+   command_add_arg;
+   command_add_argl;
+   command_add_argv;
+   command_add_args;
+   command_exec;
+   command_destroy;
+
+   setcloexec;
+
+   # Compression support
+   compressor_gzip;# XXX variable, do not export
+   compressor_xz;  # XXX variable, do not export
+   compressor_bzip2;   # XXX variable, do not export
+   compressor_lzma;# XXX variable, do not export
+   compressor_find_by_name;
+   compressor_find_by_extension;
+   compress_filter;
+   decompress_filter;
+
+   # Configuration and command line handling
+   loadcfgfile;
+   myopt;
+   badusage;
+   # printforhelp; # XXX variable, do not require external
+   # thisname; # XXX variable, do not require external
+
+   # General logging
+   log_file;   # XXX variable, do not export
+   log_message;
+
+   # Action logging
+   status_pipes;   # XXX variable, do not export
+   statusfd_send;
+
+   # Progress report support
+   progress_init;
+   progress_step;
+   progress_done;
+
+   # Tar support
+   TarExtractor;
+
+   # Non-freeing malloc (pool/arena)
+   nfmalloc;
+   nfstrnsave;
+   nfstrsave;
+   nffreeall;
+
+   # Version struct handling
+   blankversion;
+   informativeversion;
+   epochsdiffer;
+   versioncompare;
+   versiondescribe;
+   versionsatisfied;
+   versionsatisfied3;
+   parseversion;
+
+   # Package struct handling
+   blankpackage;
+   blankpackageperfile;
+   illegal_packagename;
+   informative;
+   copy_dependency_links;
+   pkg_sorter_by_name;
+
+   # Package list handling
+   pkg_list_new;
+   pkg_list_free;
+   pkg_list_prepend;
+
+   # Package array handling
+   pkg_array_init_from_db;
+   pkg_array_sort;
+   pkg_array_destroy;
+
+   # Package queue handling
+   pkg_queue_init;
+   pkg_queue_destroy;
+   pkg_queue_is_empty;
+   pkg_queue_push;
+   pkg_queue_pop;
+
+   # Package field format handling
+   pkg_format_parse;
+   pkg_format_show;
+   pkg_format_free;
+
+   # Package in-core database functions
+   

[SCM] dpkg's main repository branch, master, updated. 1.15.7.2-115-gad9b46b

2010-06-27 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 1f6b854a2d8319f8b90cb3964117aaf95e10e0a8
Author: Guillem Jover 
Date:   Thu Jun 24 04:04:08 2010 +0200

libdpkg: Rename trigdef_yylex() to trigdef_parse()

diff --git a/lib/dpkg/trigdeferred.h b/lib/dpkg/trigdeferred.h
index 1942ad6..7faccf9 100644
--- a/lib/dpkg/trigdeferred.h
+++ b/lib/dpkg/trigdeferred.h
@@ -53,7 +53,7 @@ void trigdef_set_methods(const struct trigdefmeths *methods);
  */
 int trigdef_update_start(enum trigdef_updateflags uf, const char *admindir);
 void trigdef_update_printf(const char *format, ...) DPKG_ATTR_PRINTF(1);
-int trigdef_yylex(void);
+int trigdef_parse(void);
 void trigdef_process_done(void);
 
 DPKG_END_DECLS
diff --git a/lib/dpkg/trigdeferred.l b/lib/dpkg/trigdeferred.l
index 40b59c9..3be1e83 100644
--- a/lib/dpkg/trigdeferred.l
+++ b/lib/dpkg/trigdeferred.l
@@ -49,6 +49,7 @@
 #include 
 
 #define YY_NO_INPUT
+#define YY_DECL int trigdef_parse(void)
 
 static struct varbuf fn, newfn;
 
diff --git a/lib/dpkg/triglib.c b/lib/dpkg/triglib.c
index 52c9e3b..8e494e5 100644
--- a/lib/dpkg/triglib.c
+++ b/lib/dpkg/triglib.c
@@ -809,7 +809,7 @@ trig_incorporate(enum modstatdb_rw cstatus, const char 
*admindir)
break;
case 2:
/* Read and incorporate triggers. */
-   trigdef_yylex();
+   trigdef_parse();
break;
default:
internerr("unknown trigdef_update_start return value '%d'", ur);
diff --git a/src/trigcmd.c b/src/trigcmd.c
index ae076af..c13323f 100644
--- a/src/trigcmd.c
+++ b/src/trigcmd.c
@@ -227,7 +227,7 @@ main(int argc, const char *const *argv)
tduf |= tduf_write | tduf_writeifempty;
uf = trigdef_update_start(tduf, admindir);
if (uf >= 0) {
-   trigdef_yylex();
+   trigdef_parse();
if (!done_trig)
trigdef_update_printf("%s %s\n", activate, bypackage);
trigdef_process_done();

-- 
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.15.7.2-115-gad9b46b

2010-06-27 Thread Guillem Jover
The following commit has been merged in the master branch:
commit c43931e799d36275cf6d44be94c63512b94b1c9e
Author: Guillem Jover 
Date:   Tue Jun 22 10:57:47 2010 +0200

dpkg: Use iterators instead of exposing packageslump directly

diff --git a/TODO b/TODO
index 86ba627..ffaa013 100644
--- a/TODO
+++ b/TODO
@@ -45,7 +45,6 @@ TODO
- Use internerr instead of assert, and print more meaninful messages.
- Make actionfunction return int, and avoid global exitcode variables.
- Move ACTION and OBSOLETE, etc to ‘myopt.h’.
-   - Refactor packageslump into generic code.
- Replace raw write and read calls with safe variants (signals etc).
- Make deb build version a version instead of doing checks over a string.
- Use enums for currently hardcoded literals (tdus, dependtry, etc).
diff --git a/src/archives.c b/src/archives.c
index 8a90ba6..ac268bb 100644
--- a/src/archives.c
+++ b/src/archives.c
@@ -107,9 +107,8 @@ filesavespackage(struct fileinlist *file,
  struct pkginfo *pkgtobesaved,
  struct pkginfo *pkgbeinginstalled)
 {
+  struct filepackages_iterator *iter;
   struct pkginfo *divpkg, *thirdpkg;
-  struct filepackages *packageslump;
-  int i;
   
   debug(dbg_eachfiledetail,"filesavespackage file `%s' package %s",
 file->namenode->name,pkgtobesaved->name);
@@ -139,31 +138,31 @@ filesavespackage(struct fileinlist *file,
   /* Look for a 3rd package which can take over the file (in case
* it's a directory which is shared by many packages.
*/
-  for (packageslump= file->namenode->packages;
-   packageslump;
-   packageslump= packageslump->more) {
-for (i=0; i < PERFILEPACKAGESLUMP && packageslump->pkgs[i]; i++) {
-  thirdpkg= packageslump->pkgs[i];
-  debug(dbg_eachfiledetail, "filesavespackage ... also in %s",
-thirdpkg->name);
-  /* Is this not the package being installed or the one being
-   * checked for disappearance ?
-   */
-  if (thirdpkg == pkgbeinginstalled || thirdpkg == pkgtobesaved) continue;
-  /* If !fileslistvalid then we've already disappeared this one, so
-   * we shouldn't try to make it take over this shared directory.
-   */
-  debug(dbg_eachfiledetail,"filesavespackage ...  is 3rd package");
+  iter = filepackages_iter_new(file->namenode);
+  while ((thirdpkg = filepackages_iter_next(iter))) {
+debug(dbg_eachfiledetail, "filesavespackage ... also in %s",
+  thirdpkg->name);
+
+/* Is this not the package being installed or the one being
+ * checked for disappearance? */
+if (thirdpkg == pkgbeinginstalled || thirdpkg == pkgtobesaved)
+  continue;
 
-  if (!thirdpkg->clientdata->fileslistvalid) {
-debug(dbg_eachfiledetail, "process_archive ... already disappeared!");
-continue;
-  }
-  /* We've found a package that can take this file. */
-  debug(dbg_eachfiledetail, "filesavespackage ...  taken -- no save");
-  return false;
+/* If !fileslistvalid then we've already disappeared this one, so
+ * we shouldn't try to make it take over this shared directory. */
+debug(dbg_eachfiledetail,"filesavespackage ...  is 3rd package");
+
+if (!thirdpkg->clientdata->fileslistvalid) {
+  debug(dbg_eachfiledetail, "process_archive ... already disappeared!");
+  continue;
 }
+
+/* We've found a package that can take this file. */
+debug(dbg_eachfiledetail, "filesavespackage ...  taken -- no save");
+return false;
   }
+  filepackages_iter_free(iter);
+
   debug(dbg_eachfiledetail, "filesavespackage ... not taken -- save !");
   return true;
 }
@@ -405,13 +404,12 @@ int tarobject(struct TarInfo *ti) {
   struct conffile *conff;
   struct tarcontext *tc= (struct tarcontext*)ti->UserData;
   bool existingdirectory, keepexisting;
-  int statr, i;
+  int statr;
   ssize_t r;
   struct stat stab, stabtmp;
   char databuf[TARBLKSZ];
   struct fileinlist *nifd, **oldnifd;
   struct pkginfo *divpkg, *otherpkg;
-  struct filepackages *packageslump;
   mode_t am;
 
   ensureobstackinit();
@@ -526,96 +524,100 @@ int tarobject(struct TarInfo *ti) {
 
   keepexisting = false;
   if (!existingdirectory) {
-for (packageslump= nifd->namenode->packages;
- packageslump;
- packageslump= packageslump->more) {
-  for (i=0; i < PERFILEPACKAGESLUMP && packageslump->pkgs[i]; i++) {
-otherpkg= packageslump->pkgs[i];
-if (otherpkg == tc->pkg) continue;
-debug(dbg_eachfile, "tarobject ... found in %s",otherpkg->name);
-if (nifd->namenode->divert && nifd->namenode->divert->useinstead) {
-  /* Right, so we may be diverting this file.  This makes the conflict
-   * OK iff one of us is the diverting package (we don't need to
-   * check for both being the diverting package, obviously).
-   */
-  divpkg= nifd->namenode->divert->pkg;
-  debug(dbg_eachfile, "tarobject ... diverted, divpkg=%s",
-   

[SCM] dpkg's main repository branch, master, updated. 1.15.7.2-115-gad9b46b

2010-06-27 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 24bd7ac063a234b3c63df79ad599f39fed728ad5
Author: Guillem Jover 
Date:   Tue Jun 22 11:08:27 2010 +0200

dpkg-trigger: Mark do_check with DPKG_ATTR_NORET

diff --git a/src/trigcmd.c b/src/trigcmd.c
index f11d892..ae076af 100644
--- a/src/trigcmd.c
+++ b/src/trigcmd.c
@@ -143,7 +143,7 @@ static const struct trigdefmeths tdm_add = {
.trig_end = tdm_add_trig_end,
 };
 
-static void
+static void DPKG_ATTR_NORET
 do_check(void)
 {
int uf;

-- 
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.15.7.2-115-gad9b46b

2010-06-27 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 632e855a51070ca42532341e9f8f0f0006f1a23d
Author: Guillem Jover 
Date:   Mon Jun 21 20:09:40 2010 +0200

man: Update u-a log file reference

update-alternatives has now its independent log file, reflect that in
the man page.

diff --git a/man/update-alternatives.8 b/man/update-alternatives.8
index dc3dc73..4a50213 100644
--- a/man/update-alternatives.8
+++ b/man/update-alternatives.8
@@ -333,7 +333,7 @@ different from the default.
 .TP
 .BI \-\-log " file"
 Specifies the log file, when this is to be different from the default
-(/var/log/dpkg.log).
+(/var/log/alternatives.log).
 .TP
 .BI \-\-force
 Let \fBupdate-alternatives\fR replace any real file that is installed

-- 
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.15.7.2-115-gad9b46b

2010-06-27 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 21bae07787b41706d5afbefb470b1ee84e3382b6
Author: Guillem Jover 
Date:   Mon Jun 21 19:57:51 2010 +0200

dpkg: Mark the summarize_filename() ellipsed string for translation

Coallesce the ellipsed string with the format string so that it makes a
bit more sense for translators. This will allow translators to use for
example the UTF-8 ellipsis character.

diff --git a/src/processarc.c b/src/processarc.c
index 3bf3cf8..3da1e0e 100644
--- a/src/processarc.c
+++ b/src/processarc.c
@@ -71,8 +71,7 @@ summarize_filename(const char *filename)
 
   if (pfilename && pfilename != filename) {
 pfilenamebuf = nfmalloc(strlen(pfilename) + 5);
-strcpy(pfilenamebuf, ".../");
-strcat(pfilenamebuf, pfilename);
+sprintf(pfilenamebuf, _(".../%s"), pfilename);
 pfilename = pfilenamebuf;
   } else {
 pfilename = filename;

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