Raphaël Hertzog лет назад: 16
Родитель
Сommit
b1acb6690d

+ 14 - 0
debian/changelog

@@ -58,6 +58,20 @@ dpkg (1.15.6) UNRELEASED; urgency=low
 
  -- Raphaël Hertzog <hertzog@debian.org>  Tue, 17 Nov 2009 17:24:47 +0100
 
+dpkg (1.15.5.6) unstable; urgency=low
+
+  * dpkg-source: with format "3.0 (quilt)" ensure quilt's .pc directory is
+    created before trying to register a new patch in .pc/applied-patches.
+    Thanks to Tommi Vainikainen <thv+debian@iki.fi> for the report and the
+    patch. Closes: #561237
+  * Fix dpkg-buildpackage to set "parallel=" in DEB_BUILD_OPTIONS instead of
+    the invalid "parallel=-1" when option "-j" is given. Closes: #562038
+  * Clarify how dpkg-source --print-format works and display messages on
+    STDERR when the requested format is discarded. Closes: #560391
+  * Add ${misc:Depends} in all Depends fields.
+
+ -- Raphael Hertzog <hertzog@debian.org>  Fri, 08 Jan 2010 17:57:43 +0100
+
 dpkg (1.15.5.5) unstable; urgency=low
 
   * Allow again new lines in dpkg-source and dpkg-genchanges on substvar and

+ 4 - 2
debian/control

@@ -18,6 +18,7 @@ Package: dpkg
 Architecture: any
 Essential: yes
 Pre-Depends: ${shlibs:Depends}, coreutils (>= 5.93-1), lzma
+Depends: ${misc:Depends}
 Conflicts: sysvinit (<< 2.82-1), dpkg-iasearch (<< 0.11),
  dpkg-dev (<< 1.14.16), apt (<< 0.7.7), aptitude (<< 0.4.7-1)
 Replaces: manpages-de (<= 0.4-3), manpages-pl (<= 20051117-1)
@@ -40,7 +41,8 @@ Section: utils
 Priority: optional
 Architecture: all
 Depends: dpkg (>= 1.15.4), perl5, perl-modules, bzip2, lzma, xz-utils,
- patch (>= 2.2-1), make, binutils, libtimedate-perl, base-files (>= 5.0.0)
+ patch (>= 2.2-1), make, binutils, libtimedate-perl,
+ base-files (>= 5.0.0), ${misc:Depends}
 Recommends: gcc | c-compiler, build-essential, fakeroot, gnupg, gpgv
 Suggests: debian-keyring, debian-maintainers
 Conflicts: dpkg-cross (<< 2.0.0), devscripts (<< 2.10.26)
@@ -55,7 +57,7 @@ Description: Debian package development tools
 Package: dselect
 Priority: optional
 Architecture: any
-Depends: ${shlibs:Depends}, dpkg (>= 1.13.1)
+Depends: ${shlibs:Depends}, dpkg (>= 1.13.1), ${misc:Depends}
 Suggests: perl
 Conflicts: dpkg-ftp, dpkg-multicd
 Replaces: dpkg (<< 1.10.3), dpkg-ftp, dpkg-multicd

+ 1 - 1
man/dpkg-shlibdeps.1

@@ -85,7 +85,7 @@ at the symbols). It's thus often stronger than really needed but very safe
 and easy to handle.
 .P
 The dependencies for a library are looked up in several places. The first
-file providing informations for the library of interest is used:  
+file providing information for the library of interest is used:
 .IP debian/shlibs.local
 Package-local overriding shared library dependency information.
 .IP /etc/dpkg/shlibs.override

+ 2 - 1
man/dpkg-source.1

@@ -67,7 +67,8 @@ source package formats.
 .RI "\fB\-\-print\-format\fP " directory
 Print the source format that would be used to build the source package if
 \fBdpkg\-source \-b \fIdirectory\fR was called (in the same conditions and
-with the same options).
+with the same parameters). In particular it's important that the upstream
+tarball (if any) can be found in the current directory.
 
 .TP
 .BR \-h ", " \-\-help

+ 1 - 1
man/po/de.po

@@ -9012,7 +9012,7 @@ msgstr ""
 #: dpkg-shlibdeps.1:89
 msgid ""
 "The dependencies for a library are looked up in several places. The first "
-"file providing informations for the library of interest is used:"
+"file providing information for the library of interest is used:"
 msgstr ""
 "Die Abhängigkeiten für eine Bibliothek wird an verschiedenen Stellen "
 "nachgeschlagen. Die erste Datei, die Informationen für die betrachtete "

+ 1 - 1
man/po/es.po

