Christian Perrier лет назад: 17
Родитель
Сommit
1e93ee6fac

+ 0 - 1
TODO

@@ -42,7 +42,6 @@ ROADMAP
    - Refactor packageslump into generic code.
    - Refactor subprocess execution (argument building etc).
    - Replace raw write and read calls with safe variants (signals etc).
-   - Use MD5HASHLEN.
    - Fix compress_type being shadowed.
    - Fix stat variables being shadowed (bugs!!).
    - Make deb build version a version instead of doing checks over a string.

+ 2 - 3
configure.ac

@@ -1,13 +1,12 @@
 # Process this file with autoconf to produce a configure script.
 
-AC_PREREQ(2.59)
+AC_PREREQ(2.60)
 AC_INIT([dpkg], [1.15.4~], [debian-dpkg@lists.debian.org])
 AC_CONFIG_SRCDIR([lib/dpkg/dpkg.h])
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_AUX_DIR([config])
 
-AC_CANONICAL_SYSTEM
-AC_GNU_SOURCE
+AC_USE_SYSTEM_EXTENSIONS
 DPKG_ARCHITECTURE
 
 AM_INIT_AUTOMAKE([1.8 gnu nostdinc])

+ 24 - 22
cputable

@@ -12,26 +12,28 @@
 # targets in ‘dpkg-architecture’.
 # Column 3 is an extended regular expression used to match against the
 # CPU part of the output of the GNU config.guess script.
+# Column 4 is the size (in bits) of the integers/pointers
+# Column 5 is the endianness (byte ordering in numbers)
 #
-# <Debian name>	<GNU name>	<config.guess regex>
-i386		i486		(i[3456]86|pentium)
-ia64		ia64		ia64
-alpha		alpha		alpha.*
-amd64		x86_64		x86_64
-armeb		armeb		arm.*b
-arm		arm		arm.*
-avr32		avr32		avr32
-hppa		hppa		hppa.*
-m32r		m32r		m32r
-m68k		m68k		m68k
-mips		mips		mips(eb)?
-mipsel		mipsel		mipsel
-powerpc		powerpc		(powerpc|ppc)
-ppc64		powerpc64	(powerpc|ppc)64
-s390		s390		s390
-s390x		s390x		s390x
-sh3		sh3		sh3
-sh3eb		sh3eb		sh3eb
-sh4		sh4		sh4
-sh4eb		sh4eb		sh4eb
-sparc		sparc		sparc(64)?
+# <Debian name>	<GNU name>	<config.guess regex>	<Bits>	<Endianness>
+i386		i486		(i[3456]86|pentium)	32	little
+ia64		ia64		ia64			64	little
+alpha		alpha		alpha.*			64	little
+amd64		x86_64		x86_64			64	little
+armeb		armeb		arm.*b			32	big
+arm		arm		arm.*			32	little
+avr32		avr32		avr32			32	big
+hppa		hppa		hppa.*			32	big
+m32r		m32r		m32r			32	big
+m68k		m68k		m68k			32	big
+mips		mips		mips(eb)?		32	big
+mipsel		mipsel		mipsel			32	little
+powerpc		powerpc		(powerpc|ppc)		32	big
+ppc64		powerpc64	(powerpc|ppc)64		64	big
+s390		s390		s390			32	big
+s390x		s390x		s390x			64	big
+sh3		sh3		sh3			32	little
+sh3eb		sh3eb		sh3eb			32	big
+sh4		sh4		sh4			32	little
+sh4eb		sh4eb		sh4eb			32	big
+sparc		sparc		sparc			32	big

+ 32 - 2
debian/changelog

@@ -12,7 +12,7 @@ dpkg (1.15.4) UNRELEASED; urgency=low
     handled already by “dpkg-deb -I”.
   * Properly mark packages being purged for disappearance from the database.
     This will make the status database not be left behind with traces of old
-    not-installed packages.
+    not-installed packages. Closes: #472208
   * On parse mark not-installed leftover packages for automatic removal from
     the database on next dump. This obsoletes the --forget-old-unavail option,
     thus making it now a no-op. Closes: #33394, #429262
@@ -26,6 +26,11 @@ dpkg (1.15.4) UNRELEASED; urgency=low
   * Add uClibc Linux support to ostable and triplettable. Closes: #455501
   * Add uClinux support to ostable and triplettable.
     Thanks to Simon Richter <sjr@debian.org>.
+  * When aborting due to file conflicts print the version of the conflicted
+    package. Closes: #540019
+  * Remove double slash in database path visible to the user in some error
+    conditions.
+  * Stop macthing sparc64-*-* GNU triplets with sparc Debian architecture.
 
   [ Raphael Hertzog ]
   * Replace install-info by a wrapper around GNU's install-info. The wrapper
@@ -44,6 +49,31 @@ dpkg (1.15.4) UNRELEASED; urgency=low
     Closes: #537800
   * Fix update-alternatives to mention the correct slave link that can't
     be installed due to a conflicting file instead of quoting the master link.
+  * Add support for extra override file in dpkg-scanpackages. Thanks to Robert
+    Millan for the patch. Closes: #537559
+  * Add support for extra override file in dpkg-scansources.
+  * Document format of extra override file in a new manual page
+    deb-extra-override(5).
+  * Update sample in dpkg-gensymbols(1) to give an accurate listing of
+    64 bit arches. Thanks to Julien Cristau for the patch. Closes: #540382
+  * Create /etc/cron.daily/dpkg to handle the backup of
+    /var/lib/dpkg/status in /var/backups. This is taken out of the cron
+    package and need no conflicts/breaks as the code does nothing if
+    the current status file is already backupped. Thanks to Leo 'costela'
+    Antunes <costela@debian.org> for the patch. Closes: #541412
+  * Change behaviour of dpkg --merge-avail to not update a package's
+    information if the version provided is older than the one already listed
+    in the available file. Thanks to Ian Jackson
+    <ian@davenant.greenend.org.uk> for the patch. Closes: #496114
+  * dpkg-architecture can now export DEB_{HOST,BUILD}_ARCH_{BITS,ENDIAN}
+    (pointer size and endianness):
+    - cputable (in dpkg) modified to contain those information
+    - dpkg-dev depends on dpkg (>= 1.15.4) to ensure that we have an updated
+      cputable (and so that a versioned build-dependency on dpkg-dev is enough
+      to use this new feature)
+    Closes: #531307
+  * Split overly long Binary: field values over multiple lines. This is
+    allowed since policy 3.8.3. Closes: #494714
 
   [ Modestas Vainius ]
   * Provide a meaningful label for dpkg-gensymbols diff.
@@ -62,8 +92,8 @@ dpkg (1.15.4) UNRELEASED; urgency=low
   * Slovak (Ivan Masár). Closes: #537741
 
   [ Updated man page translations ]
-  * German (Helge Kreutzmann), proofreading by Jens Seidel.
   * French completed (Christian Perrier).
+  * German (Helge Kreutzmann), proofreading by Jens Seidel.
   * Swedish (Peter Krefting).
 
   [ Updated scripts translations ]

+ 1 - 1
debian/control

@@ -40,7 +40,7 @@ Package: dpkg-dev
 Section: utils
 Priority: optional
 Architecture: all
-Depends: dpkg (>= 1.14.6), perl5, perl-modules, bzip2, lzma,
+Depends: dpkg (>= 1.15.4), perl5, perl-modules, bzip2, lzma,
  patch (>= 2.2-1), make, binutils, libtimedate-perl
 Recommends: gcc | c-compiler, build-essential, fakeroot, gnupg, gpgv
 Suggests: debian-keyring, debian-maintainers

+ 10 - 0
debian/dpkg.cron.daily

@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# Backup the 7 last versions of dpkg's status file
+if cd /var/backups ; then
+    if ! cmp -s dpkg.status.0 /var/lib/dpkg/status ; then
+            cp -p /var/lib/dpkg/status dpkg.status
+            savelog -c 7 dpkg.status >/dev/null
+    fi
+fi
+

+ 2 - 1
debian/rules

@@ -84,6 +84,7 @@ binary-arch: install
 	dh_testdir -a
 	dh_testroot -a
 	dh_install --sourcedir=debian/tmp -a
+	dh_installcron -a
 	dh_installlogrotate -a
 
 	install -d debian/dpkg/sbin
