[SCM] dpkg's main repository branch, master, updated. 1.15.7.2-167-g6b62761

2010-07-16 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 6b62761d7c3f0db09371a24e8d32a2600cc91c5a
Author: Guillem Jover 
Date:   Fri Jul 16 20:31:54 2010 +0200

Use earlier/later instead of smaller/bigger for comparison relationships

Closes: #587641

diff --git a/debian/changelog b/debian/changelog
index 3ec70ef..de9672f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -80,6 +80,8 @@ dpkg (1.15.8) UNRELEASED; urgency=low
 directory is not existent or writable. Closes: #581544
   * Properly compute the longest package description from all to be displayed
 on “dpkg-query --list”, so that it does not get incorrectly trimmed.
+  * Consistently use earlier/later instead of smaller/bigger when describing
+comparison relationships. Closes: #587641
 
   [ Updated programs translations ]
   * Catalan (Guillem Jover).
diff --git a/lib/dpkg/pkg.c b/lib/dpkg/pkg.c
index f893732..7598860 100644
--- a/lib/dpkg/pkg.c
+++ b/lib/dpkg/pkg.c
@@ -34,9 +34,9 @@
  * @param b A pointer of a pointer to a struct pkginfo.
  *
  * @return An integer with the result of the comparison.
- * @retval -1 a is smaller than b.
+ * @retval -1 a is earlier than b.
  * @retval 0 a is equal to b.
- * @retval 1 a is greater than b.
+ * @retval 1 a is later than b.
  */
 int
 pkg_sorter_by_name(const void *a, const void *b)
