+2006-03-15 Guillem Jover <guillem@debian.org>
+
+ * scripts/controllib.pl.in: Rename to ...
+ * scripts/controllib.pl: ... this.
+ (debian_arch_expand): Remove function. Fix all callers.
+ (pkgdatadir, read_cputable, read_ostable): Move to ...
+ * scripts/dpkg-architecture.pl: ... here.
+ * scripts/Makefile.am (%.pl): Remove rule.
+
2006-03-05 Guillem Jover <guillem@debian.org>
* scripts/controllib.pl.in (quiet_warnings): New variable.
* Add dpkg-query(1) in the SEE ALSO section in dpkg(1). Closes: #354643
* Don't try to compile in SELinux support on GNU/kFreeBSD amd64.
* Add new quiet option to dpkg-source to supress warnings. Closes: #355065
+ * Do not expand architecture aliases anymore in .dsc files.
[ Updated man pages translations ]
* Polish (Robert Luberda). Closes: #353782
# "S key" where S is the source and key is the packagename
# %substvar - map with substitution variables
-$pkgdatadir=".";
-
$parsechangelog= 'dpkg-parsechangelog';
@pkg_dep_fields = qw(Replaces Provides Depends Pre-Depends Recommends Suggests
$substvar{'Arch'}= $arch;
}
-sub read_cputable {
- open CPUTABLE, "$pkgdatadir/cputable"
- or &syserr("unable to open cputable");
- while (<CPUTABLE>) {
- if (m/^(?!\#)(\S+)\s+(\S+)\s+(\S+)/) {
- $cputable{$1} = $2;
- $cputable_re{$1} = $3;
- push @cpu, $1;
- }
- }
- close CPUTABLE;
-}
-
-sub read_ostable {
- open OSTABLE, "$pkgdatadir/ostable"
- or &syserr("unable to open ostable");
- while (<OSTABLE>) {
- if (m/^(?!\#)(\S+)\s+(\S+)\s+(\S+)/) {
- $ostable{$1} = $2;
- $ostable_re{$1} = $3;
- push @os, $1;
- }
- }
- close OSTABLE;
-}
-
sub debian_arch_fix
{
local ($os, $cpu) = @_;
return 0;
}
-&read_cputable;
-&read_ostable;
-
-sub debian_arch_expand
-{
- local ($_) = @_;
-
- /^(!)?(.*)/;
-
- local $not = $1 || '';
- local $arch = $2;
- local ($os, $cpu) = debian_arch_split($arch);
- local @list;
-
- if ("$os-$cpu" eq 'any-any') {
- @list = 'any';
- } elsif ($os eq 'all' or $cpu eq 'all') {
- @list = 'all';
- } elsif ($cpu eq 'any') {
- foreach my $_cpu (@cpu) {
- push @list, $not.debian_arch_fix($os, $_cpu);
- }
- } elsif ($os eq 'any') {
- foreach my $_os (@os) {
- push @list, $not.debian_arch_fix($_os, $cpu);
- }
- } else {
- push @list, $not.debian_arch_fix($os, $cpu);
- }
-
- return @list;
-}
-
sub substvars {
my ($v) = @_;
my ($lhs,$vn,$rhs,$count);
my @or_list = ();
foreach my $dep_or (@$dep_and) {
my ($package, $relation, $version, $arch_list) = @$dep_or;
- my @arches = map(debian_arch_expand($_), @$arch_list);
- chomp @arches;
- push @or_list, $package . ($relation && $version ? " ($relation $version)" : '') . ($show_arch && @arches ? " [@arches]" : '');
+ push @or_list, $package . ($relation && $version ? " ($relation $version)" : '') . ($show_arch && @$arch_list ? " [@$arch_list]" : '');
}
push @and_list, join(' | ', @or_list);
}
push(@INC,$dpkglibdir);
require 'controllib.pl';
+$pkgdatadir=".";
+
sub usageversion {
print STDERR
"Debian $0 $version.
";
}
+sub read_cputable {
+ open CPUTABLE, "$pkgdatadir/cputable"
+ or &syserr("unable to open cputable");
+ while (<CPUTABLE>) {
+ if (m/^(?!\#)(\S+)\s+(\S+)\s+(\S+)/) {
+ $cputable{$1} = $2;
+ $cputable_re{$1} = $3;
+ push @cpu, $1;
+ }
+ }
+ close CPUTABLE;
+}
+
+sub read_ostable {
+ open OSTABLE, "$pkgdatadir/ostable"
+ or &syserr("unable to open ostable");
+ while (<OSTABLE>) {
+ if (m/^(?!\#)(\S+)\s+(\S+)\s+(\S+)/) {
+ $ostable{$1} = $2;
+ $ostable_re{$1} = $3;
+ push @os, $1;
+ }
+ }
+ close OSTABLE;
+}
+
sub split_debian {
local ($_) = @_;
return debian_arch_fix($os, $cpu);
}
+&read_cputable;
+&read_ostable;
+
# Check for -L
if (grep { m/^-L$/ } @ARGV) {
foreach $os (@os) {
if (grep($sourcearch[0] eq $_, 'any','all')) {
@sourcearch= ('any');
} else {
- my @arches = map(debian_arch_expand($_),
- split(/\s+/, $v));
- chomp @arches;
- for $a (@arches) {
+ for $a (split(/\s+/, $v)) {
&error("`$a' is not a legal architecture string")
unless $a =~ /^[\w-]+$/;
&error("architecture $a only allowed on its own".