@@ -8533,7 +8533,7 @@ msgstr ""
 #: dpkg-shlibdeps.1:89
 msgid ""
 "The dependencies for a library are looked up in several places. The first "
-"file providing informations for the library of interest is used:"
+"file providing information for the library of interest is used:"
 msgstr ""
 
 #. type: IP

+ 1 - 1
man/po/fr.po

@@ -8921,7 +8921,7 @@ msgstr ""
 #: dpkg-shlibdeps.1:89
 msgid ""
 "The dependencies for a library are looked up in several places. The first "
-"file providing informations for the library of interest is used:"
+"file providing information for the library of interest is used:"
 msgstr ""
 "Les dépendances d'une bibliothèque sont recherchées à plusieurs endroits. Le "
 "premier fichier d'informations trouvé qui concerne la bibliothèque est "

+ 1 - 1
man/po/hu.po

@@ -7465,7 +7465,7 @@ msgstr ""
 #: dpkg-shlibdeps.1:89
 msgid ""
 "The dependencies for a library are looked up in several places. The first "
-"file providing informations for the library of interest is used:"
+"file providing information for the library of interest is used:"
 msgstr ""
 
 #. type: IP

+ 1 - 1
man/po/ja.po

@@ -8098,7 +8098,7 @@ msgstr ""
 #: dpkg-shlibdeps.1:89
 msgid ""
 "The dependencies for a library are looked up in several places. The first "
-"file providing informations for the library of interest is used:"
+"file providing information for the library of interest is used:"
 msgstr ""
 
 #. type: IP

+ 1 - 1
man/po/pl.po

@@ -9016,7 +9016,7 @@ msgstr ""
 #: dpkg-shlibdeps.1:89
 msgid ""
 "The dependencies for a library are looked up in several places. The first "
-"file providing informations for the library of interest is used:"
+"file providing information for the library of interest is used:"
 msgstr ""
 "Zależności dla biblioteki są wyszukiwane w kilku miejscach. Używany jest "
 "pierwszy plik zawierający informacje dla danej biblioteki:"

+ 1 - 1
man/po/pt_BR.po

@@ -7612,7 +7612,7 @@ msgstr ""
 #: dpkg-shlibdeps.1:89
 msgid ""
 "The dependencies for a library are looked up in several places. The first "
-"file providing informations for the library of interest is used:"
+"file providing information for the library of interest is used:"
 msgstr ""
 
 #. type: IP

+ 1 - 1
man/po/ru.po

@@ -7746,7 +7746,7 @@ msgstr ""
 #: dpkg-shlibdeps.1:89
 msgid ""
 "The dependencies for a library are looked up in several places. The first "
-"file providing informations for the library of interest is used:"
+"file providing information for the library of interest is used:"
 msgstr ""
 
 #. type: IP

+ 1 - 1
man/po/sv.po

@@ -8700,7 +8700,7 @@ msgstr ""
 #: dpkg-shlibdeps.1:89
 msgid ""
 "The dependencies for a library are looked up in several places. The first "
-"file providing informations for the library of interest is used:"
+"file providing information for the library of interest is used:"
 msgstr ""
 "Beroenden för ett bibliotek slås upp på flera platser. Den första filen som "
 "innehåller information om det intressanta biblioteket används:"

+ 7 - 6
scripts/Dpkg/BuildOptions.pm

@@ -34,13 +34,14 @@ sub parse {
             next;
         }
 
-	my ($k, $v) = ($1, $3 || '');
+	my ($k, $v) = ($1, $3);
 
 	# Sanity checks
