From c0147d8fa721444c11c2136222eafa478029d470 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Sat, 18 Feb 2006 18:06:58 +0000 Subject: [PATCH] Fix handling of debian/files when architecture is set via -D command line option. The value override was applied too late. Closes: #251911 Historical sidenote: This was already fixed once back in Ian Jackson's 1.5 branch but was apparently never correctly merged back. --- ChangeLog | 5 +++++ debian/changelog | 3 ++- scripts/dpkg-gencontrol.pl | 9 +++++---- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index c33fc6d3..26f9cda9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2006-02-18 Frank Lichtenheld + * scripts/dpkg-gencontrol.pl: Fix handling of + debian/files when architecture is set via -D + command line option. The value override was + applied too late. + * configure.ac: Bump version to 1.13.17~. * configure.ac: Release 1.13.16. diff --git a/debian/changelog b/debian/changelog index d1904551..9ff583a5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ dpkg (1.13.17~) UNRELEASED; urgency=low - * + [ Frank Lichtenheld ] + * Fix handling of -DArchitecure=foo in dpkg-gencontrol. Closes: #251911 -- Frank Lichtenheld Sat, 18 Feb 2006 19:01:24 +0100 diff --git a/scripts/dpkg-gencontrol.pl b/scripts/dpkg-gencontrol.pl index 2336e189..b09a8867 100755 --- a/scripts/dpkg-gencontrol.pl +++ b/scripts/dpkg-gencontrol.pl @@ -233,6 +233,9 @@ if (length($substvar{'Installed-Size'})) { $f{'Installed-Size'}= $substvar{'Installed-Size'}; } +for $f (keys %override) { $f{&capit($f)}= $override{$f}; } +for $f (keys %remove) { delete $f{&capit($f)}; } + $fileslistfile="./$fileslistfile" if $fileslistfile =~ m/^\s/; open(Y,"> $fileslistfile.new") || &syserr("open new files list file"); binmode(Y); @@ -244,7 +247,8 @@ if (open(X,"< $fileslistfile")) { chomp; next if m/^([-+0-9a-z.]+)_[^_]+_([\w-]+)\.deb / && ($1 eq $oppackage) - && (debian_arch_eq($2, $arch) || debian_arch_eq($2, 'all')); + && (debian_arch_eq($2, $f{'Architecture'}) + || debian_arch_eq($2, 'all')); print(Y "$_\n") || &syserr("copy old entry to new files list file"); } close(X) || &syserr("close old files list file"); @@ -261,9 +265,6 @@ print(Y &substvars(sprintf("%s %s %s\n", $forcefilename, close(Y) || &syserr("close new files list file"); rename("$fileslistfile.new",$fileslistfile) || &syserr("install new files list file"); -for $f (keys %override) { $f{&capit($f)}= $override{$f}; } -for $f (keys %remove) { delete $f{&capit($f)}; } - if (!$stdout) { $cf= "$packagebuilddir/DEBIAN/control"; $cf= "./$cf" if $cf =~ m/^\s/; -- 2.39.5