Просмотр исходного кода

* 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.

Adam Heath лет назад: 23
Родитель
Сommit
30413fba30
4 измененных файлов с 24 добавлено и 3 удалено
  1. 8 0
      ChangeLog
  2. 9 0
      debian/changelog
  3. 6 2
      scripts/controllib.pl
  4. 1 1
      scripts/dpkg-checkbuilddeps.pl

+ 8 - 0
ChangeLog

@@ -1,3 +1,11 @@
+Wed Sep 17 13:23:15 CDT 2003 Adam Heath <doogie@debian.org>
+
+  * 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 <doogie@debian.org>
 
   * scripts/dpkg-source.pl: Fix generation of dependency lines.

+ 9 - 0
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 <doogie@debian.org>  Wed, 17 Sep 2003 13:23:15 -0500
+
 dpkg (1.10.12) unstable; urgency=low
 
   * Fix dpkg-source output of build-depends lines.

+ 6 - 2
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='';

+ 1 - 1
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}) {