From: Adam Heath Date: Wed, 17 Sep 2003 18:25:50 +0000 (+0000) Subject: * scripts/controllib.pl: Fix parsing of deps when both () and [] are X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30413fba30ef49d0067818cd61ccf1945afdeb79;p=dpkg * scripts/controllib.pl: Fix parsing of deps when both () and [] are specified. * scripts/controllib.pl: Set $host_arch in controllib.pl:parsedep. * scripts/dpkg-checkbuilddeps.pl: Don't output the [] stuff when finding invalid deps. --- diff --git a/ChangeLog b/ChangeLog index 85cd9e87..1ca7bcaa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Wed Sep 17 13:23:15 CDT 2003 Adam Heath + + * scripts/controllib.pl: Fix parsing of deps when both () and [] are + specified. + * scripts/controllib.pl: Set $host_arch in controllib.pl:parsedep. + * scripts/dpkg-checkbuilddeps.pl: Don't output the [] stuff when finding + invalid deps. + Tue Sep 16 13:44:06 CDT 2003 Adam Heath * scripts/dpkg-source.pl: Fix generation of dependency lines. diff --git a/debian/changelog b/debian/changelog index 8e07e659..d8a36346 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +dpkg (1.10.12) unstable; urgency=low + + * Fix parsing of deps when both () and [] are specified. + * Set $host_arch in controllib.pl:parsedep. + * dpkg-checkbuilddeps doesn't output the [] stuff when finding invalid + deps. + + -- Adam Heath Wed, 17 Sep 2003 13:23:15 -0500 + dpkg (1.10.12) unstable; urgency=low * Fix dpkg-source output of build-depends lines. diff --git a/scripts/controllib.pl b/scripts/controllib.pl index 45d27f28..f7ade049 100755 --- a/scripts/controllib.pl +++ b/scripts/controllib.pl @@ -174,14 +174,18 @@ sub parsecontrolfile { sub parsedep { my ($dep_line, $use_arch, $reduce_arch) = @_; my @dep_list; + if (!$host_arch) { + $host_arch = `dpkg-architecture -qDEB_HOST_ARCH`; + chomp $host_arch; + } foreach my $dep_and (split(/,\s*/m, $dep_line)) { my @or_list = (); ALTERNATE: foreach my $dep_or (split(/\s*\|\s*/m, $dep_and)) { my ($package, $relation, $version); $package = $1 if ($dep_or =~ s/^(\S+)\s*//m); - ($relation, $version) = ($1, $2) if ($dep_or =~ s/^\((=|<=|>=|<>?)\s*([^)]+).*\)//m); - my @arches = split(/\s+/m, $1) if ($use_arch && $dep_or =~ s/^\[([^]]+)\]//m); + ($relation, $version) = ($1, $2) if ($dep_or =~ s/^\((=|<=|>=|<>?)\s*([^)]+).*\)\s*//m); + my @arches = split(/\s+/m, $1) if ($use_arch && $dep_or =~ s/^\[([^]]+)\]\s*//m); if ($reduce_arch && @arches) { my $seen_arch=''; diff --git a/scripts/dpkg-checkbuilddeps.pl b/scripts/dpkg-checkbuilddeps.pl index 9fbd5ade..d7d3d846 100755 --- a/scripts/dpkg-checkbuilddeps.pl +++ b/scripts/dpkg-checkbuilddeps.pl @@ -136,7 +136,7 @@ ALTERNATE: foreach my $alternate (@$dep_and) { # This is a possibile way to meet the dependency. # Remove the arch stuff from $alternate. - push @possibles, $package . ($relation && $version ? " ($relation $version)" : '') . (@$arch_list ? " [@$arch_list]" : ''); + push @possibles, $package . ($relation && $version ? " ($relation $version)" : ''); if ($relation && $version) { if (! exists $version{$package}) {