diff --git a/scripts/Dpkg/Changelog.pm b/scripts/Dpkg/Changelog.pm
index d94761f..4303618 100644
--- a/scripts/Dpkg/Changelog.pm
+++ b/scripts/Dpkg/Changelog.pm
@@ -252,7 +252,7 @@ sub __sanity_check_range {
 }
 if ((defined($r->{since}) and not exists $versions{$r->{since}})) {
 warning(_g("'%s' option specifies non-existing version"), "since");
-warning(_g("use newest entry that is smaller than the one specified"));
+warning(_g("use newest entry that is earlier than the one specified"));
 foreach my $v (@versions) {
 if (version_compare_relation($v, REL_LT, $r->{since})) {
 $r->{since} = $v;
@@ -260,7 +260,7 @@ sub __sanity_check_range {
 }
 }
 if (not exists $versions{$r->{since}}) {
-# No version was smaller, include all
+# No version was earlier, include all
 warning(_g("none found, starting from the oldest entry"));
 delete $r->{since};
 $r->{from} = $versions[-1];
@@ -268,7 +268,7 @@ sub __sanity_check_range {
 }
 if ((defined($r->{from}) and not exists $versions{$r->{from}})) {
 warning(_g("'%s' option specifies non-existing version"), "from");
-warning(_g("use oldest entry that is bigger than the one specified"));
+warning(_g("use oldest entry that is later than the one specified"));
 my $oldest;
 foreach my $v (@versions) {
 if (version_compare_relation($v, REL_GT, $r->{from})) {
@@ -279,12 +279,12 @@ sub __sanity_check_range {
 $r->{from} = $oldest;
 } else {
 warning(_g("no such entry found, ignoring '%s' parameter"), 
"from");
-delete $r->{from}; # No version was bigger
+delete $r->{from}; # No version was oldest
 }
 }
 if (defined($r->{'until'}) and not exists $versions{$r->{'until'}}) {
 warning(_g("'%s' option specifies non-existing version"), "until");
-warning(_g("use oldest entry that is bigger than the one specified"));
+warning(_g("use oldest entry that is later than the one specified"));
 my $oldest;
 foreach my $v (@versions) {
 if (version_compare_relation($v, REL_GT, $r->{'until'})) {
@@ -295,12 +295,12 @@ sub __sanity_check_range {
 $r->{'until'} = $oldest;
 } else {
 warning(_g("no such entry found, ignoring '%s' parameter"), 
"until");
-delete $r->{'until'}; # No version was bigger
+delete $r->{'until'}; # No version was oldest
 }
 }
 if (defined($r->{to}) and not exists $versions{$r->{to}}) {
 warning(_g("'%s' option specifies non-existing version"), "to");
-warning(_g("use newest entry that is smaller than the one specified"));
+warning(_g("use newest entry that is earlier than the one specified"));
 foreach my $v (@versions) {
 if (version_compare_relation($v, REL_LT, $r->{to})) {
 $r->{to} = $v;
@@ -308,7 +308,7 @@ sub __sanity_check_range {
 }
 }
 if (not exists $versions{$r->{to}}) {
-# No version was smaller
+# No version was earlier
 warning(_g("no such entry found, ignoring '%s' parameter"), "to");
 delete $r->{to};
 }
diff --git a/scripts/Dpkg/Shlibs/Symbol.pm b/scripts/Dpkg/Shlibs/Symbol.pm
index 2b796d6..75f3d99 100644
--- a/scripts/Dpkg/Shlibs/Symbol.pm
+++ b/scripts/Dpkg/Shlibs/Symbol.pm
@@ -450,7 +450,7 @@ sub mark_found_in_library {
 # Sanitize the symbol when it is confirmed to be NOT found in
 # 

[SCM] dpkg's main repository branch, master, updated. 1.15.7.2-166-g4b3828b

2010-07-16 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 4b3828ba87359a3a0171a95479834983224b2f73
Author: Guillem Jover 
Date:   Fri Jul 16 17:06:23 2010 +0200

build: Add -Wshadow to default warnings

diff --git a/m4/dpkg-compiler.m4 b/m4/dpkg-compiler.m4
index f46f0a7..5a0f791 100644
--- a/m4/dpkg-compiler.m4
+++ b/m4/dpkg-compiler.m4
@@ -13,7 +13,7 @@ AC_DEFUN([DPKG_COMPILER_WARNINGS],
 
 WFLAGS="-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers \
 -Wmissing-declarations -Wmissing-format-attribute \
--Wvla -Winit-self -Wwrite-strings -Wcast-align"
+-Wvla -Winit-self -Wwrite-strings -Wcast-align -Wshadow"
 WCFLAGS="-Wdeclaration-after-statement -Wnested-externs -Wbad-function-cast \
 -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition"
 # Temporarily here until #542031 gets fixed in ncurses

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

2010-07-16 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 1dc3c58b4cad6338c8b02d106292b392e741f9e0
Author: Guillem Jover 
Date:   Fri Jul 16 16:51:36 2010 +0200

dpkg-query: Rename query.c to querycmd.c

This makes it obvious the file contains the main() function for
dpkg-query in line with the rest of the tools.

diff --git a/src/Makefile.am b/src/Makefile.am
index d1e432f..f19e384 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -59,7 +59,7 @@ dpkg_divert_LDADD = \
 dpkg_query_SOURCES = \
filesdb.c filesdb.h \
divertdb.c \
-   query.c
+   querycmd.c
 
 dpkg_query_LDADD = \
../lib/dpkg/libdpkg.a \
diff --git a/src/query.c b/src/querycmd.c
similarity index 99%
rename from src/query.c
rename to src/querycmd.c
index a3112c6..0cb54ca 100644
--- a/src/query.c
+++ b/src/querycmd.c
@@ -1,6 +1,6 @@
 /*
  * dpkg-query - program for query the dpkg database
- * query.c - status enquiry and listing options
+ * querycmd.c - status enquiry and listing options
  *
  * Copyright © 1995,1996 Ian Jackson 
  * Copyright © 2000,2001 Wichert Akkerman 

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

2010-07-16 Thread Guillem Jover
The following commit has been merged in the master branch:
commit bac27aba18dc8eff6124741f7554ccf75b09ceee
Author: Guillem Jover 
Date:   Fri Jul 16 16:38:37 2010 +0200

dpkg-query: Do not incorrectly trim package summary on --list

When computing the longest package description, the code was using
always the first package passed to list1package. Which made it trim to
an incorrect size.

diff --git a/debian/changelog b/debian/changelog
index 844b2f7..3ec70ef 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -78,6 +78,8 @@ dpkg (1.15.8) UNRELEASED; urgency=low
 renaming if it does not. Closes: #550252
 As a side effect, this avoids useless errors when the destination
 directory is not existent or writable. Closes: #581544
+  * Properly compute the longest package description from all to be displayed
+on “dpkg-query --list”, so that it does not get incorrectly trimmed.
 
   [ Updated programs translations ]
   * Catalan (Guillem Jover).
diff --git a/src/query.c b/src/query.c
index 609e24c..a3112c6 100644
--- a/src/query.c
+++ b/src/query.c
@@ -91,7 +91,7 @@ list1package(struct pkginfo *pkg, bool *head, struct 
pkg_array *array)
plen = strlen(array->pkgs[i]->name);
vlen = strlen(versiondescribe(&array->pkgs[i]->installed.version,
  vdew_nonambig));
-   pkg_summary(pkg, &dlen);
+   pkg_summary(array->pkgs[i], &dlen);
 
if (plen > nw) nw = plen;
if (vlen > vw) vw = vlen;

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

2010-07-16 Thread Guillem Jover
The following commit has been merged in the master branch:
commit e93fdb82239a07d52a377e5f4158e0ca0c58af7c
Author: Guillem Jover 
Date:   Fri Jul 16 16:49:38 2010 +0200

Fix file names in comment header

diff --git a/dselect/basecmds.cc b/dselect/basecmds.cc
index 27dfdcc..c11c994 100644
--- a/dselect/basecmds.cc
+++ b/dselect/basecmds.cc
@@ -1,6 +1,6 @@
 /*
  * dselect - Debian package maintenance user interface
- * bcommands.cc - base list keyboard commands display
+ * basecmds.cc - base list keyboard commands display
  *
  * Copyright © 1994,1995 Ian Jackson 
  * Copyright © 2000,2001 Wichert Akkerman 
diff --git a/dselect/basetop.cc b/dselect/basetop.cc
index 801d002..32d420f 100644
--- a/dselect/basetop.cc
+++ b/dselect/basetop.cc
@@ -1,6 +1,6 @@
 /*
  * dselect - Debian package maintenance user interface
- * bdrawtop.cc - base list class redraw of top
+ * basetop.cc - base list class redraw of top
  *
  * Copyright © 1994,1995 Ian Jackson 
  *
diff --git a/lib/dpkg/parsedump.h b/lib/dpkg/parsedump.h
index 0e2fad8..275c149 100644
--- a/lib/dpkg/parsedump.h
+++ b/lib/dpkg/parsedump.h
@@ -1,6 +1,6 @@
 /*
  * libdpkg - Debian packaging suite library routines
- * parse.c - declarations for in-core database reading/writing
+ * parsedump.h - declarations for in-core database reading/writing
  *
  * Copyright © 1995 Ian Jackson 
  * Copyright © 2001 Wichert Akkerman
diff --git a/lib/dpkg/pkg.c b/lib/dpkg/pkg.c
index 81079c0..f893732 100644
--- a/lib/dpkg/pkg.c
+++ b/lib/dpkg/pkg.c
@@ -1,6 +1,6 @@
 /*
  * dpkg - main program for package management
- * pkg-array.c - primitives for pkg handling
+ * pkg.c - primitives for pkg handling
  *
  * Copyright © 1995, 1996 Ian Jackson 
  * Copyright © 2009 Guillem Jover 
diff --git a/lib/dpkg/progress.h b/lib/dpkg/progress.h
index 5ea6dd2..4968467 100644
--- a/lib/dpkg/progress.h
+++ b/lib/dpkg/progress.h
@@ -1,6 +1,6 @@
 /*
  * dpkg - main program for package management
- * progress.c - generic progress reporting
+ * progress.h - generic progress reporting
  *
  * Copyright © 2009 Guillem Jover 
  *
diff --git a/src/errors.c b/src/errors.c
index c21fbb6..88c2210 100644
--- a/src/errors.c
+++ b/src/errors.c
@@ -1,6 +1,6 @@
 /*
  * dpkg - main program for package management
- * main.c - main program
+ * errors.c - per package error handling
  *
  * Copyright © 1994,1995 Ian Jackson 
  *

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

2010-07-16 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 4def4665267a8249ae2de2594422c18f7a84bc8b
Author: Guillem Jover 
Date:   Fri Jul 16 16:35:03 2010 +0200

dpkg-query: Use pkg_summary in list1package instead of ad-hoc code

diff --git a/src/query.c b/src/query.c
index 0607935..609e24c 100644
--- a/src/query.c
+++ b/src/query.c
@@ -86,16 +86,13 @@ list1package(struct pkginfo *pkg, bool *head, struct 
pkg_array *array)
 if (w == -1) {
   nw=14, vw=14, dw=44;
   for (i = 0; i < array->n_pkgs; i++) {
-   const char *pdesc;
int plen, vlen, dlen;
 
-   pdesc = pkg->installed.description;
-   if (!pdesc) pdesc= _("(no description available)");
-
plen = strlen(array->pkgs[i]->name);
vlen = strlen(versiondescribe(&array->pkgs[i]->installed.version,
  vdew_nonambig));
-   dlen= strcspn(pdesc, "\n");
+   pkg_summary(pkg, &dlen);
+
if (plen > nw) nw = plen;
if (vlen > vw) vw = vlen;
if (dlen > dw) dw = dlen;

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

2010-07-16 Thread Guillem Jover
The following commit has been merged in the master branch:
commit f45885e71425f23a707250a87e0672ec96d82cf7
Author: Guillem Jover 
Date:   Fri Jul 16 16:28:39 2010 +0200

libdpkg: Make pkg_summary() return the summary instead of void

Change from returning through a pointer argument to returning it from
the function return value.

diff --git a/lib/dpkg/pkg-show.c b/lib/dpkg/pkg-show.c
index d36d9bf..7101153 100644
--- a/lib/dpkg/pkg-show.c
+++ b/lib/dpkg/pkg-show.c
@@ -29,8 +29,8 @@
 #include 
 #include 
 
-void
-pkg_summary(struct pkginfo *pkg, const char **pdesc_r, int *len_ret)
+const char *
+pkg_summary(struct pkginfo *pkg, int *len_ret)
 {
const char *pdesc;
size_t len;
@@ -44,6 +44,7 @@ pkg_summary(struct pkginfo *pkg, const char **pdesc_r, int 
*len_ret)
len = strlen(pdesc);
 
*len_ret = len;
-   *pdesc_r = pdesc;
+
+   return pdesc;
 }
 
diff --git a/lib/dpkg/pkg-show.h b/lib/dpkg/pkg-show.h
index 120df80..4d56091 100644
--- a/lib/dpkg/pkg-show.h
+++ b/lib/dpkg/pkg-show.h
@@ -26,7 +26,7 @@
 
 DPKG_BEGIN_DECLS
 
-void pkg_summary(struct pkginfo *pkg, const char **pdesc_ret, int *len_ret);
+const char *pkg_summary(struct pkginfo *pkg, int *len_ret);
 
 DPKG_END_DECLS
 
diff --git a/src/enquiry.c b/src/enquiry.c
index a30b3eb..1f46b22 100644
--- a/src/enquiry.c
+++ b/src/enquiry.c
@@ -120,7 +120,7 @@ static void describebriefly(struct pkginfo *pkg) {
   l= strlen(pkg->name);
   if (l>20) maxl -= (l-20);
 
-  pkg_summary(pkg, &pdesc, &l);
+  pdesc = pkg_summary(pkg, &l);
   l = min(l, maxl);
 
   printf(" %-20s %.*s\n",pkg->name,l,pdesc);
diff --git a/src/query.c b/src/query.c
index 2ccdf1e..0607935 100644
--- a/src/query.c
+++ b/src/query.c
@@ -125,7 +125,7 @@ Desired=Unknown/Install/Remove/Purge/Hold\n\
 *head = true;
   }
 
-  pkg_summary(pkg, &pdesc, &l);
+  pdesc = pkg_summary(pkg, &l);
   l = min(l, dw);
 
   printf(format,

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

2010-07-16 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 92838b1a97e20b70c3a450578d2b4271143fd561
Author: Guillem Jover 
Date:   Fri Jul 16 14:19:15 2010 +0200

Move pkg-show module to libdpkg

diff --git a/lib/dpkg/Makefile.am b/lib/dpkg/Makefile.am
index d41c104..7d4b26a 100644
--- a/lib/dpkg/Makefile.am
+++ b/lib/dpkg/Makefile.am
@@ -49,6 +49,7 @@ libdpkg_a_SOURCES = \
pkg-format.c \
pkg-list.c \
pkg-queue.c \
+   pkg-show.c \
progress.c \
string.c \
subproc.c \
@@ -78,6 +79,7 @@ pkginclude_HEADERS = \
pkg-format.h \
pkg-list.h \
pkg-queue.h \
+   pkg-show.h \
progress.h \
string.h \
subproc.h \
diff --git a/src/pkg-show.c b/lib/dpkg/pkg-show.c
similarity index 93%
rename from src/pkg-show.c
rename to lib/dpkg/pkg-show.c
index 853278e..d36d9bf 100644
--- a/src/pkg-show.c
+++ b/lib/dpkg/pkg-show.c
@@ -3,6 +3,7 @@
  * pkg-show.c - primitives for pkg information display
  *
  * Copyright © 1995,1996 Ian Jackson 
+ * Copyright © 2008-2010 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
@@ -25,10 +26,8 @@
 
 #include 
 #include 
-#include 
 #include 
-
-#include "main.h"
+#include 
 
 void
 pkg_summary(struct pkginfo *pkg, const char **pdesc_r, int *len_ret)
diff --git a/lib/dpkg/pkg.h b/lib/dpkg/pkg-show.h
similarity index 72%
copy from lib/dpkg/pkg.h
copy to lib/dpkg/pkg-show.h
index 9195134..120df80 100644
--- a/lib/dpkg/pkg.h
+++ b/lib/dpkg/pkg-show.h
@@ -1,8 +1,8 @@
 /*
  * dpkg - main program for package management
- * pkg.h - primitives for pkg handling
+ * pkg-show.h - primitives for pkg information display
  *
- * Copyright © 2009 Guillem Jover 
+ * Copyright © 2010 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,17 +18,16 @@
  * along with this program.  If not, see .
  */
 
-#ifndef LIBDPKG_PKG_H
-#define LIBDPKG_PKG_H
+#ifndef DPKG_PKG_SHOW_H
+#define DPKG_PKG_SHOW_H
 
 #include 
+#include 
 
 DPKG_BEGIN_DECLS
 
-typedef int pkg_sorter_func(const void *a, const void *b);
-
-int pkg_sorter_by_name(const void *a, const void *b);
+void pkg_summary(struct pkginfo *pkg, const char **pdesc_ret, int *len_ret);
 
 DPKG_END_DECLS
 
-#endif /* LIBDPKG_PKG_H */
+#endif /* DPKG_PKG_SHOW_H */
diff --git a/src/Makefile.am b/src/Makefile.am
index 7c6b054..d1e432f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -33,7 +33,6 @@ dpkg_SOURCES = \
help.c \
main.c main.h \
packages.c \
-   pkg-show.c \
processarc.c \
remove.c \
select.c \
@@ -60,7 +59,6 @@ dpkg_divert_LDADD = \
 dpkg_query_SOURCES = \
filesdb.c filesdb.h \
divertdb.c \
-   pkg-show.c \
query.c
 
 dpkg_query_LDADD = \
diff --git a/src/enquiry.c b/src/enquiry.c
index 69e702d..a30b3eb 100644
--- a/src/enquiry.c
+++ b/src/enquiry.c
@@ -38,6 +38,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include "filesdb.h"
diff --git a/src/main.h b/src/main.h
index b17810b..6337191 100644
--- a/src/main.h
+++ b/src/main.h
@@ -171,8 +171,6 @@ void printarch(const char *const *argv);
 void printinstarch(const char *const *argv);
 void cmpversions(const char *const *argv) DPKG_ATTR_NORET;
 
-void pkg_summary(struct pkginfo *pkg, const char **pdesc_ret, int *len_ret);
-
 /* from select.c */
 
 void getselections(const char *const *argv);
diff --git a/src/query.c b/src/query.c
index 9783847..2ccdf1e 100644
--- a/src/query.c
+++ b/src/query.c
@@ -44,6 +44,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 

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

2010-07-16 Thread Guillem Jover
The following commit has been merged in the master branch:
commit c5309f8009d14dc6ce05a783ab89acf0c5e2a3ed
Author: Guillem Jover 
Date:   Wed Jul 14 15:23:46 2010 +0200

Switch variables from int to bool where appropriate

diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c
index 40d6c0f..6e03e1f 100644
--- a/dpkg-deb/build.c
+++ b/dpkg-deb/build.c
@@ -211,11 +211,12 @@ void do_build(const char *const *argv) {
   
   char *m;
   const char *debar, *directory, *const *mscriptp, *versionstring, *arch;
+  bool subdir;
   char *controlfile, *tfbuf;
   struct pkginfo *checkedinfo;
   struct arbitraryfield *field;
   FILE *ar, *cf;
-  int p1[2], p2[2], p3[2], warns, n, c, subdir, gzfd;
+  int p1[2], p2[2], p3[2], warns, n, c, gzfd;
   pid_t c1,c2,c3;
   struct stat controlstab, mscriptstab, debarstab;
   char conffilename[MAXCONFFILENAME+1];
@@ -227,7 +228,7 @@ void do_build(const char *const *argv) {
   directory = *argv++;
   if (!directory)
 badusage(_("--%s needs a  argument"), cipaction->olong);
-  subdir= 0;
+  subdir = false;
   debar = *argv++;
   if (debar != NULL) {
 if (*argv) badusage(_("--build takes at most two arguments"));
@@ -236,7 +237,7 @@ void do_build(const char *const *argv) {
 if (errno != ENOENT)
   ohshite(_("unable to check for existence of archive 
`%.250s'"),debar);
   } else if (S_ISDIR(debarstab.st_mode)) {
-subdir= 1;
+subdir = true;
   }
 }
   } else {
diff --git a/lib/dpkg/pkg-format.c b/lib/dpkg/pkg-format.c
index 25d8a95..4c44acc 100644
--- a/lib/dpkg/pkg-format.c
+++ b/lib/dpkg/pkg-format.c
@@ -207,10 +207,10 @@ pkg_format_show(const struct pkg_format_node *head,
struct varbuf vb = VARBUF_INIT, fb = VARBUF_INIT, wb = VARBUF_INIT;
 
while (head) {
-   int ok;
+   bool ok;
char fmt[16];
 
-   ok = 0;
+   ok = false;
 
if (head->width > 0)
snprintf(fmt, 16, "%%%s%zds",
@@ -220,7 +220,7 @@ pkg_format_show(const struct pkg_format_node *head,
 
if (head->type == string) {
varbufprintf(&fb, fmt, head->data);
-   ok = 1;
+   ok = true;
} else if (head->type == field) {
const struct fieldinfo *fip;
 
@@ -231,7 +231,7 @@ pkg_format_show(const struct pkg_format_node *head,
varbufaddc(&wb, '\0');
varbufprintf(&fb, fmt, wb.buf);
varbufreset(&wb);
-   ok = 1;
+   ok = true;
break;
}
 
@@ -241,7 +241,7 @@ pkg_format_show(const struct pkg_format_node *head,
for (afp = pif->arbs; afp; afp = afp->next)
if (strcasecmp(head->data, afp->name) 
== 0) {
varbufprintf(&fb, fmt, 
afp->value);
-   ok = 1;
+   ok = true;
break;
}
}
diff --git a/src/errors.c b/src/errors.c
index d115ff3..c21fbb6 100644
--- a/src/errors.c
+++ b/src/errors.c
@@ -65,7 +65,7 @@ void print_error_perpackage(const char *emsg, const char 
*arg) {
   nr= malloc(sizeof(struct error_report));
   if (!nr) {
 perror(_("dpkg: failed to allocate memory for new entry in list of failed 
packages."));
-abort_processing = 1;
+abort_processing = true;
 nr= &emergency;
   }
   nr->what= arg;
@@ -75,7 +75,7 @@ void print_error_perpackage(const char *emsg, const char 
*arg) {
 
   if (nerrs++ < errabort) return;
   fprintf(stderr, _("dpkg: too many errors, stopping\n"));
-  abort_processing = 1;
+  abort_processing = true;
 }
 
 int reportbroken_retexitstatus(void) {
diff --git a/src/main.c b/src/main.c
index e1fdebb..bdf4029 100644
--- a/src/main.c
+++ b/src/main.c
@@ -608,7 +608,8 @@ void commandfd(const char *const *argv) {
   }
 
   for (;;) {
-int argc= 1, mode= 0;
+bool mode = false;
+int argc= 1;
 lno= 0;
 push_error_handler(&ejbuf, print_error_fatal, NULL);
 
@@ -642,15 +643,15 @@ void commandfd(const char *const *argv) {
skipchar = true;
continue;
   } else if (isspace(*ptr)) {
-   if (mode == 1) {
+   if (mode == true) {
  *ptr = '\0';
- mode= 0;
+ mode = false;
}
   } else {
-   if (mode == 0) {
+   if (mode == false) {
  newargs[argc]= ptr;
  argc++;
- mode= 1;
+ mode = true;
}
   }
   ptr++;
diff --git a/src/packages.c b/src/packages.c
index e10f586..71cb50e 100644
--- a/src/packages.c
+++ b/src/packages.c
@@ -306,

[SCM] dpkg's main repository branch, master, updated. 1.15.7.2-166-g4b3828b

2010-07-16 Thread Guillem Jover
The following commit has been merged in the master branch:
commit b4efb601b445580a3a46ce873eec3a80893dd08f
Author: Guillem Jover 
Date:   Fri Jul 16 14:03:41 2010 +0200

Convert limiteddescription() to pkg_summary()

Move clamping of summary size to callers. This makes the function more
generic so that it can be reused in other contexts.

diff --git a/src/enquiry.c b/src/enquiry.c
index d8e1a4f..69e702d 100644
--- a/src/enquiry.c
+++ b/src/enquiry.c
@@ -118,7 +118,10 @@ static void describebriefly(struct pkginfo *pkg) {
   maxl= 57;
   l= strlen(pkg->name);
   if (l>20) maxl -= (l-20);
-  limiteddescription(pkg,maxl,&pdesc,&l);
+
+  pkg_summary(pkg, &pdesc, &l);
+  l = min(l, maxl);
+
   printf(" %-20s %.*s\n",pkg->name,l,pdesc);
 }
 
diff --git a/src/main.h b/src/main.h
index 17ba2d4..b17810b 100644
--- a/src/main.h
+++ b/src/main.h
@@ -171,8 +171,7 @@ void printarch(const char *const *argv);
 void printinstarch(const char *const *argv);
 void cmpversions(const char *const *argv) DPKG_ATTR_NORET;
 
-void limiteddescription(struct pkginfo *pkg,
-int maxl, const char **pdesc_r, int *l_r);
+void pkg_summary(struct pkginfo *pkg, const char **pdesc_ret, int *len_ret);
 
 /* from select.c */
 
diff --git a/src/pkg-show.c b/src/pkg-show.c
index c1b8789..853278e 100644
--- a/src/pkg-show.c
+++ b/src/pkg-show.c
@@ -31,19 +31,20 @@
 #include "main.h"
 
 void
-limiteddescription(struct pkginfo *pkg,
-   int maxl, const char **pdesc_r, int *l_r)
+pkg_summary(struct pkginfo *pkg, const char **pdesc_r, int *len_ret)
 {
-   const char *pdesc, *p;
+   const char *pdesc;
+   size_t len;
 
pdesc = pkg->installed.description;
if (!pdesc)
pdesc = _("(no description available)");
-   p = strchr(pdesc, '\n');
-   if (!p)
-   p = pdesc + strlen(pdesc);
 
-   *l_r = min(p - pdesc, maxl);
+   len = strcspn(pdesc, "\n");
+   if (len == 0)
+   len = strlen(pdesc);
+
+   *len_ret = len;
*pdesc_r = pdesc;
 }
 
diff --git a/src/query.c b/src/query.c
index 7eb94e2..9783847 100644
--- a/src/query.c
+++ b/src/query.c
@@ -124,7 +124,9 @@ Desired=Unknown/Install/Remove/Purge/Hold\n\
 *head = true;
   }
 
-  limiteddescription(pkg,dw,&pdesc,&l);
+  pkg_summary(pkg, &pdesc, &l);
+  l = min(l, dw);
+
   printf(format,
  "uihrp"[pkg->want],
  "ncHUFWti"[pkg->status],

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

2010-07-16 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 0ffb2352819de51884f80c380819a33cce9333a7
Author: Guillem Jover 
Date:   Sun Jul 11 19:56:05 2010 +0200

u-a: Rename altlnk to sl_altlnk to not shadow altlnk from outter scope

diff --git a/utils/update-alternatives.c b/utils/update-alternatives.c
index 6c4d9c2..e4c8fa3 100644
--- a/utils/update-alternatives.c
+++ b/utils/update-alternatives.c
@@ -1710,17 +1710,17 @@ alternative_is_broken(struct alternative *a)
}
free(sl_current);
} else {
-   char *altlnk;
+   char *sl_altlnk;
 
/* Slave link must not exist. */
if (lstat(sl->link, &st) == 0)
return true;
-   xasprintf(&altlnk, "%s/%s", altdir, sl->name);
-   if (lstat(altlnk, &st) == 0) {
-   free(altlnk);
+   xasprintf(&sl_altlnk, "%s/%s", altdir, sl->name);
+   if (lstat(sl_altlnk, &st) == 0) {
+   free(sl_altlnk);
return true;
}
-   free(altlnk);
+   free(sl_altlnk);
}
}
 

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

2010-07-16 Thread Guillem Jover
The following commit has been merged in the master branch:
commit fa610b5f505c38fad4c7c8d9b86262988a2d793d
Author: Guillem Jover 
Date:   Sun Jul 11 19:48:22 2010 +0200

u-a: Rename link variable to linkname to not shadow link(2)

diff --git a/utils/update-alternatives.c b/utils/update-alternatives.c
index 04c333d..6c4d9c2 100644
--- a/utils/update-alternatives.c
+++ b/utils/update-alternatives.c
@@ -256,28 +256,28 @@ xstrdup(const char *str)
 }
 
 static char *
-xreadlink(const char *link, bool error_out)
+xreadlink(const char *linkname, bool error_out)
 {
struct stat st;
char *buf;
ssize_t size;
 
/* Allocate required memory to store the value of the symlink */
-   if (lstat(link, &st)) {
+   if (lstat(linkname, &st)) {
if (!error_out)
return NULL;
-   error(_("cannot stat %s: %s"), link, strerror(errno));
+   error(_("cannot stat %s: %s"), linkname, strerror(errno));
}
buf = xmalloc(st.st_size + 1);
 
/* Read it and terminate the string properly */
-   size = readlink(link, buf, st.st_size);
+   size = readlink(linkname, buf, st.st_size);
if (size == -1) {
if (!error_out) {
free(buf);
return NULL;
}
-   error(_("readlink(%s) failed: %s"), link, strerror(errno));
+   error(_("readlink(%s) failed: %s"), linkname, strerror(errno));
}
buf[size] = '\0';
 
@@ -920,13 +920,13 @@ alternative_set_status(struct alternative *a, enum 
alternative_status status)
 
 /* link must be allocated with malloc */
 static void
-alternative_set_link(struct alternative *a, char *link)
+alternative_set_link(struct alternative *a, char *linkname)
 {
-   if (a->master_link == NULL || strcmp(link, a->master_link) != 0)
+   if (a->master_link == NULL || strcmp(linkname, a->master_link) != 0)
a->modified = true;
 
free(a->master_link);
-   a->master_link = link;
+   a->master_link = linkname;
 }
 
 static bool
@@ -1038,7 +1038,7 @@ altdb_print_line(struct altdb_context *ctx, const char 
*line)
 static bool
 alternative_parse_slave(struct alternative *a, struct altdb_context *ctx)
 {
-   char *name, *link;
+   char *name, *linkname;
struct slave_link *sl;
 
name = altdb_get_line(ctx, _("slave name"));
@@ -1052,23 +1052,23 @@ alternative_parse_slave(struct alternative *a, struct 
altdb_context *ctx)
ctx->bad_format(ctx, _("duplicate slave %s"), sl->name);
}
 
-   link = altdb_get_line(ctx, _("slave link"));
-   if (strcmp(link, a->master_link) == 0) {
-   free(link);
+   linkname = altdb_get_line(ctx, _("slave link"));
+   if (strcmp(linkname, a->master_link) == 0) {
+   free(linkname);
free(name);
ctx->bad_format(ctx, _("slave link same as main link %s"),
a->master_link);
}
for(sl = a->slaves; sl; sl = sl->next) {
-   if (strcmp(link, sl->link) == 0) {
-   free(link);
+   if (strcmp(linkname, sl->link) == 0) {
+   free(linkname);
free(name);
ctx->bad_format(ctx, _("duplicate slave link %s"),
sl->link);
}
}
 
-   alternative_add_slave(a, name, link);
+   alternative_add_slave(a, name, linkname);
 
return true;
 }
@@ -1537,7 +1537,7 @@ alternative_commit(struct alternative *a)
 
 static void
 alternative_prepare_install_single(struct alternative *a, const char *name,
-  const char *link, const char *file)
+  const char *linkname, const char *file)
 {
char *fntmp, *fn;
struct stat st;
@@ -1552,22 +1552,23 @@ alternative_prepare_install_single(struct alternative 
*a, const char *name,
free(fntmp);
 
errno = 0;
-   if (lstat(link, &st) == -1) {
+   if (lstat(linkname, &st) == -1) {
if (errno != ENOENT)
-   error(_("cannot stat %s: %s"), link, strerror(errno));
+   error(_("cannot stat %s: %s"), linkname,
+ strerror(errno));
create_link = true;
} else {
create_link = S_ISLNK(st.st_mode);
}
if (create_link || opt_force) {
/* Create alternative link. */
-   xasprintf(&fntmp, "%s" DPKG_TMP_EXT, link);
+   xasprintf(&fntmp, "%s" DPKG_TMP_EXT, linkname);
checked_rm(fntmp);
checked_symlink(fn, fntmp);
-   alternative_add_commit_op(a, opcode_mv, fntmp, link);
+   alternative_add_commit_op(a, opcode_mv, fntmp, linkname);
free(fntmp);
}

[SCM] dpkg's main repository branch, master, updated. 1.15.7.2-166-g4b3828b

2010-07-16 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 51be5fbb426c0d46aa38dcd1289852b60a252a6c
Author: Guillem Jover 
Date:   Sun Jul 11 19:57:07 2010 +0200

u-a: Rename variable a to a_new to not shadow outter scope variable

diff --git a/utils/update-alternatives.c b/utils/update-alternatives.c
index e4c8fa3..972d173 100644
--- a/utils/update-alternatives.c
+++ b/utils/update-alternatives.c
@@ -2120,19 +2120,19 @@ main(int argc, char **argv)
count = get_all_alternatives(&table);
for (i = 0; i < count; i++) {
struct slave_link *sl;
-   struct alternative *a = alternative_new(table[i]->d_name);
+   struct alternative *a_new = alternative_new(table[i]->d_name);
 
-   if (!alternative_load(a, true)) {
-   alternative_free(a);
+   if (!alternative_load(a_new, true)) {
+   alternative_free(a_new);
free(table[i]);
continue;
}
-   alternative_map_add(alt_map_obj, a->master_name, a);
-   alternative_map_add(alt_map_links, a->master_link, a);
-   alternative_map_add(alt_map_parent, a->master_name, a);
-   for (sl = a->slaves; sl; sl = sl->next) {
-   alternative_map_add(alt_map_links, sl->link, a);
-   alternative_map_add(alt_map_parent, sl->name, a);
+   alternative_map_add(alt_map_obj, a_new->master_name, a_new);
+   alternative_map_add(alt_map_links, a_new->master_link, a_new);
+   alternative_map_add(alt_map_parent, a_new->master_name, a_new);
+   for (sl = a_new->slaves; sl; sl = sl->next) {
+   alternative_map_add(alt_map_links, sl->link, a_new);
+   alternative_map_add(alt_map_parent, sl->name, a_new);
}
 
free(table[i]);

-- 
dpkg's main repository


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



[SCM] dpkg's main repository branch, master, updated. 1.15.7.2-166-g4b3828b

2010-07-16 Thread Guillem Jover
The following commit has been merged in the master branch:
commit a9746761e3237e4cee5c5c7f5851b62b4de8ed37
Author: Guillem Jover 
Date:   Sun Jul 11 19:00:56 2010 +0200

u-a: Rename variable index to idx to not shadow index(3)

diff --git a/utils/update-alternatives.c b/utils/update-alternatives.c
index 5c0c939..04c333d 100644
--- a/utils/update-alternatives.c
+++ b/utils/update-alternatives.c
@@ -1409,7 +1409,7 @@ alternative_select_choice(struct alternative *a)
 {
char *current, *ret, selection[_POSIX_PATH_MAX];
struct fileset *best, *fs;
-   int len, index;
+   int len, idx;
 
current = alternative_get_current(a);
best = alternative_get_best(a);
@@ -1435,16 +1435,16 @@ alternative_select_choice(struct alternative *a)
mark = " ";
pr("%s %-12d %-*s % -10d %s", mark, 0, len, best->master_file,
   best->priority, _("auto mode"));
-   index = 1;
+   idx = 1;
for (fs = a->choices; fs; fs = fs->next) {
if (a->status == ALT_ST_MANUAL && current &&
strcmp(current, fs->master_file) == 0)
mark = "*";
else
mark = " ";
-   pr("%s %-12d %-*s % -10d %s", mark, index, len,
+   pr("%s %-12d %-*s % -10d %s", mark, idx, len,
   fs->master_file, fs->priority, _("manual mode"));
-   index++;
+   idx++;
}
printf("\n");
printf(_("Press enter to keep the current choice[*], "
@@ -1457,16 +1457,16 @@ alternative_select_choice(struct alternative *a)
selection[strlen(selection) - 1] = '\0';
if (strlen(selection) == 0)
return current;
-   index = strtol(selection, &ret, 10);
+   idx = strtol(selection, &ret, 10);
if (*ret == '\0') {
/* Look up by index */
-   if (index == 0) {
+   if (idx == 0) {
alternative_set_status(a, ALT_ST_AUTO);
free(current);
return xstrdup(best->master_file);
}
-   index--;
-   for (fs = a->choices; index && fs; index--)
+   idx--;
+   for (fs = a->choices; idx && fs; idx--)
fs = fs->next;
if (fs) {
alternative_set_status(a, ALT_ST_MANUAL);

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

2010-07-16 Thread Guillem Jover
The following commit has been merged in the master branch:
commit f530505861321e8d8a9e70cf5fd86278778b58d1
Author: Guillem Jover 
Date:   Sun Jul 11 18:51:32 2010 +0200

u-a: Remove unneeded const from fileset_add_slave string arguments

The arguments were later on cast to remove the constness, so just fix
the prototype of the function.

diff --git a/utils/update-alternatives.c b/utils/update-alternatives.c
index 41a2062..5c0c939 100644
--- a/utils/update-alternatives.c
+++ b/utils/update-alternatives.c
@@ -529,7 +529,7 @@ fileset_free(struct fileset *fs)
 
 /* name and file must be allocated with malloc */
 static void
-fileset_add_slave(struct fileset *fs, const char *name, const char *file)
+fileset_add_slave(struct fileset *fs, char *name, char *file)
 {
struct slave_file *sl, *cur, *prev = NULL;
 
@@ -546,8 +546,8 @@ fileset_add_slave(struct fileset *fs, const char *name, 
const char *file)
/* Otherwise add new at the end */
sl = xmalloc(sizeof(*sl));
sl->next = NULL;
-   sl->name = (char *)name;
-   sl->file = (char *)file;
+   sl->name = name;
+   sl->file = file;
if (prev)
prev->next = sl;
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-166-g4b3828b

2010-07-16 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 20a523e176f4c3c81cdade68ba71c45c421dfadc
Author: Guillem Jover 
Date:   Sun Jul 11 19:42:02 2010 +0200

dpkg: Rename symlink variable to target to not shadow symlink(2)

diff --git a/src/configure.c b/src/configure.c
index f0a7053..e717cfc 100644
--- a/src/configure.c
+++ b/src/configure.c
@@ -368,7 +368,7 @@ deferred_configure(struct pkginfo *pkg)
 int
 conffderef(struct pkginfo *pkg, struct varbuf *result, const char *in)
 {
-   static struct varbuf symlink = VARBUF_INIT;
+   static struct varbuf target = VARBUF_INIT;
struct stat stab;
int r;
int loopprotect;
@@ -405,9 +405,9 @@ conffderef(struct pkginfo *pkg, struct varbuf *result, 
const char *in)
return -1;
}
 
-   varbufreset(&symlink);
-   varbuf_grow(&symlink, stab.st_size + 1);
-   r = readlink(result->buf, symlink.buf, symlink.size);
+   varbufreset(&target);
+   varbuf_grow(&target, stab.st_size + 1);
+   r = readlink(result->buf, target.buf, target.size);
if (r < 0) {
warning(_("%s: unable to readlink conffile 
'%s'\n"
  " (= '%s'): %s"),
@@ -415,14 +415,14 @@ conffderef(struct pkginfo *pkg, struct varbuf *result, 
const char *in)
return -1;
}
assert(r == stab.st_size); /* XXX: debug */
-   symlink.used = r;
-   varbufaddc(&symlink, '\0');
+   target.used = r;
+   varbufaddc(&target, '\0');
 
debug(dbg_conffdetail,
  "conffderef readlink gave %d, '%s'",
- r, symlink.buf);
+ r, target.buf);
 
-   if (symlink.buf[0] == '/') {
+   if (target.buf[0] == '/') {
varbufreset(result);
varbufaddstr(result, instdir);
debug(dbg_conffdetail,
@@ -433,7 +433,8 @@ conffderef(struct pkginfo *pkg, struct varbuf *result, 
const char *in)
if (r < 0) {
warning(_("%s: conffile '%.250s' 
resolves to degenerate filename\n"
  " ('%s' is a symlink to 
'%s')"),
-   pkg->name, in, result->buf, 
symlink.buf);
+   pkg->name, in, result->buf,
+   target.buf);
return -1;
}
if (result->buf[r] == '/')
@@ -443,7 +444,7 @@ conffderef(struct pkginfo *pkg, struct varbuf *result, 
const char *in)
  "conffderef readlink relative to '%.*s'",
  (int)result->used, result->buf);
}
-   varbufaddbuf(result, symlink.buf, symlink.used);
+   varbufaddbuf(result, target.buf, target.used);
varbufaddc(result, 0);
} else {
warning(_("%s: conffile '%.250s' is not a plain file or 
symlink (= '%s')"),

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

2010-07-16 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 7562f4ce74a04167ef2e9927304b15ae4b8cb6e9
Author: Guillem Jover 
Date:   Sun Jul 11 15:50:29 2010 +0200

dpkg: Rename the remove variable to skip to not shadow remove(3)

diff --git a/src/filters.c b/src/filters.c
index 874eb60..d512e10 100644
--- a/src/filters.c
+++ b/src/filters.c
@@ -64,7 +64,7 @@ bool
 filter_should_skip(struct TarInfo *ti)
 {
struct filter_node *f;
-   bool remove = false;
+   bool skip = false;
 
if (!filter_head)
return false;
@@ -76,11 +76,11 @@ filter_should_skip(struct TarInfo *ti)
 
if (fnmatch(f->pattern, &ti->Name[1], 0) == 0) {
if (f->include) {
-   remove = false;
+   skip = false;
debug(dbg_eachfile, "filter including %s",
  ti->Name);
} else {
-   remove = true;
+   skip = true;
debug(dbg_eachfile, "filter removing %s",
  ti->Name);
}
@@ -93,7 +93,7 @@ filter_should_skip(struct TarInfo *ti)
 * directories than necessary, but better err on the side of caution
 * than failing with “no such file or directory” (which would leave
 * the package in a very bad state). */
-   if (remove && (ti->Type == Directory || ti->Type == SymbolicLink)) {
+   if (skip && (ti->Type == Directory || ti->Type == SymbolicLink)) {
debug(dbg_eachfile,
  "filter seeing if '%s' needs to be reincluded",
  &ti->Name[1]);
@@ -124,5 +124,5 @@ filter_should_skip(struct TarInfo *ti)
}
}
 
-   return remove;
+   return skip;
 }

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

2010-07-16 Thread Guillem Jover
The following commit has been merged in the master branch:
commit d647c878fb04db22dd0cfa7a57bee8f1d3caeac8
Author: Guillem Jover 
Date:   Sun Jul 11 15:49:27 2010 +0200

dpkg-split: Namespace global option variables to not shadow local ones

diff --git a/dpkg-split/dpkg-split.h b/dpkg-split/dpkg-split.h
index 64b331a..4fd0bf7 100644
--- a/dpkg-split/dpkg-split.h
+++ b/dpkg-split/dpkg-split.h
@@ -51,10 +51,13 @@ struct partqueue {
 
 extern dofunction *action;
 extern const struct cmdinfo *cipaction;
-extern long maxpartsize;
-extern const char *depotdir, *outputfile;
 extern struct partqueue *queue;
-extern int npquiet, msdos;
+
+extern long opt_maxpartsize;
+extern const char *opt_depotdir;
+extern const char *opt_outputfile;
+extern int opt_npquiet;
+extern int opt_msdos;
 
 void rerr(const char *fn) DPKG_ATTR_NORET;
 void rerreof(FILE *f, const char *fn) DPKG_ATTR_NORET;
diff --git a/dpkg-split/join.c b/dpkg-split/join.c
index 7a4e950..ad9fb06 100644
--- a/dpkg-split/join.c
+++ b/dpkg-split/join.c
@@ -135,13 +135,13 @@ void do_join(const char *const *argv) {
   for (i=0; imaxpartn; i++) {
 if (!partlist[i]) ohshit(_("part %d is missing"),i+1);
   }
-  if (!outputfile) {
+  if (!opt_outputfile) {
 p= nfmalloc(strlen(refi->package)+1+strlen(refi->version)+sizeof(DEBEXT));
 strcpy(p,refi->package);
 strcat(p,"-");
 strcat(p,refi->version);
 strcat(p,DEBEXT);
-outputfile= p;
+opt_outputfile = p;
   }
-  reassemble(partlist,outputfile);
+  reassemble(partlist, opt_outputfile);
 }
diff --git a/dpkg-split/main.c b/dpkg-split/main.c
index 82a672d..a143eb0 100644
--- a/dpkg-split/main.c
+++ b/dpkg-split/main.c
@@ -98,10 +98,13 @@ const char printforhelp[]= N_("Type dpkg-split --help for 
help.");
 
 dofunction *action=NULL;
 const struct cmdinfo *cipaction=NULL;
-long maxpartsize= SPLITPARTDEFMAX;
-const char *depotdir= ADMINDIR "/" PARTSDIR, *outputfile= NULL;
 struct partqueue *queue= NULL;
-int npquiet= 0, msdos= 0;
+
+long opt_maxpartsize = SPLITPARTDEFMAX;
+const char *opt_depotdir = ADMINDIR "/" PARTSDIR;
+const char *opt_outputfile = NULL;
+int opt_npquiet = 0;
+int opt_msdos = 0;
 
 void rerr(const char *fn) {
   ohshite(_("error reading %.250s"), fn);
@@ -124,8 +127,8 @@ static void setpartsize(const struct cmdinfo *cip, const 
char *value) {
   if (newpartsize <= 0 || newpartsize > (INT_MAX >> 10))
 badusage(_("part size is far too large or is not positive"));
 
-  maxpartsize= newpartsize << 10;
-  if (maxpartsize <= HEADERALLOWANCE)
+  opt_maxpartsize = newpartsize << 10;
+  if (opt_maxpartsize <= HEADERALLOWANCE)
 badusage(_("part size must be at least %d KiB (to allow for header)"),
  (HEADERALLOWANCE >> 10) + 1);
 }
@@ -151,11 +154,11 @@ static const struct cmdinfo cmdinfos[]= {
   { "discard",  'd',  0,  NULL, NULL, setaction   },
   { "help", 'h',  0,  NULL, NULL, usage   },
   { "version",   0,   0,  NULL, NULL, printversion},
-  { "depotdir",  0,   1,  NULL, &depotdir, NULL   },
+  { "depotdir",  0,   1,  NULL, &opt_depotdir,NULL},
   { "partsize", 'S',  1,  NULL, NULL, setpartsize },
-  { "output",   'o',  1,  NULL, &outputfile,   NULL   },
-  { "npquiet",  'Q',  0,  &npquiet, NULL,  NULL,  1   },
-  { "msdos", 0,   0,  &msdos, NULL,NULL,  1   },
+  { "output",   'o',  1,  NULL, &opt_outputfile,  NULL},
+  { "npquiet",  'Q',  0,  &opt_npquiet, NULL, NULL,   1   },
+  { "msdos", 0,   0,  &opt_msdos, NULL,   NULL,   1   },
   {  NULL,  0  }
 };
 
@@ -182,12 +185,12 @@ int main(int argc, const char *const *argv) {
 
   if (!cipaction) badusage(_("need an action option"));
 
-  l= strlen(depotdir);
-  if (l && depotdir[l-1] != '/') {
+  l = strlen(opt_depotdir);
+  if (l && opt_depotdir[l - 1] != '/') {
 p= nfmalloc(l+2);
-strcpy(p,depotdir);
+strcpy(p, opt_depotdir);
 strcpy(p+l,"/");
-depotdir= p;
+opt_depotdir = p;
   }
 
   setvbuf(stdout,NULL,_IONBF,0);
diff --git a/dpkg-split/queue.c b/dpkg-split/queue.c
index a2ed837..69ac976 100644
--- a/dpkg-split/queue.c
+++ b/dpkg-split/queue.c
@@ -84,16 +84,17 @@ void scandepot(void) {
   char *p;
 
   assert(!queue);
-  depot= opendir(depotdir);
-  if (!depot) ohshite(_("unable to read depot directory `%.250s'"),depotdir);
+  depot = opendir(opt_depotdir);
+  if (!depot)
+ohshite(_("unable to read depot directory `%.250s'"), opt_depotdir);
   while ((de= readdir(depot))) {
 if (de->d_name[0] == '.') continue;
 pq= nfmalloc(sizeof(struct partqueue));
 pq->info.fmtversion= pq->info.package= pq->info.version= NULL;
 pq->info.orglength= pq->info.thispartoffset= pq->info.thispartlen= 0;
 pq->info.headerlen= 0;
-p= nfmalloc(

[SCM] dpkg's main repository branch, master, updated. 1.15.7.2-166-g4b3828b

2010-07-16 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 0581dda824f26e9eec996ebf4de5f6474336bec2
Author: Guillem Jover 
Date:   Sun Jul 11 11:44:41 2010 +0200

build: Add optional code coverage support

Enable code coverage support with 'configure --enable-coverage'. Use
gcov and lcov for C code coverage, and Devel::Cover and cover for Perl
code coverage.

diff --git a/.gitignore b/.gitignore
index 4d48623..8052d2a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,10 @@
 # Inherited ignores
 *.a
 *.o
+*.gcno
+*.gcda
+*.gcov
+*.lcov
 .*.swp
 .deps/
 Makefile
diff --git a/Makecheck.am b/Makecheck.am
index b88c1ea..afeeefc 100644
--- a/Makecheck.am
+++ b/Makecheck.am
@@ -4,6 +4,7 @@
 #
 #  TEST_VERBOSE - set to 0 or 1 to control test suite verbosity
 #  TEST_ENV_VARS - environment variables to be set for the test suite
+#  TEST_COVERAGE - set to the perl module in charge of getting test coverage
 #  test_tmpdir - test suite temporary directory
 #  test_cases - list of test case files
 #  test_data - list of test data files
@@ -16,6 +17,7 @@ check-local: $(test_data) $(test_cases)

PATH="$(top_builddir)/src:$(top_builddir)/scripts:$(top_builddir)/utils:$(PATH)"
 \
  srcdir=$(srcdir) builddir=$(builddir) \
  PERL5LIB=$(top_srcdir)/scripts PERL_DL_NONLAZY=1 \
+ PERL5OPT=$(TEST_COVERAGE) \
  $(PERL) -I$(top_srcdir)/scripts \
-MExtUtils::Command::MM -e "test_harness($(TEST_VERBOSE), '.')" \
$(addprefix $(srcdir)/,$(test_cases))
diff --git a/Makefile.am b/Makefile.am
index b6d634e..a18c4e0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -72,9 +72,50 @@ EXTRA_DIST = \
 doc: doc/Doxyfile
$(DOXYGEN) doc/Doxyfile
 
-clean-local:
+doc-clean:
rm -rf doc/html/
 
+# Code coverage support
+
+.PHONY: coverage coverage-clean
+
+if COVERAGE_ENABLED
+LCOV_OPTS = -q --checksum
+LCOV_CAPTURE_OPTS = $(LCOV_OPTS) --no-recursion \
+   -d $(top_builddir)/lib/dpkg \
+   -d $(top_builddir)/src \
+   -d $(top_builddir)/utils
+
+coverage: all
+   $(RM) -f *.lcov
+   find -name '*.gcda' -o -name '*.gcov' | xargs $(RM) -f
+   
+   $(LCOV) $(LCOV_CAPTURE_OPTS) -c -o dpkg_base.lcov -i
+   $(MAKE) -C lib/dpkg check
+   $(MAKE) -C src check
+   $(MAKE) -C utils check
+   $(LCOV) $(LCOV_CAPTURE_OPTS) -c -o dpkg_test.lcov
+   $(LCOV) $(LCOV_OPTS) -a dpkg_base.lcov -a dpkg_test.lcov \
+ -o dpkg_merge.lcov
+   $(LCOV) $(LCOV_OPTS) -r dpkg_merge.lcov '/usr/include/*' -o dpkg.lcov
+   $(LCOV_GENHTML) -q --legend --title "dpkg C code coverage" \
+ --html-prolog $(top_srcdir)/doc/lcov-prolog \
+ --html-epilog $(top_srcdir)/doc/lcov-epilog \
+ -o doc/coverage dpkg.lcov
+   
+   $(MAKE) -C scripts $@
+
+coverage-clean:
+   rm -rf doc/coverage/
+   find -name '*.gcno' -o -name '*.gcda' -o \
+-name '*.gcov' -o -name '*.lcov' | xargs rm -f
+else
+coverage:
+   @echo "Need to reconfigure with --enable-coverage"
+
+coverage-clean:
+endif
+
 .PHONY: update-po
 
 update-po:
@@ -102,3 +143,4 @@ dist-hook:
done ; \
fi
 
+clean-local: doc-clean coverage-clean
diff --git a/configure.ac b/configure.ac
index 6d79ae5..b741769 100644
--- a/configure.ac
+++ b/configure.ac
@@ -91,6 +91,7 @@ AC_CHECK_PROG([HAVE_DOT], [dot], [YES], [NO])
 DPKG_PROG_PO4A
 DPKG_PROG_PERL
 DPKG_PROG_POD2MAN
+DPKG_CODE_COVERAGE
 
 # Checks for operating system services and capabilities.
 AC_SYS_LARGEFILE
diff --git a/doc/.gitignore b/doc/.gitignore
index acdcabb..5211926 100644
--- a/doc/.gitignore
+++ b/doc/.gitignore
@@ -1,2 +1,3 @@
 Doxyfile
 html
+coverage
diff --git a/doc/lcov-epilog b/doc/lcov-epilog
new file mode 100644
index 000..8bc660c
--- /dev/null
+++ b/doc/lcov-epilog
@@ -0,0 +1,8 @@
+  
+
+  scripts
+
+  
+  
+
+
diff --git a/doc/lcov-prolog b/doc/lcov-prolog
new file mode 100644
index 000..49f2a4b
--- /dev/null
+++ b/doc/lcov-prolog
@@ -0,0 +1,8 @@
+
+
+
+  
+  @pagetitle@
+  
+
+
diff --git a/m4/dpkg-coverage.m4 b/m4/dpkg-coverage.m4
new file mode 100644
index 000..7a18795
--- /dev/null
+++ b/m4/dpkg-coverage.m4
@@ -0,0 +1,51 @@
+# Copyright © 2010 Guillem Jover 
+
+# DPKG_CODE_COVERAGE
+# --
+# Add configuration option to enable code coverage support.
+AC_DEFUN([DPKG_CODE_COVERAGE],
+[
+AC_ARG_ENABLE(coverage,
+   AS_HELP_STRING([--enable-coverage],
+  [whether to enable code coverage]),
+   [],
+   [enable_coverage=no])
+AM_CONDITIONAL(COVERAGE_ENABLED, test x$enable_coverage = xyes)
+
+if test "x$enable_coverage" = "xyes"; then
+   if test "x$GCC" = "xno"; then
+ AC_MSG_ERROR([not compiling with gcc, which is required for C coverage 
support])
+   fi
+
+   AC_CHECK_PROGS([GCOV], [gcov])
+   if test -z "$GCOV"; then
+ AC_MSG_ERROR([missing gcov, which is required for C coverage support])
+   fi
+
+   AC_CHECK_PROGS([LCOV], [lcov])
+   if test -z "

[SCM] dpkg's main repository branch, master, updated. 1.15.7.2-166-g4b3828b

2010-07-16 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 577ab5dd513beb641f1d635d8ead681065254233
Author: Guillem Jover 
Date:   Sat Jul 10 13:54:28 2010 +0200

build: Move dpkg_divert test case from scripts to src

diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index bd8d40f..1661460 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -180,8 +180,7 @@ test_cases = \
t/750_Dpkg_Substvars.t \
t/800_Dpkg_IPC.t \
t/850_Dpkg_Compression.t \
-   t/910_merge_changelogs.t \
-   t/950_dpkg_divert.t
+   t/910_merge_changelogs.t
 
 check_DATA = \
$(test_tmpdir)/200_Dpkg_Shlibs/objdump.basictags-amd64 \
diff --git a/src/.gitignore b/src/.gitignore
index 1602cb9..f406f28 100644
--- a/src/.gitignore
+++ b/src/.gitignore
@@ -3,3 +3,4 @@ dpkg-divert
 dpkg-query
 dpkg-statoverride
 dpkg-trigger
+t.tmp
diff --git a/src/Makefile.am b/src/Makefile.am
index 152cfb7..7c6b054 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -91,3 +91,14 @@ install-data-local:
$(mkdir_p) $(DESTDIR)$(pkgconfdir)/dpkg.cfg.d
$(mkdir_p) $(DESTDIR)$(admindir)/info
$(mkdir_p) $(DESTDIR)$(admindir)/updates
+
+TEST_VERBOSE = 0
+
+test_tmpdir = t.tmp
+
+test_cases = \
+   t/100_dpkg_divert.t
+
+include $(top_srcdir)/Makecheck.am
+
+clean-local: check-clean
diff --git a/scripts/t/950_dpkg_divert.t b/src/t/100_dpkg_divert.t
similarity index 100%
rename from scripts/t/950_dpkg_divert.t
rename to src/t/100_dpkg_divert.t

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

2010-07-16 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 939778ab9b4147d42b7250fdb1be9c5fe79392b7
Author: Guillem Jover 
Date:   Sat Jul 10 13:21:02 2010 +0200

build: Refactor perl test-suite support into a new Makecheck.am file

diff --git a/Makecheck.am b/Makecheck.am
new file mode 100644
index 000..b88c1ea
--- /dev/null
+++ b/Makecheck.am
@@ -0,0 +1,21 @@
+# vim:set syn=automake:
+
+# Variables to be defined:
+#
+#  TEST_VERBOSE - set to 0 or 1 to control test suite verbosity
+#  TEST_ENV_VARS - environment variables to be set for the test suite
+#  test_tmpdir - test suite temporary directory
+#  test_cases - list of test case files
+#  test_data - list of test data files
+
+check-clean:
+   rm -fr $(test_tmpdir)
+
+check-local: $(test_data) $(test_cases)
+   $(mkdir_p) $(test_tmpdir)
+   
PATH="$(top_builddir)/src:$(top_builddir)/scripts:$(top_builddir)/utils:$(PATH)"
 \
+ srcdir=$(srcdir) builddir=$(builddir) \
+ PERL5LIB=$(top_srcdir)/scripts PERL_DL_NONLAZY=1 \
+ $(PERL) -I$(top_srcdir)/scripts \
+   -MExtUtils::Command::MM -e "test_harness($(TEST_VERBOSE), '.')" \
+   $(addprefix $(srcdir)/,$(test_cases))
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 4fa25d3..bd8d40f 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -160,6 +160,9 @@ if BUILD_POD_DOC
 endif
 
 TEST_VERBOSE= 0
+TEST_ENV_VARS = \
+   DPKG_DATADIR=$(srcdir)/.. \
+   DPKG_ORIGINS_DIR=$(srcdir)/t/origins
 
 test_tmpdir = t.tmp
 
@@ -225,20 +228,6 @@ test_data = \
t/origins/default \
t/origins/ubuntu
 
-clean-local:
-   rm -fr man
-   rm -fr $(test_tmpdir)
-
-check-local: $(test_data) $(test_cases)
-   $(mkdir_p) $(test_tmpdir)
-   PATH="$(top_builddir)/src:$(top_builddir)/scripts:$(PATH)" \
- srcdir=$(srcdir) DPKG_DATADIR=$(srcdir)/.. \
- DPKG_ORIGINS_DIR=$(srcdir)/t/origins \
- PERL5LIB=$(srcdir) PERL_DL_NONLAZY=1 \
- $(PERL) -I$(srcdir) -MExtUtils::Command::MM \
- -e "test_harness($(TEST_VERBOSE), '.')" \
- $(addprefix $(srcdir)/,$(test_cases))
-
 objdump_lib_name = lib`basename $...@`.so
 $(test_tmpdir)/200_Dpkg_Shlibs/objdump.basictags-amd64 
$(test_tmpdir)/200_Dpkg_Shlibs/objdump.basictags-i386: 
$(srcdir)/t/200_Dpkg_Shlibs/basictags.c
$(mkdir_p) $(test_tmpdir)/200_Dpkg_Shlibs
@@ -256,3 +245,8 @@ $(test_tmpdir)/200_Dpkg_Shlibs/objdump.patterns: 
$(srcdir)/t/200_Dpkg_Shlibs/pat
objdump -w -f -p -T -R $(objdump_lib_name) | \
  sed "s/$(objdump_lib_name)/libpatterns.so.1/g" > $@
rm -f $(objdump_lib_name)
+
+include $(top_srcdir)/Makecheck.am
+
+clean-local: check-clean
+   rm -fr man
diff --git a/utils/Makefile.am b/utils/Makefile.am
index 9e66119..403ac3a 100644
--- a/utils/Makefile.am
+++ b/utils/Makefile.am
@@ -66,18 +66,12 @@ if WITH_INSTALL_INFO
 endif
 
 TEST_VERBOSE = 0
+TEST_ENV_VARS = DPKG_DATADIR=$(top_srcdir)
+
 test_tmpdir = t.tmp
 test_cases = \
t/100_update_alternatives.t
 
-clean-local:
-   rm -fr $(test_tmpdir)
-
-check-local: $(test_cases)
-   $(mkdir_p) $(test_tmpdir)
-   
PATH="$(top_builddir)/src:$(top_builddir)/scripts:$(top_builddir)/utils:$(PATH)"
 \
- srcdir=$(srcdir) builddir=$(builddir) DPKG_DATADIR=$(top_srcdir) \
- PERL5LIB=$(top_srcdir)/scripts \
- $(PERL) -MExtUtils::Command::MM \
- -e "test_harness($(TEST_VERBOSE), '.')" \
- $(addprefix $(srcdir)/,$(test_cases))
+include $(top_srcdir)/Makecheck.am
+
+clean-local: check-clean

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

2010-07-16 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 81839b6215eebaef7eac25c9b3811a057c8f41a8
Author: Guillem Jover 
Date:   Sat Jul 10 10:07:05 2010 +0200

build: Fix 'make check' when libdpkg has not been built yet

Force the subdirectory build order, so that lib/dpkg gets built before
lib/dpkg/test, making the former always available for the latter.

diff --git a/lib/dpkg/Makefile.am b/lib/dpkg/Makefile.am
index 76908ec..d41c104 100644
--- a/lib/dpkg/Makefile.am
+++ b/lib/dpkg/Makefile.am
@@ -1,6 +1,6 @@
 ## Process this file with automake to produce Makefile.in
 
-SUBDIRS = test
+SUBDIRS = . test
 
 localedir = $(datadir)/locale
 pkgconfdir = $(sysconfdir)/@PACKAGE@

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

2010-07-16 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 1ccdb04d4b3d732c01e73607fc237aa0d46237e3
Author: Guillem Jover 
Date:   Sun Jul 11 11:26:20 2010 +0200

libdpkg: Fix command_add_argv doxygen comment to match param name

diff --git a/lib/dpkg/command.c b/lib/dpkg/command.c
index 3cb6086..f98a0ee 100644
--- a/lib/dpkg/command.c
+++ b/lib/dpkg/command.c
@@ -126,7 +126,7 @@ command_add_argl(struct command *cmd, const char **argv)
  * Append a va_list of argument to the command's argv.
  *
  * @param cmd The command structure to act on.
- * @param al The NULL terminated va_list of argument array to append to argv.
+ * @param args The NULL terminated va_list of argument array to append to argv.
  */
 void
 command_add_argv(struct command *cmd, va_list args)

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

2010-07-16 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 20f0d638fee7d1c383ee9e1a83e2a7ddabc065b5
Author: Guillem Jover 
Date:   Sat Jul 10 09:13:50 2010 +0200

build: Rename overriding check targets to check-local

This allows to have the local targets and be able to use the native
automake targets in the future.

diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 4589fa9..4fa25d3 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -229,7 +229,7 @@ clean-local:
rm -fr man
rm -fr $(test_tmpdir)
 
-check: $(test_data) $(test_cases)
+check-local: $(test_data) $(test_cases)
$(mkdir_p) $(test_tmpdir)
PATH="$(top_builddir)/src:$(top_builddir)/scripts:$(PATH)" \
  srcdir=$(srcdir) DPKG_DATADIR=$(srcdir)/.. \
diff --git a/utils/Makefile.am b/utils/Makefile.am
index a5ad101..9e66119 100644
--- a/utils/Makefile.am
+++ b/utils/Makefile.am
@@ -73,7 +73,7 @@ test_cases = \
 clean-local:
rm -fr $(test_tmpdir)
 
-check: $(test_cases)
+check-local: $(test_cases)
$(mkdir_p) $(test_tmpdir)

PATH="$(top_builddir)/src:$(top_builddir)/scripts:$(top_builddir)/utils:$(PATH)"
 \
  srcdir=$(srcdir) builddir=$(builddir) DPKG_DATADIR=$(top_srcdir) \

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

2010-07-16 Thread Guillem Jover
The following commit has been merged in the master branch:
commit 0535fac53f385a866946e978fd35a10185d162fc
Author: Guillem Jover 
Date:   Sat Jul 10 09:12:39 2010 +0200

build: Skip all dpkg-divert tests if the binary is not available

diff --git a/scripts/t/950_dpkg_divert.t b/scripts/t/950_dpkg_divert.t
index bff9e1e..8d7b58d 100644
--- a/scripts/t/950_dpkg_divert.t
+++ b/scripts/t/950_dpkg_divert.t
@@ -28,6 +28,11 @@ my $testdir = File::Spec->rel2abs("$tmpdir/testdir");
 
 my @dd = ("$builddir/../src/dpkg-divert");
 
+if (! -x "@dd") {
+plan skip_all => "dpkg-divert not available";
+exit(0);
+}
+
 plan tests => 235;
 
 sub cleanup {

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