Package: dpkg Version: 1.16.3+nmu1 Severity: wishlist Tags: patch Hi,
I'm currently working on multiarch-friendly cross-toolchains. Such packages would greatly benefit from specific arch qualifiers in both binary package field “Depends” and source package field “Build- Depends”. The latter is already handled in apt-get's “build-dep” command. Having such a feature in Wheezy would be great, as it would enable third- parties to provide cross-compilers depending on the target arch's packages. Plus, such a feature shouldn't change anything to how existing packages are handled. Thus, I think this is a useful and safe feature to add, suitable for Wheezy. The attached patch applies on top of the patch provided in #558095, although I haven't set it as a blocker, since those are two separate issues. -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (990, 'testing'), (120, 'unstable'), (105, 'experimental') Architecture: i386 (i686) Kernel: Linux 3.2.0-2-686-pae (SMP w/2 CPU cores) Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages dpkg depends on: ii libbz2-1.0 1.0.6-1 ii libc6 2.13-33 ii libselinux1 2.1.9-2 ii tar 1.26-4 ii xz-utils 5.1.1alpha+20110809-3 ii zlib1g 1:1.2.7.dfsg-11 dpkg recommends no packages. Versions of packages dpkg suggests: ii apt 0.9.5.1+nmu2 -- no debconf information
>From a74262dfa5d9f1b437d66bf1cc969bf3dcc52117 Mon Sep 17 00:00:00 2001 From: Thibaut Girka <t...@sitedethib.com> Date: Thu, 26 Apr 2012 23:08:14 +0200 Subject: [PATCH 2/2] Add support for specific arch qualifiers and cross-arch dependencies --- lib/dpkg/fields.c | 2 -- scripts/Dpkg/Deps.pm | 5 ++++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/dpkg/fields.c b/lib/dpkg/fields.c index ed655f9..07091d2 100644 --- a/lib/dpkg/fields.c +++ b/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"), diff --git a/scripts/Dpkg/Deps.pm b/scripts/Dpkg/Deps.pm index d85ad5f..89cbbfa 100644 --- a/scripts/Dpkg/Deps.pm +++ b/scripts/Dpkg/Deps.pm @@ -575,7 +575,7 @@ sub parse_string { ([a-zA-Z0-9][a-zA-Z0-9+.-]*) # package name (?: # start of optional part : # colon for architecture - (any|native) # 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 @@ -1275,6 +1275,9 @@ sub _find_package { return $p if $ma eq "allowed"; } elsif ($archqual eq "native") { return $p if $a eq $build_arch and $ma ne "foreign"; + } else + { + return $p if $a eq $archqual; } } return undef; -- 1.7.10