Author: djpig
Date: 2006-02-18 18:06:58 +0000 (Sat, 18 Feb 2006)
New Revision: 161

Modified:
   trunk/ChangeLog
   trunk/debian/changelog
   trunk/scripts/dpkg-gencontrol.pl
Log:
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.


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2006-02-18 18:02:00 UTC (rev 160)
+++ trunk/ChangeLog     2006-02-18 18:06:58 UTC (rev 161)
@@ -1,5 +1,10 @@
 2006-02-18  Frank Lichtenheld  <[EMAIL PROTECTED]>
 
+       * 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.

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog      2006-02-18 18:02:00 UTC (rev 160)
+++ trunk/debian/changelog      2006-02-18 18:06:58 UTC (rev 161)
@@ -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 <[EMAIL PROTECTED]>  Sat, 18 Feb 2006 19:01:24 +0100
 

Modified: trunk/scripts/dpkg-gencontrol.pl
===================================================================
--- trunk/scripts/dpkg-gencontrol.pl    2006-02-18 18:02:00 UTC (rev 160)
+++ trunk/scripts/dpkg-gencontrol.pl    2006-02-18 18:06:58 UTC (rev 161)
@@ -233,6 +233,9 @@
     $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 @@
         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 @@
 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/;


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to