From 16306a9cd765c1c4e815f46bfd84ff041b89279a Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Tue, 8 May 2007 08:11:35 +0000 Subject: [PATCH] * scripts/controllib.pl (read_cputable): Localize $_. (read_ostable): Likewise. (read_triplettable): Likewise. (parsedep): Check first for the negated architectures. * scripts/dpkg-checkbuilddeps.pl: Do not enable slurp mode globally. Use get_host_arch instead of directly dpkg-architecture. --- ChangeLog | 9 +++++++++ scripts/controllib.pl | 18 +++++++++++++----- scripts/dpkg-checkbuilddeps.pl | 3 +-- 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8deedb75..ed06a426 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2007-05-08 Guillem Jover + + * scripts/controllib.pl (read_cputable): Localize $_. + (read_ostable): Likewise. + (read_triplettable): Likewise. + (parsedep): Check first for the negated architectures. + * scripts/dpkg-checkbuilddeps.pl: Do not enable slurp mode globally. + Use get_host_arch instead of directly dpkg-architecture. + 2007-05-08 Guillem Jover * scripts/dpkg-genchanges.pl ($pkgdatadir): New variable. diff --git a/scripts/controllib.pl b/scripts/controllib.pl index e7a5b1b5..6fab6ca0 100755 --- a/scripts/controllib.pl +++ b/scripts/controllib.pl @@ -133,6 +133,8 @@ sub get_valid_arches() sub read_cputable { + local $_; + open CPUTABLE, "$pkgdatadir/cputable" or syserr(_g("unable to open cputable")); while () { @@ -147,6 +149,8 @@ sub read_cputable sub read_ostable { + local $_; + open OSTABLE, "$pkgdatadir/ostable" or syserr(_g("unable to open ostable")); while () { @@ -163,6 +167,8 @@ sub read_triplettable() { read_cputable() if (!@cpu); + local $_; + open TRIPLETTABLE, "$pkgdatadir/triplettable" or syserr(_g("unable to open triplettable")); while () { @@ -438,10 +444,8 @@ ALTERNATE: my $seen_arch=''; foreach my $arch (@arches) { $arch=lc($arch); - if (debian_arch_is($host_arch, $arch)) { - $seen_arch=1; - next; - } elsif ($arch =~ /^!/) { + + if ($arch =~ /^!/) { my $not_arch; ($not_arch = $arch) =~ s/^!//; @@ -454,7 +458,11 @@ ALTERNATE: # is also listed.. $seen_arch=1; } - } + } elsif (debian_arch_is($host_arch, $arch)) { + $seen_arch=1; + next; + } + } if (! $seen_arch) { next; diff --git a/scripts/dpkg-checkbuilddeps.pl b/scripts/dpkg-checkbuilddeps.pl index dc2f7567..79cd2d9c 100755 --- a/scripts/dpkg-checkbuilddeps.pl +++ b/scripts/dpkg-checkbuilddeps.pl @@ -51,7 +51,6 @@ parsecontrolfile($controlfile); my @status = parse_status("$admindir/status"); my (@unmet, @conflicts); -local $/=''; my $dep_regex=qr/[ \t]*(([^\n]+|\n[ \t])*)\s/; # allow multi-line if (defined($fi{"C Build-Depends"})) { @@ -147,7 +146,7 @@ sub check_line { my $dep_list=shift; my %version=%{shift()}; my %providers=%{shift()}; - my $host_arch=shift || `dpkg-architecture -qDEB_HOST_ARCH`; + my $host_arch = shift || get_host_arch(); chomp $host_arch; my @unmet=(); -- 2.39.5