@@ -107,7 +108,7 @@ binary-indep: install
 	dh_testdir -i
 	dh_testroot -i
 	dh_install --sourcedir=debian/tmp -i -XDpkg/Gettext.pm
-
+	dh_installcron -i
 	dh_installchangelogs -i ChangeLog*
 	dh_installdocs -i
 	dh_link -i

+ 1 - 1
dpkg-deb/Makefile.am

@@ -1,7 +1,7 @@
 ## Process this file with automake to produce Makefile.in
 
 localedir = $(datadir)/locale
-INCLUDES = \
+AM_CPPFLAGS = \
 	-DLOCALEDIR=\"$(localedir)\" \
 	-idirafter $(top_srcdir)/lib/compat \
 	-I$(top_builddir) \

+ 1 - 1
dpkg-split/Makefile.am

@@ -1,7 +1,7 @@
 ## Process this file with automake to produce Makefile.in
 
 localedir = $(datadir)/locale
-INCLUDES = \
+AM_CPPFLAGS = \
 	-DLOCALEDIR=\"$(localedir)\" \
 	-DADMINDIR=\"$(admindir)\" -DMKSPLITSCRIPT=\"$(pkglibdir)/mksplit\" \
 	-idirafter $(top_srcdir)/lib/compat \

+ 2 - 2
dpkg-split/info.c

@@ -125,8 +125,8 @@ struct partinfo *read_info(FILE *partfile, const char *fn, struct partinfo *ir)
   ir->package = nfstrsave(nextline(&rip, fn, _("package name")));
   ir->version = nfstrsave(nextline(&rip, fn, _("package version number")));
   ir->md5sum = nfstrsave(nextline(&rip, fn, _("package file MD5 checksum")));
-  if (strlen(ir->md5sum) != 32 ||
-      strspn(ir->md5sum,"0123456789abcdef") != 32)
+  if (strlen(ir->md5sum) != MD5HASHLEN ||
+      strspn(ir->md5sum, "0123456789abcdef") != MD5HASHLEN)
     ohshit(_("file `%.250s' is corrupt - bad MD5 checksum `%.250s'"),fn,ir->md5sum);
 
   ir->orglength = unsignedlong(nextline(&rip, fn, _("total length")), fn,

+ 7 - 5
dpkg-split/queue.c

@@ -52,12 +52,14 @@ static int decompose_filename(const char *filename, struct partqueue *pq) {
   const char *p;
   char *q;
 
-  if (strspn(filename,"0123456789abcdef") != 32 || filename[32] != '.') return 0;
-  q= nfmalloc(33);
-  memcpy(q, filename, 32);
-  q[32] = '\0';
+  if (strspn(filename, "0123456789abcdef") != MD5HASHLEN ||
+      filename[MD5HASHLEN] != '.')
+    return 0;
+  q = nfmalloc(MD5HASHLEN + 1);
+  memcpy(q, filename, MD5HASHLEN);
+  q[MD5HASHLEN] = '\0';
   pq->info.md5sum= q;
-  p= filename+33;
+  p = filename + MD5HASHLEN + 1;
   pq->info.maxpartlen= strtol(p,&q,16); if (q==p || *q++ != '.') return 0;
   p=q; pq->info.thispartn= (int)strtol(p,&q,16); if (q==p || *q++ != '.') return 0;
   p=q; pq->info.maxpartn= (int)strtol(p,&q,16); if (q==p || *q) return 0;

+ 2 - 2
dselect/Makefile.am

@@ -3,7 +3,7 @@
 SUBDIRS = methods po
 
 localedir = $(datadir)/locale
-INCLUDES = \
+AM_CPPFLAGS = \
 	-DLOCALEDIR=\"$(localedir)\" \
 	-DADMINDIR=\"$(admindir)\" -DLIBDIR=\"$(pkglibdir)\" \
 	-DLOCALLIBDIR=\"/usr/local/lib/dpkg\" \
@@ -51,7 +51,7 @@ CLEANFILES = curkeys.h
 curkeys.$(OBJEXT): curkeys.h
 curkeys.h: $(srcdir)/keyoverride $(srcdir)/mkcurkeys.pl
 	cursesfile=`echo '#include "dselect-curses.h"' | \
-		$(CPP) -I$(top_srcdir) -I$(srcdir) - | \
+		$(CPP) -I$(top_builddir) -I $(srcdir) - | \
 		grep 'curses.h' | head -n 1 | \
 		sed -e 's/^[^"]*"//; s/".*$$//'`; \
 	if [ "$$cursesfile" = "" ]; then \

+ 1 - 1
lib/compat/Makefile.am

@@ -1,6 +1,6 @@
 ## Process this file with automake to produce Makefile.in
 
-INCLUDES = \
+AM_CPPFLAGS = \
 	-idirafter $(top_srcdir)/lib/compat
 
 

+ 1 - 1
lib/dpkg/Makefile.am

@@ -4,7 +4,7 @@ SUBDIRS = test
 
 localedir = $(datadir)/locale
 pkgconfdir = $(sysconfdir)/@PACKAGE@
-INCLUDES = \
+AM_CPPFLAGS = \
 	-DLOCALEDIR=\"$(localedir)\" \
 	-DCONFIGDIR=\"$(pkgconfdir)\" \
 	-DCOPYINGFILE=\"$(datadir)/common-licenses/GPL-2\" \

+ 2 - 1
lib/dpkg/dpkg-db.h

@@ -338,7 +338,8 @@ enum parsedbflags {
   pdb_recordavailable   =001, /* Store in `available' in-core structures, not `status' */
   pdb_rejectstatus      =002, /* Throw up an error if `Status' encountered             */
   pdb_weakclassification=004, /* Ignore priority/section info if we already have any   */
-  pdb_ignorefiles       =010  /* Ignore files info if we already have them             */
+  pdb_ignorefiles       =010, /* Ignore files info if we already have them             */
+  pdb_ignoreolder       =020  /* Ignore packages with older versions already read      */
 };
 
 const char *illegal_packagename(const char *p, const char **ep);

+ 1 - 1
lib/dpkg/fields.c

@@ -53,7 +53,7 @@ convert_string(struct parsedb_state *ps, const char *what, int otherwise,
   if (!nvip->name) {
     if (otherwise != -1) return otherwise;
     parse_error(ps, pigp, _("`%.*s' is not allowed for %s"),
-                strnlen(startp, 50), startp, what);
+                (int)strnlen(startp, 50), startp, what);
   }
 
   ep = startp + nvip->length;

+ 1 - 1
lib/dpkg/mlib.c

@@ -154,7 +154,7 @@ off_t buffer_write(buffer_data_t data, void *buf, off_t length, const char *desc
 	  int i;
 	  unsigned char digest[16], *p = digest;
 	  struct buffer_write_md5ctx *ctx = (struct buffer_write_md5ctx *)data->data.ptr;
-	  unsigned char *hash = *ctx->hash = m_malloc(33);
+	  unsigned char *hash = *ctx->hash = m_malloc(MD5HASHLEN + 1);
 	  MD5Final(digest, &ctx->ctx);
 	  for (i = 0; i < 16; ++i) {
 	    sprintf((char *)hash, "%02x", *p++);

+ 5 - 0
lib/dpkg/parse.c

@@ -328,6 +328,11 @@ int parsedb(const char *filename, enum parsedbflags flags,
 
     pigp= findpackage(newpig.name);
     pifp= (flags & pdb_recordavailable) ? &pigp->available : &pigp->installed;
+
+    if ((flags & pdb_ignoreolder) &&
+	versioncompare(&newpifp->version, &pifp->version) < 0)
+      continue;
+
     if (!pifp->valid) blankpackageperfile(pifp);
 
     /* Copy the priority and section across, but don't overwrite existing

+ 1 - 1
lib/dpkg/test/Makefile.am

@@ -1,6 +1,6 @@
 ## Process this file with automake to produce Makefile.in
 
-INCLUDES = \
+AM_CPPFLAGS = \
 	-idirafter $(top_srcdir)/lib/compat \
 	-I$(top_builddir) \
 	-I$(top_srcdir)/lib

+ 9 - 9
m4/arch.m4

@@ -3,22 +3,22 @@
 # Use dpkg-architecture from the source tree to set sh_var using DEB_VAR for
 # the target architecture, to avoid duplicating its logic.
 AC_DEFUN([_DPKG_ARCHITECTURE], [
-AC_REQUIRE([AC_CANONICAL_SYSTEM])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
 $2=`cd $srcdir/scripts; \
-    PERL5LIB=$(pwd) ./dpkg-architecture.pl -t$target -q$1 2>/dev/null`
+    PERL5LIB=$(pwd) ./dpkg-architecture.pl -t$host -q$1 2>/dev/null`
 ])# _DPKG_ARCHITECURE
 
 # DPKG_CPU_TYPE
 # -------------
-# Parse the target cpu name and check it against the cputable to determine
+# Parse the host cpu name and check it against the cputable to determine
 # the Debian name for it.  Sets ARCHITECTURE_CPU.
 AC_DEFUN([DPKG_CPU_TYPE],
 [AC_MSG_CHECKING([dpkg cpu type])
 _DPKG_ARCHITECTURE([DEB_HOST_ARCH_CPU], [cpu_type])
 if test "x$cpu_type" = "x"; then
-	cpu_type=$target_cpu
+	cpu_type=$host_cpu
 	AC_MSG_RESULT([$cpu_type])
-	AC_MSG_WARN([$target_cpu not found in cputable])
+	AC_MSG_WARN([$host_cpu not found in cputable])
 else
 	AC_MSG_RESULT([$cpu_type])
 fi
@@ -28,15 +28,15 @@ AC_DEFINE_UNQUOTED(ARCHITECTURE_CPU, "${cpu_type}",
 
 # DPKG_OS_TYPE
 # ------------
-# Parse the target operating system name and check it against a list of
+# Parse the host operating system name and check it against a list of
 # special cases to determine what type it is.  Sets ARCHITECTURE_OS.
 AC_DEFUN([DPKG_OS_TYPE],
 [AC_MSG_CHECKING([dpkg operating system type])
 _DPKG_ARCHITECTURE([DEB_HOST_ARCH_OS], [os_type])
 if test "x$os_type" = "x"; then
-	os_type=$target_os
+	os_type=$host_os
 	AC_MSG_RESULT([$os_type])
-	AC_MSG_WARN([$target_os not found in ostable])
+	AC_MSG_WARN([$host_os not found in ostable])
 else
 	AC_MSG_RESULT([$os_type])
 fi
@@ -46,7 +46,7 @@ AC_DEFINE_UNQUOTED(ARCHITECTURE_OS, "${os_type}",
 
 # DPKG_ARCHITECTURE
 # ------------------------
-# Determine the Debian name for the target operating system,
+# Determine the Debian name for the host operating system,
 # sets ARCHITECTURE.
 AC_DEFUN([DPKG_ARCHITECTURE],
 [DPKG_CPU_TYPE

+ 8 - 7
m4/compiler.m4

@@ -35,9 +35,10 @@ fi])dnl
 # Check whether the C compiler supports __attribute__, defines HAVE_C_ATTRIBUTE
 AC_DEFUN([DPKG_C_ATTRIBUTE],
 [AC_CACHE_CHECK([whether compiler supports __attribute__], [dpkg_cv_attribute],
-[AC_TRY_COMPILE([],
-[extern int testfunction(int x) __attribute__((unused))
-],
+	[AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+		[[]],
+		[[extern int testfunction(int x) __attribute__((unused))]]
+	)],
 	[dpkg_cv_attribute=yes],
 	[dpkg_cv_attribute=no])])
 AS_IF([test "x$dpkg_cv_attribute" = "xyes"],
@@ -50,7 +51,7 @@ AS_IF([test "x$dpkg_cv_attribute" = "xyes"],
 # ------------------------------------------------------
 # Try compiling some C99 code to see whether it works
 AC_DEFUN([DPKG_TRY_C99],
-[AC_TRY_COMPILE([
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include <stdio.h>
 #include <stdbool.h>
 #include <inttypes.h>
@@ -58,8 +59,8 @@ AC_DEFUN([DPKG_TRY_C99],
 
 /* Variadic macro arguments */
 #define variadic_macro(foo, ...) printf(foo, __VA_ARGS__)
-],
-[
+]],
+[[
 	/* Compound initialisers */
 	struct { int a, b; } foo = { .a = 1, .b = 2 };
 
@@ -75,7 +76,7 @@ AC_DEFUN([DPKG_TRY_C99],
 
 	/* Magic __func__ variable */
 	printf("%s", __func__);
-], [$1], [$2])dnl
+]])], [$1], [$2])dnl
 ])# DPKG_TRY_C99
 
 # DPKG_C_C99

