Kaynağa Gözat

Add support for specific arch-qualified dependencies

This allows to use dependencies with arch-qualified package names. For
example:

  Depends: libc6:amd64 (>= 2.14), libgcc1

Closes: #676232

Signed-off-by: Guillem Jover <guillem@debian.org>
Thibaut Girka 14 yıl önce
ebeveyn
işleme
7acf7afa58
3 değiştirilmiş dosya ile 5 ekleme ve 3 silme
  1. 2 0
      debian/changelog
  2. 0 2
      lib/dpkg/fields.c
  3. 3 1
      scripts/Dpkg/Deps.pm

+ 2 - 0
debian/changelog

@@ -40,6 +40,8 @@ dpkg (1.16.5) UNRELEASED; urgency=low
   * Avoid full stop and double newline at the end of errors and warnings.
     Thanks to Jonathan Nieder <jnieder@gmail.com>. Closes: #624000
   * Change all programs to accept -? instead of -h for help output.
+  * Add support for specific arch-qualified dependencies. Closes: #676232
+    Thanks to Thibaut Girka <thib@sitedethib.com>.
 
   [ Updated dpkg translations ]
   * Swedish (Peter Krefting).

+ 0 - 2
lib/dpkg/fields.c

@@ -448,8 +448,6 @@ f_dependency(struct pkginfo *pkg, struct pkgbin *pkgbin,
 
         if (dop->arch->type == arch_illegal)
           emsg = dpkg_arch_name_is_illegal(arch.buf);
-        else if (dop->arch->type != arch_wildcard)
-          emsg = _("a value different from 'any' is currently not allowed");
         if (emsg)
           parse_error(ps, _("'%s' field, reference to '%.255s': "
                             "invalid architecture name '%.255s': %s"),

+ 3 - 1
scripts/Dpkg/Deps.pm

@@ -565,7 +565,7 @@ sub parse_string {
               ([a-zA-Z0-9][a-zA-Z0-9+.-]*)  # package name
               (?:                           # start of optional part
                 :                           # colon for architecture
-                (any)                       # architecture name
+                ([a-zA-Z0-9][a-zA-Z0-9-]*)  # architecture name
               )?                            # end of optional part
               (?:                           # start of optional part
                 \s* \(                      # open parenthesis for version part
@@ -1260,6 +1260,8 @@ sub _find_package {
 	} elsif ($archqual eq "any") {
 	    return $p if $ma eq "allowed";
 	    return $p if $a eq $host_arch or $a eq "all";
+	} else {
+	    return $p if $a eq $archqual;
 	}
     }
     return undef;