-	if ($k =~ /^(noopt|nostrip|nocheck)$/ && length($v)) {
-	    $v = '';
-	} elsif ($k eq 'parallel' && $v !~ /^-?\d+$/) {
-	    next;
+	if ($k =~ /^(noopt|nostrip|nocheck)$/ && defined($v)) {
+	    $v = undef;
+	} elsif ($k eq 'parallel')  {
+	    $v = "" if not defined($v);
+	    next if $v !~ /^\d*$/;
 	}
 
 	$opts{$k} = $v;
@@ -59,7 +60,7 @@ sub set {
         $new->{$k} = $v;
     }
 
-    my $env = join(" ", map { $new->{$_} ? $_ . "=" . $new->{$_} : $_ } sort keys %$new);
+    my $env = join(" ", map { defined($new->{$_}) ? $_ . "=" . $new->{$_} : $_ } sort keys %$new);
 
     $ENV{DEB_BUILD_OPTIONS} = $env;
     return $env;

+ 1 - 0
scripts/Dpkg/Source/Package/V3/quilt.pm

@@ -296,6 +296,7 @@ sub register_autopatch {
     my $patch = File::Spec->catfile($dir, "debian", "patches", $auto_patch);
 
     if (-e $patch) {
+        $self->create_quilt_db($dir);
         # Add auto_patch to series file
         if (not $has_patch) {
             add_line($series, $auto_patch);

+ 5 - 9
scripts/dpkg-buildpackage.pl

@@ -134,7 +134,7 @@ while (@ARGV) {
     } elsif (/^--admindir=(.*)$/) {
 	$admindir = $1;
     } elsif (/^-j(\d*)$/) {
-	$parallel = $1 || '-1';
+	$parallel = $1 || '';
     } elsif (/^-r(.*)$/) {
 	@rootcommand = split /\s+/, $1;
     } elsif (/^-p(.*)$/) {
@@ -256,19 +256,15 @@ if ($signcommand) {
 }
 
 my $build_opts = Dpkg::BuildOptions::parse();
-if ($parallel) {
-    $parallel = $build_opts->{parallel} if (defined $build_opts->{parallel});
+if (defined $parallel) {
+    $parallel = $build_opts->{parallel} if exists $build_opts->{parallel};
     $ENV{MAKEFLAGS} ||= '';
-    if ($parallel eq '-1') {
-	$ENV{MAKEFLAGS} .= " -j";
-    } else {
-	$ENV{MAKEFLAGS} .= " -j$parallel";
-    }
+    $ENV{MAKEFLAGS} .= " -j$parallel";
     $build_opts->{parallel} = $parallel;
     Dpkg::BuildOptions::set($build_opts);
 }
 
-my $default_flags = defined $build_opts->{noopt} ? "-g -O0" : "-g -O2";
+my $default_flags = exists $build_opts->{noopt} ? "-g -O0" : "-g -O2";
 my %flags = ( CPPFLAGS => '',
 	      CFLAGS   => $default_flags,
 	      CXXFLAGS => $default_flags,

+ 2 - 2
scripts/dpkg-source.pl

@@ -88,6 +88,7 @@ while (@ARGV && $ARGV[0] =~ m/^-/) {
         setopmode('-x');
     } elsif (m/^--print-format$/) {
 	setopmode('--print-format');
+	report_options(info_fh => \*STDERR); # Avoid clutter on STDOUT
     } else {
 	push @options, $_;
     }
@@ -306,8 +307,7 @@ if ($options{'opmode'} =~ /^(-b|--print-format)$/) {
         $srcpkg->upgrade_object_type(); # Fails if format is unsupported
         my ($res, $msg) = $srcpkg->can_build($dir);
         last if $res;
-        info(_g("source format `%s' discarded: %s"), $format, $msg)
-	    unless $options{'opmode'} eq "--print-format";
+        info(_g("source format `%s' discarded: %s"), $format, $msg);
     }
     if ($options{'opmode'} eq "--print-format") {
 	print $fields->{'Format'} . "\n";

+ 9 - 8
scripts/t/300_Dpkg_BuildOptions.t

@@ -33,15 +33,16 @@ $ENV{DEB_BUILD_OPTIONS} = 'noopt foonostripbar parallel=3 bazNOCHECK';
 my $dbo = Dpkg::BuildOptions::parse();
 
 my %dbo = (
-	   noopt => '',
-	   foonostripbar => '',
+	   noopt => undef,
+	   foonostripbar => undef,
 	   parallel => 3,
 	   );
 my %dbo2 = (
-	    no => '',
-	    opt => '',
-	    'no-strip' => '',
-	    nocheck => '',
+	    no => undef,
+	    opt => undef,
+	    'no-strip' => undef,
+	    nocheck => undef,
+	    parallel => '',
 	   );
 
 
@@ -52,7 +53,7 @@ $dbo = Dpkg::BuildOptions::parse('no opt no-strip parallel = 5 nocheck');
 is_deeply($dbo, \%dbo2, 'parse (param)');
 
 $dbo->{parallel} = 5;
-$dbo->{noopt} = '';
+$dbo->{noopt} = undef;
 
 my $env = Dpkg::BuildOptions::set($dbo, 1);
 
@@ -60,6 +61,6 @@ is($ENV{DEB_BUILD_OPTIONS}, $env, 'set (return value)');
 is_deeply(Dpkg::BuildOptions::parse(), $dbo, 'set (env)');
 
 $ENV{DEB_BUILD_OPTIONS} = 'foobar';
-$dbo = { noopt => '' };
+$dbo = { noopt => undef };
 $env = Dpkg::BuildOptions::set($dbo, 0);
 is($env, "foobar noopt", 'set (append)');