Control: tags -1 +patch
Control: notfound -1 0.77.1-2
Control: found -1 0.78.0-2
Control: forwarded -1 https://salsa.debian.org/debian/sbuild/merge_requests/5

I have verified this is a regression from 0.77.1. I can also confirm
there is an easy fix, attached and forwarded.

Thanks to James Clark for the patch, described on #debian-devel. :)

Cheers,

A.
-- 
I've got to design so you can put it together out of garbage cans. In
part because that's what I started from, but mostly because I don’t
trust the industrial structure—they might decide to suppress us
weirdos and try to deny us the parts we need.
                       - Lee Felsenstein
>From e3447e992c33f6162441aa757e2ab273afae2497 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= <anar...@debian.org>
Date: Tue, 22 Jan 2019 17:16:05 -0500
Subject: [PATCH] fix syntax of generated Sources.gz files (Closes: #920227)

The rewrite of dpkg-scan* performed to fix #909847 introduced a
problem in 18f423619c176471d2adaafb7742cb204951a10c: Sources.gz
entries are not correctly separated by a newline. Furthermore, they
have Source: entries instead of Package:

This confuses older version of APT (previous to jessie) which have
extra sanity checks on the contents of those files, which breaks
building in older chroots.
---
 lib/Sbuild/ResolverBase.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/Sbuild/ResolverBase.pm b/lib/Sbuild/ResolverBase.pm
index 6399c350..71dda196 100644
--- a/lib/Sbuild/ResolverBase.pm
+++ b/lib/Sbuild/ResolverBase.pm
@@ -1412,6 +1412,7 @@ sub hash_file($$)
 	open my $in, '<', $entry or die "cannot open $entry";
 	while (my $line = <$in>) {
 	    next if $line eq "\n";
+	    $line =~ s/^Source:/Package:/;
 	    print $out $line;
 	    if ($line eq "Checksums-Sha1:\n") {
 		print $out " $sha1 $size $entry\n";
@@ -1439,6 +1440,7 @@ sub hash_file($$)
 	}
 	print $out "Directory: .";
 	print $out "\n";
+	print $out "\n";
     }
     close $out;
     closedir($dh);
-- 
2.20.1

Reply via email to