[buildd-tools-devel] Bug#588550: sbuild: Fails to build binNMUs for packages with urgency comments in changelogs

Michael Banck mbanck at debian.org
Fri Jul 16 18:41:52 UTC 2010


tags 588550 +patch
thanks

On Fri, Jul 09, 2010 at 04:20:42PM +0100, Adam D. Barratt wrote:
> The recently scheduled binNMUs of the "mandos" package failed due to a
> problem with the auto-generated binNMU changelog; from one of the logs:
> 
> parsechangelog/debian: warning:     debian/changelog(l1): unrecognised line
> LINE:  (1.0.14-1+b1) unstable; urgency=low
> parsechangelog/debian: error: Can't call method "as_string" on an
> undefined value at /usr/share/perl5/Dpkg/Changelog.pm line 250, <STDIN>
> line 8.
> 
> This appears to be due to line 830 of lib/Sbuild/Build.pm which does:
> 
> $firstline =~ /^(\S+)\s+\((\S+)\)\s+([^;]+)\s*;\s*urgency=(\S+)\s*$/;
> 
> The most recent header line from the mandos changelog is:
> 
> mandos (1.0.14-1) unstable; urgency=low (HIGH on mips and mipsel)
> 
> Although unusual, this form is permitted by section 5.6.17 of Policy.

I propose the attached patch, which ignores the rest of the line after
the urgency field; I can successfully binNMU mandos_1.0.14-1 with it.  I
will probably upload the fix by the rest of weekend, if I don't hear
complaints.


Michael
-------------- next part --------------
only in patch2:
unchanged:
--- sbuild-0.60.0.orig/debian/changelog
+++ sbuild-0.60.0/debian/changelog
@@ -1,3 +1,11 @@
+sbuild (0.60.0-2) UNRELEASED; urgency=low
+
+  * sbuild:
+    - disregard text after urgency field in the changelog, as further comments
+      are allowed by policy (Closes: #588550).
+
+ -- Michael Banck <mbanck at debian.org>  Fri, 16 Jul 2010 20:31:21 +0200
+
 sbuild (0.60.0-1) unstable; urgency=low
 
   * debian/control:
only in patch2:
unchanged:
--- sbuild-0.60.0.orig/lib/Sbuild/Build.pm
+++ sbuild-0.60.0/lib/Sbuild/Build.pm
@@ -827,7 +827,7 @@
 	    $firstline = <F> while $firstline =~ /^$/;
 	    { local($/); undef $/; $text = <F>; }
 	    close( F );
-	    $firstline =~ /^(\S+)\s+\((\S+)\)\s+([^;]+)\s*;\s*urgency=(\S+)\s*$/;
+	    $firstline =~ /^(\S+)\s+\((\S+)\)\s+([^;]+)\s*;\s*urgency=(\S+).*$/;
 	    my ($name, $version, $dists, $urgent) = ($1, $2, $3, $4);
 	    my $NMUversion = $self->get('Version');
 	    chomp( my $date = `date -R` );


More information about the Buildd-tools-devel mailing list