Package: dpkg Version: 1.13.22 Severity: normal Currently dpkg-genchanges barfs if debian/files contains the same package with different architectures.
| $ dpkg-genchanges
| dpkg-genchanges: error: package linux-image-2.6-sb1-bcm91250a mips has
section devel in control file but base in files list
The settings are correct, but dpkg-genchanges lacks the state to
differentiate linux-image-2.6-sb1-bcm91250a/mips and
linux-image-2.6-sb1-bcm91250a/mipsel and simply throws away the first
information.
The attached patch fixes the problem by mapping a package name to a list
of files.
Bastian
--
Those who hate and fight must stop themselves -- otherwise it is not stopped.
-- Spock, "Day of the Dove", stardate unknown
--- /usr/bin/dpkg-genchanges 2006-06-21 17:08:36.000000000 +0200
+++ dpkg-genchanges 2006-07-08 18:58:36.000000000 +0200
@@ -13,8 +13,8 @@
# Other global variables used:
# %f2p - file to package map
-# %p2f - package to file map
-# has entries for both "packagename" and "packagename
architecture"
+# %p2f - package to list of files map, has entries for
"packagename"
+# %pa2f - package to file map, has entries for "packagename
architecture"
# %p2ver - package to version map
# %f2sec - file to section map
# %f2pri - file to priority map
@@ -143,8 +143,9 @@
defined($p2f{"$2 $4"}) &&
&warn(sprintf(_g("duplicate files list entry for package %s
(line %d)"), $2, $.));
$f2p{$1}= $2;
- $p2f{"$2 $4"}= $1;
- $p2f{$2}= $1;
+ $pa2f{"$2 $4"}= $1;
+ $p2f{$2} = [] if not defined $p2f{$2};
+ push @{$p2f{$2}}, $1;
$p2ver{$2}= $3;
defined($f2sec{$1}) &&
&warn(sprintf(_g("duplicate files list entry for file %s (line
%d)"), $1, $.));
@@ -190,7 +191,7 @@
}
} else {
$p2arch{$p}=$a;
- $f=$p2f{$p};
+ @[EMAIL PROTECTED];
if (m/^Description$/) {
$v=$` if $v =~ m/\n/;
if ($f =~ m/\.udeb$/) {
@@ -199,9 +200,9 @@
push(@descriptions,sprintf("%-10s - %-.65s",$p,$v));
}
} elsif (m/^Section$/) {
- $f2seccf{$f}= $v;
+ $f2seccf{$_}= $v foreach (@f);
} elsif (m/^Priority$/) {
- $f2pricf{$f}= $v;
+ $f2pricf{$_}= $v foreach (@f);
} elsif (s/^X[BS]*C[BS]*-//i) {
$f{$_}= $v;
} elsif (m/^Architecture$/) {
@@ -252,24 +253,26 @@
}
}
-for $p (keys %p2f) {
+for $p (keys %pa2f) {
my ($pp, $aa) = (split / /, $p);
defined($p2i{"C $pp"}) ||
&warn(sprintf(_g("package %s listed in files list but not in control
info"), $pp));
}
for $p (keys %p2f) {
- $f= $p2f{$p};
- $sec= $f2seccf{$f}; $sec= $sourcedefault{'Section'} if !length($sec);
- if (!length($sec)) { $sec='-'; &warn(sprintf(_g("missing Section for
binary package %s; using '-'"), $p)); }
- $sec eq $f2sec{$f} || &error(sprintf(_g("package %s has section %s in ".
- "control file but %s in files
list"),
- $p, $sec, $f2sec{$f}));
- $pri= $f2pricf{$f}; $pri= $sourcedefault{'Priority'} if !length($pri);
- if (!length($pri)) { $pri='-'; &warn("missing Priority for binary package
$p; using '-'"); }
- $pri eq $f2pri{$f} || &error(sprintf(_g("package %s has priority %s in ".
- "control file but %s in files
list"),
- $p, $pri, $f2pri{$f}));
+ @f= @{$p2f{$p}};
+ foreach my $f (@f) {
+ $sec= $f2seccf{$f}; $sec= $sourcedefault{'Section'} if !length($sec);
+ if (!length($sec)) { $sec='-'; &warn(sprintf(_g("missing Section for
binary package %s; using '-'"), $p)); }
+ $sec eq $f2sec{$f} || &error(sprintf(_g("package %s has section %s in
".
+ "control file but %s in files
list"),
+ $p, $sec, $f2sec{$f}));
+ $pri= $f2pricf{$f}; $pri= $sourcedefault{'Priority'} if !length($pri);
+ if (!length($pri)) { $pri='-'; &warn("missing Priority for binary
package $p; using '-'"); }
+ $pri eq $f2pri{$f} || &error(sprintf(_g("package %s has priority %s in
".
+ "control file but %s in files
list"),
+ $p, $pri, $f2pri{$f}));
+ }
}
&init_substvars;
signature.asc
Description: Digital signature

