Package: dpkg
Version: 1.16.1.2ubuntu7.5

The Debian Policy Manual describes at 7.1 the syntax of relationship fields. To 
test the syntax after running into trouble writing my own packages, I created a 
directory 'test' containing a sample file (usr/src/test/TODO) and the usual 
DEBIAN/conffile (size zero) and the following DEBIAN/control:

Package: test
Version: 2.3.0
Architecture: amd64
Maintainer: Daniel U. Thibault 
<[email protected]<mailto:[email protected]>>
Installed-Size: 19
Depends: libc6 (>= 2.2.1), exim | mail-transport-agent
Section: utils
Priority: extra
Homepage: http://git.lttng.org/?p=lttng-modules.git;a=summary
Description: Test of dpkg
This package does nothing.

The Depends line was then varied before running 'dpkg --build ./test' in each 
case.

The Depends line shown above packages just fine. However:

Depends: foo [solaris-amd64], bar [!solaris-amd64]


Yields the error `Depends' field, syntax error after reference to package 
'foo'. Likewise for:


Depends: foo (>= 1.0) [solaris-amd64]
Depends: foo [!solaris-amd64], bar [solaris-amd64]
Depends: foo [!solaris-amd64] | bar [!hurd-amd64]

Note how closely the examples mimic those given in the Debian Policy Manual. 
Inspection of the f_dependency() function of lib/dpkg/fields.c leads me to 
believe dpkg will always reject any attempt to use architecture restriction as 
defined by the Debian Policy Manual! On the other hand, this behaviour does 
match that described by man deb-control.

I am using Ubuntu 12.04.4 LTS precise, kernel 3.9.3.

Reply via email to