This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch main in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=acccaa648c1c02e9c29f41938c38661b29ea5721 commit acccaa648c1c02e9c29f41938c38661b29ea5721 Author: Guillem Jover <[email protected]> AuthorDate: Thu Jan 2 19:54:17 2025 +0100 dpkg-genchanges: Set Section and Priority defaults even with no fields When we have no fields, that is precisely where setting the defaults is most important, and the initial purpose of these changes. Fixes: commit a365789d463aadaf6870abcb149a90e54cef988e Closes: #1091941 Changelog: internal --- scripts/dpkg-genchanges.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/dpkg-genchanges.pl b/scripts/dpkg-genchanges.pl index 39d4f2477..eb65b2390 100755 --- a/scripts/dpkg-genchanges.pl +++ b/scripts/dpkg-genchanges.pl @@ -252,7 +252,7 @@ foreach my $f (keys %{$src_fields}) { if ($f eq 'Source') { set_source_name($v); } elsif (any { $f eq $_ } qw(Section Priority)) { - $sourcedefault{$f} = $v // field_get_default_value($f); + $sourcedefault{$f} = $v; } elsif ($f eq 'Description') { # Description in changes is computed, do not copy this field, only # initialize the description substvars. @@ -262,6 +262,10 @@ foreach my $f (keys %{$src_fields}) { } } +foreach my $f (qw(Section Priority)) { + $sourcedefault{$f} //= field_get_default_value($f); +} + my $dist = Dpkg::Dist::Files->new(); my $origsrcmsg; -- Dpkg.Org's dpkg