+ 9 - 8
m4/funcs.m4

@@ -5,26 +5,27 @@
 # Define HAVE_VA_COPY if we have va_copy, fail if they can't be assigned
 AC_DEFUN([DPKG_FUNC_VA_COPY],
 [AC_CACHE_CHECK([for va_copy], [dpkg_cv_va_copy],
-[AC_TRY_RUN(
-[#include <stdarg.h>
+	[AC_RUN_IFELSE([AC_LANG_SOURCE(
+[[#include <stdarg.h>
 main() {
 va_list v1, v2;
 va_copy (v1, v2);
 exit (0);
-}],
+}
+	]])],
 	[dpkg_cv_va_copy=yes],
+	[dpkg_cv_va_copy=no],
 	[dpkg_cv_va_copy=no])])
 AS_IF([test "x$dpkg_cv_va_copy" = "xyes"],
 	[AC_DEFINE([HAVE_VA_COPY], 1,
 		  [Define to 1 if the `va_copy' macro exists])],
 	[AC_CACHE_CHECK([for va_list assignment by copy],
 		       [dpkg_cv_va_list_copy],
-[AC_TRY_COMPILE(
-[#include <stdarg.h>
-],
-[va_list v1, v2;
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+[[#include <stdarg.h>]],
+[[va_list v1, v2;
 v1 = v2;
-],
+]])],
 		       [dpkg_cv_va_list_copy=yes],
 		       [dpkg_cv_va_list_copy=no])])])
 ])# DPKG_FUNC_VA_COPY

+ 2 - 5
m4/types.m4

@@ -26,11 +26,8 @@ AC_CHECK_DECLS([sys_siglist],,,
 # Defines HAVE_DEFINE to 1 if declared in HEADER, 0 otherwise
 AC_DEFUN([DPKG_CHECK_DEFINE],
 [AC_CACHE_CHECK([whether $1 is defined in $2], [dpkg_cv_define_$1],
-[AC_TRY_COMPILE(
-[#include <$2>
-],
-[int i = $1;
-],
+[AC_COMPILE_IFELSE(
+	[AC_LANG_PROGRAM([[#include <$2>]], [[int i = $1;]])],
 	[dpkg_cv_define_$1=yes],
 	[dpkg_cv_define_$1=no])])
 AS_IF([test "x$dpkg_cv_define" = "xyes"],

+ 1 - 0
man/Makefile.am

@@ -79,6 +79,7 @@ dist_man_MANS = \
 	deb-triggers.5 \
 	deb-old.5 \
 	deb-override.5 \
+	deb-extra-override.5 \
 	deb.5 \
 	dpkg-architecture.1 \
 	dpkg-buildpackage.1 \

+ 40 - 0
man/deb-extra-override.5

@@ -0,0 +1,40 @@
+.TH deb\-extra\-override 5 "2009-08-16" "Debian Project" "dpkg utilities"
+.SH NAME
+deb\-extra\-override \- Debian archive extra override file
+.
+.SH SYNOPSIS
+override
+.
+.SH DESCRIPTION
+While most information about a binary/source package can be found in the
+control/.dsc file, all of it can be overriden when it's exported to
+Packages/Sources files. The extra override file contains those overrides.
+.PP
+The extra override file has a simple whitespace-delimited format. Comments are
+allowed (denoted with a
+.BR # ).
+.PP
+.in +5
+.I package
+.I field\-name
+.I value
+.in -5
+.PP
+.I package
+is the name of the binary/source package.
+.PP
+.I field\-name
+is the name of the field that is overriden.
+.I value
+is the value to put in the field. It can contain spaces as the line is split
+in no more than 3 columns when it's parsed.
+.PP
+The extra override files used to make the official Packages lists may be found
+in the
+.I indices
+directory on any Debian mirror.
+.
+.SH SEE ALSO
+.BR dpkg\-scanpackages (1),
+.BR dpkg\-scansources (1),
+.BR apt\-ftparchive (1).

+ 16 - 5
man/dpkg-architecture.1

@@ -105,6 +105,10 @@ The Debian architecture of the build machine.
 The Debian system name of the build machine.
 .IP "\s-1DEB_BUILD_ARCH_CPU\s0" 4
 The Debian cpu name of the build machine.
+.IP "\s-1DEB_BUILD_ARCH_BITS\s0" 4
+The pointer size of the build machine (in bits).
+.IP "\s-1DEB_BUILD_ARCH_ENDIAN\s0" 4
+The endianness of the build machine (little / big).
 .IP "\s-1DEB_BUILD_GNU_TYPE\s0" 4
 The \s-1GNU\s0 system type of the build machine.
 .IP "\s-1DEB_BUILD_GNU_CPU\s0" 4
@@ -117,6 +121,10 @@ The Debian architecture of the host machine.
 The Debian system name of the host machine.
 .IP "\s-1DEB_HOST_ARCH_CPU\s0" 4
 The Debian cpu name of the host machine.
+.IP "\s-1DEB_BUILD_ARCH_BITS\s0" 4
+The pointer size of the host machine (in bits).
+.IP "\s-1DEB_BUILD_ARCH_ENDIAN\s0" 4
+The endianness of the host machine (little / big).
 .IP "\s-1DEB_HOST_GNU_TYPE\s0" 4
 The \s-1GNU\s0 system type of the host machine.
 .IP "\s-1DEB_HOST_GNU_CPU\s0" 4
@@ -179,11 +187,14 @@ Especially the \-\-print\-architecture option is unreliable since we have
 Debian architectures which don't equal a processor name.
 .
 .SH "BACKWARD COMPATIBILITY"
-The DEB_HOST_ARCH_CPU and DEB_HOST_ARCH_OS variables were only introduced
-in relatively recent versions of \fBdpkg\-architecture\fR (since dpkg 1.13.2),
-before this \fIdebian/rules\fR files tended to check the values of the
-DEB_HOST_GNU_CPU or DEB_HOST_GNU_TYPE variables which have been subject
-to change.
+The DEB_*_ARCH_BITS and DEB_*_ARCH_ENDIAN variables were introduced
+in dpkg-dev 1.15.4. Using them in \fIdebian/rules\fR thus requires a
+build-dependency on dpkg-dev (>= 1.15.4).
+.PP
+The DEB_HOST_ARCH_CPU and DEB_HOST_ARCH_OS variables were introduced
+in dpkg-dev 1.13.2. Before this \fIdebian/rules\fR files tended to check
+the values of the DEB_HOST_GNU_CPU or DEB_HOST_GNU_TYPE variables which
+have been subject to change.
 .PP
 Where \fIdebian/rules\fR files check these variables to decide how or what
 to compile, this should be updated to use the new variables and values.

+ 3 - 3
man/dpkg-gensymbols.1

@@ -144,10 +144,10 @@ in template mode.
 The format of \fIarchitecture list\fR is the same as the one used in the
 \fIBuild-Depends\fR field of \fIdebian/control\fR (except the enclosing
 square brackets []). For example, the first symbol from the list below
-will be considered only on alpha, amd64 and ia64 architectures while the
-second one anywhere except on armel.
+will be considered only on alpha, amd64, kfreebsd-amd64 and ia64 architectures
+while the second one anywhere except on armel.
 
- (arch=alpha amd64 ia64)a_64bit_specific_symbol@Base 1.0
+ (arch=alpha amd64 kfreebsd-amd64 ia64)a_64bit_specific_symbol@Base 1.0
  (arch=!armel)symbol_armel_does_not_have@Base 1.0
 .TP
 .B ignore\-blacklist

+ 8 - 1
man/dpkg-scanpackages.1

@@ -60,7 +60,8 @@ this string.
 .PP
 .I overridefile
 is the name of a file to read which contains information about how the
-package fits into the distribution; see below.
+package fits into the distribution; see
+.BR deb\-override (5).
 .PP
 .I pathprefix
 is an optional string to be prepended to the Filename fields.
@@ -77,6 +78,11 @@ Scan for *.\fItype\fP packages, instead of *.deb.
 .BR \-u ", " \-\-udeb
 \fBObsolete\fP alias for \fB-tudeb\fP.
 .TP
+.BR \-e ", " \-\-extra\-override " \fIfile\fP"
+Scan \fIfile\fP to find supplementary overrides. See
+.BR deb\-extra\-override (5)
+for more information on its format.
+.TP
 .BR \-a ", " \-\-arch " \fIarch\fP"
 Use a pattern consisting of \fI*_all.deb\fP and \fI*_arch.deb\fP instead of
 scanning for all debs,
@@ -101,4 +107,5 @@ maintainer substitutions which do not take effect.
 .BR dpkg (1),
 .BR dselect (1),
 .BR deb\-override (5),
+.BR deb\-extra\-override (5),
 .BR dpkg\-scansources (1).

+ 6 - 0
man/dpkg-scansources.1

@@ -46,6 +46,11 @@ sources).
 .IP "\fB\-n\fR, \fB\-\-no\-sort\fR" 4
 Don't sort the index records. Normally they are sorted by source package
 name.
+.TP
+.IP "\fB\-e\fR, \fB\-\-extra\-override\fR \fIfile\fP" 4
+Scan \fIfile\fP to find supplementary overrides. See
+.BR deb\-extra\-override (5)
+for more information on its format.
 .IP "\fB\-s\fR, \fB\-\-source\-override\fR \fIfile\fR" 4
 Use \fIfile\fR as the source override file. The default is the name of the
 override file you specified with \fI.src\fR appended.
@@ -64,6 +69,7 @@ Show the version and exit.
 .
 .SH "SEE ALSO"
 .BR deb\-override (5),
+.BR deb\-extra\-override (5),
 .BR dpkg\-scanpackages (1).
 .
 .SH AUTHOR

+ 3 - 0
man/dpkg.1

@@ -577,6 +577,9 @@ Statuses of available packages. This file contains information about
 whether a package is marked for removing or not, whether it is
 installed or not, etc. See section \fBINFORMATION ABOUT PACKAGES\fP
 for more info.
+
+The status file is backed up daily in \fI/var/backups\fP. It can be
+useful if it's lost or corrupted due to filesystems troubles.
 .P
 The following files are components of a binary package. See \fBdeb\fP(5)
 for more information about them:

+ 74 - 4
man/po/de.po

@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: dpkg man pages\n"
 "POT-Creation-Date: 2009-07-21 18:52+0300\n"
-"PO-Revision-Date: 2009-07-30 18:37+0200\n"
+"PO-Revision-Date: 2009-08-16 09:28+0200\n"
 "Last-Translator: Helge Kreutzmann <debian@helgefjell.de>\n"
 "Language-Team: de <debian-l10n-german@lists.debian.org>\n"
 "MIME-Version: 1.0\n"
@@ -3827,6 +3827,16 @@ msgstr ""
 "oder nicht usw. Lesen Sie den Abschnitt B<INFORMATIONEN ÜBER PAKETE> für "
 "weitere Informationen."
 
+# type: Plain text
+#: ../../man/dpkg.1:583
+msgid ""
+"The status file is backed up daily in I</var/backups>. It can be useful if "
+"it's lost or corrupted due to filesystems troubles."
+msgstr ""
+"Die Statusdatei wird täglich nach I</var/backups> gesichert. Dies kann "
+"hilfreich sein, falls sie aufgrund von Problemen mit dem Dateisystem "
+"verloren gegangen oder beschädigt worden ist."
+
 #. type: Plain text
 #: ../../man2/dpkg.1:583
 msgid ""
@@ -4461,6 +4471,24 @@ msgstr "\\s-1DEB_BUILD_ARCH_CPU\\s0"
 msgid "The Debian cpu name of the build machine."
 msgstr "Der Debian-CPU-Name der Baumaschine."
 
+#: ../../man/dpkg-architecture.1:108 ../../man/dpkg-architecture.1:124
+#, no-wrap
+msgid "\\s-1DEB_BUILD_ARCH_BITS\\s0"
+msgstr "\\s-1DEB_BUILD_ARCH_BITS\\s0"
+
+#: ../../man/dpkg-architecture.1:110
+msgid "The pointer size of the build machine (in bits)."
+msgstr "Die Zeigergröße der Baumaschine in Bits."
+
+#: ../../man/dpkg-architecture.1:110 ../../man/dpkg-architecture.1:126
+#, no-wrap
+msgid "\\s-1DEB_BUILD_ARCH_ENDIAN\\s0"
+msgstr "\\s-1DEB_BUILD_ARCH_ENDIAN\\s0"
+
+#: ../../man/dpkg-architecture.1:112
+msgid "The endianness of the build machine (little / big)."
+msgstr "Die Endianness der Baumaschine (little/big)."
+
 #. type: IP
 #: ../../man2/dpkg-architecture.1:108
 #, no-wrap
@@ -4527,6 +4555,14 @@ msgstr "\\s-1DEB_HOST_ARCH_CPU\\s0"
 msgid "The Debian cpu name of the host machine."
 msgstr "Der Debian-CPU-Name der Host-Maschine."
 
+#: ../../man/dpkg-architecture.1:126
+msgid "The pointer size of the host machine (in bits)."
+msgstr "Die Zeigergröße der Host-Maschine in Bits."
+
+#: ../../man/dpkg-architecture.1:128
+msgid "The endianness of the host machine (little / big)."
+msgstr "Die Endianness der Host-Maschine (little/big)."
+
 #. type: IP
 #: ../../man2/dpkg-architecture.1:120
 #, no-wrap
@@ -4686,6 +4722,28 @@ msgstr ""
 msgid "BACKWARD COMPATIBILITY"
 msgstr "RÜCKWÄRTSKOMPATIBILITÄT"
 
+# type: Plain text
+#: ../../man/dpkg-architecture.1:193
+msgid ""
+"The DEB_*_ARCH_BITS and DEB_*_ARCH_ENDIAN variables were introduced in dpkg-"
+"dev 1.15.4. Using them in I<debian/rules> thus requires a build-dependency "
+"on dpkg-dev (E<gt>= 1.15.4)."
+msgstr ""
+"Die Variablen DEB_*_ARCH_BITS und DEB_*_ARCH_ENDIAN wurden in dpkg-dev 1.15.4 ""eingeführt. Werden sie in I<debian/rules> verwandt, benötigen sie daher eine "
+"Bauabhängigkeit von dpkg-dev (E<gt>= 1.15.4)."
+
+#: ../../man/dpkg-architecture.1:198
+msgid ""
+"The DEB_HOST_ARCH_CPU and DEB_HOST_ARCH_OS variables were introduced in dpkg-"
+"dev 1.13.2. Before this I<debian/rules> files tended to check the values of "
+"the DEB_HOST_GNU_CPU or DEB_HOST_GNU_TYPE variables which have been subject "
+"to change."
+msgstr ""
+"Die DEB_HOST_ARCH_CPU- und DEB_HOST_ARCH_OS-Variablen wurden in dpkg-dev "
+"1.13.2 eingeführt. Vorher tendierten die I<debian/rules>-Dateien dazu, die "
+"Werte der DEB_HOST_GNU_CPU- oder DEB_HOST_GNU_TYPE-Variablen zu überprüfen, "
+"die aber Änderungen unterlagen."
+
 #. type: Plain text
 #: ../../man2/dpkg-architecture.1:187
 msgid ""
@@ -8261,10 +8319,11 @@ msgstr ""
 #: ../../man2/dpkg-scanpackages.1:64
 msgid ""
 "I<overridefile> is the name of a file to read which contains information "
-"about how the package fits into the distribution; see below."
+"about how the package fits into the distribution; see B<deb-override>(5)."
 msgstr ""
-"I<override-Datei> ist der Name der einzulesenden Datei, die Informationen "
-"darüber enthält, wie das Paket in die Distribution passt; siehe unten."
+"I<override-Datei> ist der Name einer einzulesenden Datei, die Informationen "
+"darüber enthält, wie das Paket in die Distribution passt; siehe "
+"B<deb-override>(5)."
 
 #. type: Plain text
 #: ../../man2/dpkg-scanpackages.1:67
@@ -8307,6 +8366,17 @@ msgstr "B<-u>, B<--udeb>"
 msgid "B<Obsolete> alias for B<-tudeb>."
 msgstr "B<Veralteter> Alias für B<-tudeb>."
 
+msgid "B<-e>, B<--extra-override> I<file>"
+msgstr "B<-e>, B<--extra-override> I<Datei>"
+
+msgid ""
+"Scan I<file> to find supplementary overrides. Each line contains 3 space "
+"separated fields: package name, field name to override, new field value."
+msgstr ""
+"Durchsuche I<Datei> um zusätzliche Overrides zu finden. Jede Zeile enthält "
+"drei durch Leerzeichen getrennte Felder: Paketname, zu überschreibender "
+"Feldname und neuer Feldwert."
+
 #. type: TP
 #: ../../man2/dpkg-scanpackages.1:79
 #, no-wrap

+ 2 - 2
man/po/fr.po

@@ -9,7 +9,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: dpkg man pages\n"
 "POT-Creation-Date: 2009-07-21 18:52+0300\n"
-"PO-Revision-Date: 2009-07-22 18:04+0200\n"
+"PO-Revision-Date: 2009-08-14 17:19+0200\n"
 "Last-Translator: Christian Perrier <bubulle@debian.org>\n"
 "Language-Team: French <debian-l10n-french@lists.debian.org>\n"
 "MIME-Version: 1.0\n"
@@ -5733,7 +5733,7 @@ msgid ""
 msgstr ""
 "Les drapeaux du préprocesseur qui sont passés au système de construction "
 "Debian peuvent être remplacés par ceux du paquet en construction si besoin "
-"( par défaut\\ : aucun). Cette macro est rarement utilisée (la plupart des "
+"(par défaut\\ : aucun). Cette macro est rarement utilisée (la plupart des "
 "systèmes de construction utilisent simplement B<CFLAGS> au lieu de "
 "B<CPPFLAGS>)."
 

+ 5 - 0
man/po/po4a.cfg

@@ -38,6 +38,11 @@
            add_$lang:$(srcdir)/po/$lang.add
 
 
+[type:man] $(srcdir)/deb-extra-override.5       \
+           $lang:$lang/deb-extra-override.5     \
+           add_$lang:$(srcdir)/po/$lang.add
+
+
 [type:man] $(srcdir)/deb-shlibs.5               \
            $lang:$lang/deb-shlibs.5             \
            add_$lang:$(srcdir)/po/$lang.add

+ 2 - 2
man/po/sv.po

@@ -6,7 +6,7 @@ msgstr ""
 "Project-Id-Version: dpkg man pages\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2009-07-21 18:52+0300\n"
-"PO-Revision-Date: 2009-08-03 20:22+0100\n"
+"PO-Revision-Date: 2009-08-07 13:49+0200\n"
 "Last-Translator: Peter Krefting <peterk@debian.org>\n"
 "Language-Team: Swedish <debian-l10n-swedish@lists.debian.org>\n"
 "MIME-Version: 1.0\n"
@@ -10770,7 +10770,7 @@ msgid ""
 "by their number by prepending the number with a `B<#>' (for example B<#0> or "
 "B<#65534>). The I<mode> needs to be specified in octal."
 msgstr ""
-"Lägg till en överstyrning för I<fil>. )<Fil> behöver inte existera när "
+"Lägg till en överstyrning för I<fil>. I<Fil> behöver inte existera när "
 "kommandot körs; överstyrningen kommer lagras och användas senare. Användare "
 "och grupper kan anges med namn (till exempel B<root> eller B<nobody>), eller "
 "med deras nummer med ett \"B<#>\" (till exempel B<#0> eller B<#65534>). "

+ 17 - 1
scripts/Dpkg/Arch.pm

@@ -7,6 +7,7 @@ use base qw(Exporter);
 our @EXPORT_OK = qw(get_raw_build_arch get_raw_host_arch
                     get_build_arch get_host_arch get_gcc_host_gnu_type
                     get_valid_arches debarch_eq debarch_is
+                    debarch_to_cpuattrs
                     debarch_to_gnutriplet gnutriplet_to_debarch
                     debtriplet_to_gnutriplet gnutriplet_to_debtriplet
                     debtriplet_to_debarch debarch_to_debtriplet);
@@ -18,6 +19,7 @@ use Dpkg::ErrorHandling;
 my (@cpu, @os);
 my (%cputable, %ostable);
 my (%cputable_re, %ostable_re);
+my (%cpubits, %cpuendian);
 
 my %debtriplet_to_debarch;
 my %debarch_to_debtriplet;
@@ -119,9 +121,11 @@ sub read_cputable
     open CPUTABLE, "$pkgdatadir/cputable"
 	or syserr(_g("unable to open cputable"));
     while (<CPUTABLE>) {
-	if (m/^(?!\#)(\S+)\s+(\S+)\s+(\S+)/) {
+	if (m/^(?!\#)(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)/) {
 	    $cputable{$1} = $2;
 	    $cputable_re{$1} = $3;
+	    $cpubits{$1} = $4;
+	    $cpuendian{$1} = $5;
 	    push @cpu, $1;
 	}
     }
@@ -287,6 +291,18 @@ sub debwildcard_to_debtriplet($)
     }
 }
 
+sub debarch_to_cpuattrs($)
+{
+    my ($arch) = @_;
+    my ($abi, $os, $cpu) = debarch_to_debtriplet($arch);
+
+    if (defined($cpu)) {
+        return ($cpubits{$cpu}, $cpuendian{$cpu});
+    } else {
+        return undef;
+    }
+}
+
 sub debarch_eq($$)
 {
     my ($a, $b) = @_;

+ 1 - 1
scripts/Makefile.am

@@ -172,7 +172,7 @@ check: $(TEST_FILES) $(wildcard $(srcdir)/t/200_Dpkg_Shlibs/ld.so.conf*) mkdir_t
 	cp -dRl $(srcdir)/t/200_Dpkg_Shlibs/ld.so.conf* t.tmp/
 	PATH="$(top_builddir)/src:$(top_builddir)/scripts:$(PATH)" srcdir=$(srcdir) PERL5LIB=$(srcdir) DPKG_DATADIR=$(srcdir)/.. PERL_DL_NONLAZY=1 $(PERL) -I$(srcdir) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE), '.')" $(TEST_FILES)
 
-objdump_lib_name = lib$(shell basename $@).so
+objdump_lib_name = lib`basename $@`.so
 $(srcdir)/t/200_Dpkg_Shlibs/objdump.tags-amd64 $(srcdir)/t/200_Dpkg_Shlibs/objdump.tags-i386: $(srcdir)/t/200_Dpkg_Shlibs/symboltags.c
 	$(CC) $(CFLAGS) -shared -fPIC -Wl,-soname -Wl,libsymboltags.so.1 $< \
 	  $(if $(findstring amd64,$@),-DAMD64,) -o $(objdump_lib_name)

+ 6 - 0
scripts/dpkg-architecture.pl

@@ -26,6 +26,7 @@ use Dpkg;
 use Dpkg::Gettext;
 use Dpkg::ErrorHandling;
 use Dpkg::Arch qw(get_raw_build_arch get_raw_host_arch get_gcc_host_gnu_type
+                  debarch_to_cpuattrs
                   get_valid_arches debarch_eq debarch_is debarch_to_debtriplet
                   debarch_to_gnutriplet gnutriplet_to_debarch);
 
@@ -125,8 +126,10 @@ while (@ARGV) {
 my %v;
 
 my @ordered = qw(DEB_BUILD_ARCH DEB_BUILD_ARCH_OS DEB_BUILD_ARCH_CPU
+                 DEB_BUILD_ARCH_BITS DEB_BUILD_ARCH_ENDIAN
                  DEB_BUILD_GNU_CPU DEB_BUILD_GNU_SYSTEM DEB_BUILD_GNU_TYPE
                  DEB_HOST_ARCH DEB_HOST_ARCH_OS DEB_HOST_ARCH_CPU
+                 DEB_HOST_ARCH_BITS DEB_HOST_ARCH_ENDIAN
                  DEB_HOST_GNU_CPU DEB_HOST_GNU_SYSTEM DEB_HOST_GNU_TYPE);
 
 $v{DEB_BUILD_ARCH} = get_raw_build_arch();
@@ -180,6 +183,9 @@ my $abi;
 ($v{DEB_HOST_GNU_CPU}, $v{DEB_HOST_GNU_SYSTEM}) = split(/-/, $v{DEB_HOST_GNU_TYPE}, 2);
 ($v{DEB_BUILD_GNU_CPU}, $v{DEB_BUILD_GNU_SYSTEM}) = split(/-/, $v{DEB_BUILD_GNU_TYPE}, 2);
 
+($v{DEB_HOST_ARCH_BITS}, $v{DEB_HOST_ARCH_ENDIAN}) = debarch_to_cpuattrs($v{DEB_HOST_ARCH});
+($v{DEB_BUILD_ARCH_BITS}, $v{DEB_BUILD_ARCH_ENDIAN}) = debarch_to_cpuattrs($v{DEB_BUILD_ARCH});
+
 for my $k (@ordered) {
     $v{$k} = $ENV{$k} if (defined ($ENV{$k}) && !$force);
 }

+ 2 - 0
scripts/dpkg-genchanges.pl

@@ -484,6 +484,8 @@ if (!defined($fields->{'Date'})) {
 }
 
 $fields->{'Binary'} = join(' ', map { $_->{'Package'} } $control->get_packages());
+# Avoid overly long line (>~1000 chars) by splitting over multiple lines
+$fields->{'Binary'} =~ s/(.{980,}?) /$1\n /g;
 
 unshift(@archvalues,'source') unless is_binaryonly;
 @archvalues = ('all') if $include == ARCH_INDEP;

+ 29 - 2
scripts/dpkg-scanpackages.pl

@@ -32,7 +32,7 @@ my @fieldpri = (qw(Package Package-Type Source Version Kernel-Version
                    Architecture Subarchitecture Essential Origin Bugs
                    Maintainer Installed-Size Installer-Menu-Item),
                 @pkg_dep_fields, qw(Filename Size), @sums,
-                qw(Section Priority Homepage Description Tag));
+                qw(Section Priority Homepage Description Tag Task));
 
 # This maps the fields into the proper case
 my %field_case;
@@ -46,11 +46,12 @@ my %options = (help            => sub { usage(); exit 0; },
 	       udeb            => \&set_type_udeb,
 	       arch            => undef,
 	       multiversion    => 0,
+	       'extra-override'=> undef,
 	      );
 
 my $result = GetOptions(\%options,
                         'help|h|?', 'version', 'type|t=s', 'udeb|u!',
-                        'arch|a=s', 'multiversion|m!');
+                        'arch|a=s', 'multiversion|m!', 'extra-override|e=s');
 
 sub version {
     printf _g("Debian %s version %s.\n"), $progname, $version;
@@ -66,6 +67,8 @@ Options:
   -u, --udeb               scan for udebs (obsolete alias for -tudeb).
   -a, --arch <arch>        architecture to scan for.
   -m, --multiversion       allow multiple versions of a single package.
+  -e, --extra-override <file>
+                           use extra override file.
   -h, --help               show this help message.
       --version            show the version.
 "), $progname;
@@ -124,6 +127,29 @@ sub load_override
     close($override_fh);
 }
 
+sub load_override_extra
+{
+    my $extra_override = shift;
+    my $override_fh = new IO::File $extra_override, 'r' or
+        syserr(_g("Couldn't open override file %s"), $extra_override);
+
+    while (<$override_fh>) {
+	s/\#.*//;
+	s/\s+$//;
+	next unless $_;
+
+	my ($p, $field, $value) = split(/\s+/, $_, 3);
+
+	next unless defined($packages{$p});
+
+	for my $package (@{$packages{$p}}) {
+	    $$package{$field} = $value;
+	}
+    }
+
+    close($override_fh);
+}
+
 usage() and exit 1 if not $result;
 
 if (not @ARGV >= 1 && @ARGV <= 3) {
@@ -232,6 +258,7 @@ FILE:
 close($find_h);
 
 load_override($override) if defined $override;
+load_override_extra($options{'extra-override'}) if defined $options{'extra-override'};
 
 my @missingover=();
 

+ 31 - 0
scripts/dpkg-scansources.pl

@@ -48,6 +48,7 @@ sub O_PRIORITY		() { 0 }
 sub O_SECTION		() { 1 }
 sub O_MAINT_FROM	() { 2 } # undef for non-specific, else listref
 sub O_MAINT_TO		() { 3 } # undef if there's no maint override
+my %Extra_Override;
 
 my %Priority = (
      'extra'		=> 1,
@@ -62,12 +63,14 @@ my %Priority = (
 my $Debug	= 0;
 my $No_sort	= 0;
 my $Src_override = undef;
+my $Extra_override_file = undef;
 
 my @Option_spec = (
     'debug!'		=> \$Debug,
     'help!'		=> \&usage,
     'no-sort|n'		=> \$No_sort,
     'source-override|s=s' => \$Src_override,
+    'extra-override|e=s' => \$Extra_override_file,
     'version'		=> \&version,
 );
 
@@ -86,6 +89,8 @@ sub usage {
 
 Options:
   -n, --no-sort            don't sort by package before outputting.
+  -e, --extra-override <file>
+                           use extra override file.
   -s, --source-override <file>
                            use file for additional source overrides, default
                            is regular override file with .src appended.
@@ -221,6 +226,23 @@ sub load_src_override {
     close SRC_OVERRIDE or syserr(_g("error closing source override file"));
 }
 
+sub load_override_extra
+{
+    my $extra_override = shift;
+    open(OVERRIDE, "<", $extra_override) or
+        syserr(_g("Couldn't open override file %s"), $extra_override);
+
+    while (<OVERRIDE>) {
+	s/\#.*//;
+	s/\s+$//;
+	next unless $_;
+
+	my ($p, $field, $value) = split(/\s+/, $_, 3);
+        $Extra_Override{$p}{$field} = $value;
+    }
+    close(OVERRIDE);
+}
+
 # Given PREFIX and DSC-FILE, process the file and returns the fields.
 
 sub process_dsc {
@@ -280,6 +302,14 @@ sub process_dsc {
         }
     }
 
+    # Process extra override
+    if (exists $Extra_Override{$source}) {
+        my ($field, $value);
+        while(($field, $value) = each %{$Extra_Override{$source}}) {
+            $fields->{$field} = $value;
+        }
+    }
+
     # A directory field will be inserted just before the files field.
     my $dir;
     $dir = ($file =~ s-(.*)/--) ? $1 : '';
@@ -323,6 +353,7 @@ sub main {
 
     load_override $override if defined $override;
     load_src_override $Src_override, $override;
+    load_extra_override $Extra_override_file if defined $Extra_override_file;
 
     open FIND, "find \Q$dir\E -follow -name '*.dsc' -print |"
 	or syserr(_g("can't fork"));

+ 2 - 0
scripts/dpkg-source.pl

@@ -245,6 +245,8 @@ if ($options{'opmode'} eq 'build') {
     }
     
     $fields->{'Binary'} = join(', ', @binarypackages);
+    # Avoid overly long line (>~1000 chars) by splitting over multiple lines
+    $fields->{'Binary'} =~ s/(.{980,}?), ?/$1,\n /g;
 
     # Generate list of formats to try
     my @try_formats = (@cmdline_formats);

+ 31 - 29
scripts/po/de.po

@@ -6,8 +6,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: dpkg scripts\n"
 "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n"
-"POT-Creation-Date: 2009-07-22 10:30+0200\n"
-"PO-Revision-Date: 2009-07-22 10:33+0200\n"
+"POT-Creation-Date: 2009-08-15 10:09+0200\n"
+"PO-Revision-Date: 2009-08-15 17:50+0200\n"
 "Last-Translator: Helge Kreutzmann <debian@helgefjell.de>\n"
 "Language-Team: de <debian-l10n-german@lists.debian.org>\n"
 "MIME-Version: 1.0\n"
@@ -19,7 +19,7 @@ msgstr ""
 #: scripts/dpkg-distaddfile.pl:18 scripts/dpkg-genchanges.pl:89
 #: scripts/dpkg-gencontrol.pl:45 scripts/dpkg-gensymbols.pl:32
 #: scripts/dpkg-name.pl:48 scripts/dpkg-parsechangelog.pl:19
-#: scripts/dpkg-scanpackages.pl:56 scripts/dpkg-scansources.pl:79
+#: scripts/dpkg-scanpackages.pl:57 scripts/dpkg-scansources.pl:79
 #: scripts/dpkg-shlibdeps.pl:502 scripts/dpkg-source.pl:348
 #: scripts/changelog/debian.pl:19
 #, perl-format
@@ -1108,7 +1108,7 @@ msgstr ""
 msgid "%s takes no non-option arguments"
 msgstr "%s akzeptiert kein nicht-Options-Argument"
 
-#: scripts/dpkg-scanpackages.pl:62
+#: scripts/dpkg-scanpackages.pl:63
 #, perl-format
 msgid ""
 "Usage: %s [<option> ...] <binarypath> [<overridefile> [<pathprefix>]] > "
@@ -1119,6 +1119,7 @@ msgid ""
 "  -u, --udeb               scan for udebs (obsolete alias for -tudeb).\n"
 "  -a, --arch <arch>        architecture to scan for.\n"
 "  -m, --multiversion       allow multiple versions of a single package.\n"
+"  -e, --extraoverride <file> extra override file.\n"
 "  -h, --help               show this help message.\n"
 "      --version            show the version.\n"
 msgstr ""
@@ -1128,62 +1129,63 @@ msgstr ""
 "Optionen:\n"
 "  -t, --type <Typ>         suche nach <Typ>-Paketen (standardmäßig »deb«).\n"
 "  -u, --udeb               suche nach udebs (veralteter Alias für -tudeb).\n"
-"  -a, --arch <Arch>        suche für Architektur <Arch>.\n"
+"  -a, --arch <Arch>        Architektur, nach der gesucht werden soll.\n"
 "  -m, --multiversion       erlaube mehrere Versionen eines einzelnen "
 "Pakets.\n"
+"  -e, --extraoverride <Datei> zusätzliche Override-Datei.\n"
 "  -h, --help               zeige diese Hilfemeldung.\n"
 "      --version            zeige die Version.\n"
 
-#: scripts/dpkg-scanpackages.pl:76
+#: scripts/dpkg-scanpackages.pl:78
 msgid "-u, --udeb option is deprecated (see README.feature-removal-schedule)"
 msgstr ""
 "Option -u, --udeb ist veraltet (lesen Sie README.feature-removal-schedule)"
 
-#: scripts/dpkg-scanpackages.pl:84
+#: scripts/dpkg-scanpackages.pl:86 scripts/dpkg-scanpackages.pl:132
 #, perl-format
 msgid "Couldn't open override file %s"
 msgstr "konnte override-Datei %s nicht öffnen"
 
-#: scripts/dpkg-scanpackages.pl:106
+#: scripts/dpkg-scanpackages.pl:108
 #, perl-format
 msgid "  %s (package says %s, not %s)"
 msgstr "  %s (laut Paket %s, nicht %s)"
 
-#: scripts/dpkg-scanpackages.pl:114
+#: scripts/dpkg-scanpackages.pl:116
 #, perl-format
 msgid "Unconditional maintainer override for %s"
 msgstr "Bedingungsloser Übersteuerung (»override«) des Betreuers für %s"
 
-#: scripts/dpkg-scanpackages.pl:130
+#: scripts/dpkg-scanpackages.pl:154
 msgid "1 to 3 args expected"
 msgstr "1 bis 3 Argumente erwartet"
 
-#: scripts/dpkg-scanpackages.pl:148
+#: scripts/dpkg-scanpackages.pl:172
 #, perl-format
 msgid "Binary dir %s not found"
 msgstr "Binärverzeichnis %s nicht gefunden"
 
-#: scripts/dpkg-scanpackages.pl:150
+#: scripts/dpkg-scanpackages.pl:174
 #, perl-format
 msgid "Override file %s not found"
 msgstr "Override-Datei %s nicht gefunden"
 
-#: scripts/dpkg-scanpackages.pl:164
+#: scripts/dpkg-scanpackages.pl:188
 #, perl-format
 msgid "Couldn't open %s for reading"
 msgstr "Konnte %s nicht zum Lesen öffnen"
 
-#: scripts/dpkg-scanpackages.pl:171
+#: scripts/dpkg-scanpackages.pl:195
 #, perl-format
 msgid "Couldn't call dpkg-deb on %s: %s, skipping package"
 msgstr "Konnte dpkg-deb auf %s nicht aufrufen: %s, überspringe Paket"
 
-#: scripts/dpkg-scanpackages.pl:176
+#: scripts/dpkg-scanpackages.pl:200
 #, perl-format
 msgid "`dpkg-deb -I %s control' exited with %d, skipping package"
 msgstr "»dpkg-deb -I %s control« beendete sich mit %d, überspringe Paket"
 
-#: scripts/dpkg-scanpackages.pl:190
+#: scripts/dpkg-scanpackages.pl:214
 #, perl-format
 msgid ""
 "Unprocessed text from %s control file; info:\n"
@@ -1192,61 +1194,61 @@ msgstr ""
 "Unbearbeiteter Text aus %s Steuerdatei; Information:\n"
 "%s / %s"
 
-#: scripts/dpkg-scanpackages.pl:194
+#: scripts/dpkg-scanpackages.pl:218
 #, perl-format
 msgid "No Package field in control file of %s"
 msgstr "Kein »Package«-Feld in Steuerdatei von %s"
 
-#: scripts/dpkg-scanpackages.pl:200
+#: scripts/dpkg-scanpackages.pl:224
 #, perl-format
 msgid "Package %s (filename %s) is repeat but newer version;"
 msgstr "Paket %s (Dateiname %s) ist wiederholt aber neuere Version;"
 
-#: scripts/dpkg-scanpackages.pl:202
+#: scripts/dpkg-scanpackages.pl:226
 #, perl-format
 msgid "used that one and ignored data from %s!"
 msgstr "verwendete dieses und ignorierte Daten aus %s!"
 
-#: scripts/dpkg-scanpackages.pl:206
+#: scripts/dpkg-scanpackages.pl:230
 #, perl-format
 msgid "Package %s (filename %s) is repeat;"
 msgstr "Paket %s (Dateiname %s) ist wiederholt;"
 
-#: scripts/dpkg-scanpackages.pl:207
+#: scripts/dpkg-scanpackages.pl:231
 #, perl-format
 msgid "ignored that one and using data from %s!"
 msgstr "ignorierte dieses und verwende Daten aus %s!"
 
-#: scripts/dpkg-scanpackages.pl:213
+#: scripts/dpkg-scanpackages.pl:237
 #, perl-format
 msgid "Package %s (filename %s) has Filename field!"
 msgstr "Paket %s (Dateiname %s) hat Feld Filename!"
 
-#: scripts/dpkg-scanpackages.pl:251
+#: scripts/dpkg-scanpackages.pl:276
 msgid "Failed when writing stdout"
 msgstr "Fehler beim Schreiben nach Stdout"
 
-#: scripts/dpkg-scanpackages.pl:254
+#: scripts/dpkg-scanpackages.pl:279
 msgid "Couldn't close stdout"
 msgstr "konnte Stdout nicht schließen"
 
-#: scripts/dpkg-scanpackages.pl:257
+#: scripts/dpkg-scanpackages.pl:282
 msgid "Packages in override file with incorrect old maintainer value:"
 msgstr "Pakete in Override-Datei mit ungültigem alten Betreuer-Wert:"
 
-#: scripts/dpkg-scanpackages.pl:261
+#: scripts/dpkg-scanpackages.pl:286
 msgid "Packages specifying same maintainer as override file:"
 msgstr "Pakete spezifizieren gleichen Betreuer wie Override-Datei:"
 
-#: scripts/dpkg-scanpackages.pl:265
+#: scripts/dpkg-scanpackages.pl:290
 msgid "Packages in archive but missing from override file:"
 msgstr "Pakete im Archiv, die aber in Override-Datei fehlen:"
 
-#: scripts/dpkg-scanpackages.pl:269
+#: scripts/dpkg-scanpackages.pl:294
 msgid "Packages in override file but not in archive:"
 msgstr "Pakete in Override-Datei aber nicht im Archiv:"
 
-#: scripts/dpkg-scanpackages.pl:273
+#: scripts/dpkg-scanpackages.pl:298
 #, perl-format
 msgid "Wrote %s entries to output Packages file."
 msgstr "%s Einträge in Ausgabe-Paketdatei geschrieben."

+ 1 - 1
scripts/update-alternatives.pl

@@ -258,7 +258,7 @@ if ($alternative->has_current_link()) {
     # Detect manually modified alternative, switch to manual
     if (not $alternative->has_choice($current_choice)) {
         if (not -e $current_choice) {
-            warning("%s is dangling, it will be updated with best choice.",
+            warning(_g("%s is dangling, it will be updated with best choice."),
                     "$altdir/" . $alternative->name());
             $alternative->set_status('auto');
         } elsif ($alternative->status() ne "manual") {

+ 1 - 1
src/Makefile.am

@@ -1,7 +1,7 @@
 ## Process this file with automake to produce Makefile.in
 
 localedir = $(datadir)/locale
-INCLUDES = \
+AM_CPPFLAGS = \
 	-DLOCALEDIR=\"$(localedir)\" \
 	-DADMINDIR=\"$(admindir)\" \
 	-idirafter $(top_srcdir)/lib/compat \

+ 11 - 5
src/archives.c

@@ -594,9 +594,12 @@ int tarobject(struct TarInfo *ti) {
 	  keepexisting = 1;
         } else {
           if (!statr && S_ISDIR(stab.st_mode)) {
-            forcibleerr(fc_overwritedir, _("trying to overwrite directory `%.250s' "
-                        "in package %.250s with nondirectory"),
-                        nifd->namenode->name,otherpkg->name);
+            forcibleerr(fc_overwritedir,
+                        _("trying to overwrite directory '%.250s' "
+                          "in package %.250s %.250s with nondirectory"),
+                        nifd->namenode->name, otherpkg->name,
+                        versiondescribe(&otherpkg->installed.version,
+                                        vdew_always));
           } else {
             /* WTA: At this point we are replacing something without a Replaces.
 	     * if the new object is a directory and the previous object does not
@@ -604,8 +607,11 @@ int tarobject(struct TarInfo *ti) {
 	     */
             if (! (statr && ti->Type==Directory))
               forcibleerr(fc_overwrite,
-                        _("trying to overwrite `%.250s', which is also in package %.250s"),
-                        nifd->namenode->name,otherpkg->name);
+                          _("trying to overwrite '%.250s', "
+                            "which is also in package %.250s %.250s"),
+                          nifd->namenode->name, otherpkg->name,
+                          versiondescribe(&otherpkg->installed.version,
+                                          vdew_always));
           }
         }
       }

+ 2 - 1
src/main.c

@@ -368,7 +368,8 @@ static void setforce(const struct cmdinfo *cip, const char *value) {
 	  if (fip->opt)
 	    *fip->opt= cip->arg;
       } else
-	badusage(_("unknown force/refuse option `%.*s'"), min(l, 250), value);
+	badusage(_("unknown force/refuse option `%.*s'"),
+	         (int)min(l, 250), value);
     } else {
       if (fip->opt)
 	*fip->opt= cip->arg;

+ 1 - 1
src/packages.c

@@ -169,7 +169,7 @@ void packages(const char *const *argv) {
 void process_queue(void) {
   struct pkginqueue *removeent, *rundown;
   struct pkginfo *volatile pkg;
-  enum action action_todo;
+  volatile enum action action_todo;
   jmp_buf ejbuf;
   enum istobes istobe= itb_normal;
   

+ 1 - 1
src/processarc.c

@@ -793,7 +793,7 @@ void process_archive(const char *filename) {
   debug(dbg_general, "process_archive updating info directory");
   varbufreset(&infofnvb);
   varbufaddstr(&infofnvb,admindir);
-  varbufaddstr(&infofnvb,"/" INFODIR "/");
+  varbufaddstr(&infofnvb, "/" INFODIR);
   infodirlen= infofnvb.used;
   varbufaddc(&infofnvb,0);
   dsd= opendir(infofnvb.buf);

+ 2 - 1
src/update.c

@@ -84,7 +84,8 @@ void updateavailable(const char *const *argv) {
     parsedb(vb.buf, pdb_recordavailable | pdb_rejectstatus, NULL, NULL, NULL);
 
   if (cipaction->arg != act_avclear)
-    count += parsedb(sourcefile, pdb_recordavailable | pdb_rejectstatus,
+    count += parsedb(sourcefile,
+		     pdb_recordavailable | pdb_rejectstatus | pdb_ignoreolder,
                      NULL, NULL, NULL);
 
   if (!f_noact) {

+ 1 - 1
utils/Makefile.am

@@ -1,7 +1,7 @@
 ## Process this file with automake to produce Makefile.in
 
 localedir = $(datadir)/locale
-INCLUDES = \
+AM_CPPFLAGS = \
 	-DLOCALEDIR=\"$(localedir)\" \
 	-idirafter $(top_srcdir)/lib/compat \
 	-I$(top_builddir) \