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=6464cc404c9656a636a89ccb7dce979d7f94d29e

commit 6464cc404c9656a636a89ccb7dce979d7f94d29e
Author: Guillem Jover <[email protected]>
AuthorDate: Sun Oct 23 21:03:45 2022 +0200

    dpkg-genchanges: Use intermediate variables to access fields
    
    Changelog: internal
---
 scripts/dpkg-genchanges.pl | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/scripts/dpkg-genchanges.pl b/scripts/dpkg-genchanges.pl
index 05519e2d2..bc8dc0c98 100755
--- a/scripts/dpkg-genchanges.pl
+++ b/scripts/dpkg-genchanges.pl
@@ -323,8 +323,10 @@ $dist->load($fileslistfile) if -e $fileslistfile;
 
 foreach my $file ($dist->get_files()) {
     my $f = $file->{filename};
+    my $p = $file->{package};
+    my $a = $file->{arch};
 
-    if (defined $file->{package} && $file->{package_type} eq 'buildinfo') {
+    if (defined $p && $file->{package_type} eq 'buildinfo') {
         # We always distribute the .buildinfo file.
         $checksums->add_from_file("$uploadfilesdir/$f", key => $f);
         next;
@@ -333,17 +335,17 @@ foreach my $file ($dist->get_files()) {
     # If this is a source-only upload, ignore any other artifacts.
     next if build_has_none(BUILD_BINARY);
 
-    if (defined $file->{arch}) {
-        my $arch_all = debarch_eq('all', $file->{arch});
+    if (defined $a) {
+        my $arch_all = debarch_eq('all', $a);
 
         next if build_has_none(BUILD_ARCH_INDEP) and $arch_all;
         next if build_has_none(BUILD_ARCH_DEP) and not $arch_all;
 
-        push @archvalues, $file->{arch} if not $archadded{$file->{arch}}++;
+        push @archvalues, $a if not $archadded{$a}++;
     }
-    if (defined $file->{package} && $file->{package_type} =~ m/^u?deb$/) {
-        $p2f{$file->{package}} //= [];
-        push @{$p2f{$file->{package}}}, $file->{filename};
+    if (defined $p && $file->{package_type} =~ m/^u?deb$/) {
+        $p2f{$p} //= [];
+        push @{$p2f{$p}}, $f;
     }
 
     $checksums->add_from_file("$uploadfilesdir/$f", key => $f);

-- 
Dpkg.Org's dpkg

Reply via email to