Hi!

On Mon, 2014-11-10 at 20:23:25 +0100, Johannes Schauer wrote:
> Quoting Guillem Jover (2014-11-10 19:48:33)
> > (Hmm, doing another quick check, I might rearrange the lists to mention
> > real arch, "any" then "native" if relevant to be consistent.)
> 
> I don't fully understand your last comment in brackets but here is what I
> thought (my comments apply to deb-control as well as deb-src-control):

I've done the change now, just changing the order of the architecture
qualifier values list.

> > @@ -187,8 +187,16 @@ fields is a list of groups of alternative packages. 
> > Each group is a list
> >  of packages separated by vertical bar (or `pipe') symbols, `|'. The
> >  groups are separated by commas. Commas are to be read as `AND', and pipes
> >  as `OR', with pipes binding more tightly. Each package name is
> > +optionally qualified with an architecture name appended after a colon ":",
> 
> It is not necessarily an "architecture name" that follows but also "any" or
> "native". For clarity and to avoid ambiguity with below section I'd write:
> 
>       'optionally followed by an architecture qualifier after a colon ":",'
> 
> or
> 
>       'optionally qualified with an architecture name or "any" or "native"
>       appended after a colon ":"'
> 
> Since this is explained in the next paragraph, the former is probably the
> better choice.

Right, changed. I actually had:

  "… architecture qualified with an architecture name appended …"

but removed the first one to avoid duplication instead of getting rid
of the second one. :)

> >  optionally followed by a version number specification in parentheses.
> >  .LP
> > +An architecture qualifier name can be \fBany\fP (since dpkg 1.16.2) or a
> > +real Debian architecture name (since dpkg 1.16.5).
> > +If omitted, the default is the current binary package architecture.
> 
> maybe say host or native architecture here? Maybe rather "native" because
> "host" is more meaningful in the crossbuild context. Maybe there is an even
> better way in dpkg speech. Is the native architecture not determined by the
> architecture of dpkg itself?

The default architecture for those dependencies is the one matching
the binary package containing that dependency field.

So:

  dpkg native → amd64
  dpkg foreign → i386

  Package: pkgname
  Architecture: i386
  Depends: otherpkg

In that case the implicit arch-qualifier for otherpkg is i386. The
concept of host and native does not apply here, because if the native
and foreign dpkg architectures got swapped the same implicit architecture
qualifier would apply to otherpkg. Or did you mean something else?

> > +A real Debian architecture name will match exactly that architecture for
> > +that package name, \fBany\fP will match any architecture for that package
> > +name.
> 
> maybe it should be noted that it is only meaningful to annotate dependencies 
> on
> Multi-Arch:allowed packages with :any?

Yeah, make sense, added.

> > +An architecture qualifier name can be \fBany\fP (since dpkg 1.16.2),
> > +\fBnative\fP (since 1.16.5) or a real Debian architecture name (since
> > +dpkg 1.16.5).
> > +If omitted, the default for \fBBuild\-Depends\fP fields is the current host
> > +architecture, the default for \fBBuild\-Conflicts\fP fields is \fBany\fP.
> > +A real Debian architecture name will match exactly that architecture for
> > +that package name, \fBany\fP will match any architecture for that package
> > +name, and \fBnative\fP will match the current build architecture.
> 
> As above, maybe mention that :any only makes sense to annotate M-A:allowed
> packages with and :native is disallowed for M-A:foreign packages. But maybe
> this is too much for this man page.

This too, added.

I've also updated the Multi-Arch field description. New patch
attached.

Thanks,
Guillem
From db3e96c698c547a92bcf138700ff2b307f9aad42 Mon Sep 17 00:00:00 2001
From: Guillem Jover <[email protected]>
Date: Mon, 10 Nov 2014 19:40:22 +0100
Subject: [PATCH] man: Document arch-qualifiers for dependency fields

Closes: #768842
Reported-by: Johannes Schauer <[email protected]>
---
 man/deb-control.5     | 21 ++++++++++++++++-----
 man/deb-src-control.5 | 14 +++++++++++++-
 2 files changed, 29 insertions(+), 6 deletions(-)

diff --git a/man/deb-control.5 b/man/deb-control.5
index 289b1ba..d4b6766 100644
--- a/man/deb-control.5
+++ b/man/deb-control.5
@@ -3,7 +3,7 @@
 .\" Copyright © 1995 Raul Miller, Ian Jackson, Ian Murdock
 .\" Copyright © 1999 Ben Collins <[email protected]>
 .\" Copyright © 2000 Wichert Akkerman <[email protected]>
-.\" Copyright © 2007-2011, 2013 Guillem Jover <[email protected]>
+.\" Copyright © 2007-2011, 2013-2014 Guillem Jover <[email protected]>
 .\" Copyright © 2008-2012 Raphaël Hertzog <[email protected]>
 .\"
 .\" This is free software; you can redistribute it and/or modify
@@ -126,8 +126,8 @@ of a different architecture from itself. The value \fBforeign\fP means that
 the package is not co-installable with itself, but should be allowed to
 satisfy the dependency of a package of a different arch from itself. The
 value \fBallowed\fP allows reverse-dependencies to indicate in their
-Depends field that they accept a package from a foreign architecture, but
-has no effect otherwise.
+Depends field that they accept a package from a foreign architecture by
+qualifying the package name with \fB:any\fP, but has no effect otherwise.
 The value \fBno\fP is the default when the field is omitted, in which case
 adding the field with an explicit \fBno\fP value is generally not needed.
 .TP
@@ -187,8 +187,16 @@ fields is a list of groups of alternative packages. Each group is a list
 of packages separated by vertical bar (or `pipe') symbols, `|'. The
 groups are separated by commas. Commas are to be read as `AND', and pipes
 as `OR', with pipes binding more tightly. Each package name is
+optionally followed by an architecture qualifier appended after a colon ":",
 optionally followed by a version number specification in parentheses.
 .LP
+An architecture qualifier name can be a real Debian architecture name
+(since dpkg 1.16.5) or \fBany\fP (since dpkg 1.16.2).
+If omitted, the default is the current binary package architecture.
+A real Debian architecture name will match exactly that architecture for
+that package name, \fBany\fP will match any architecture for that package
+name if the package has been marked as \fBMulti\-Arch: allowed\fP.
+.LP
 A version number may start with a `>>', in which case any later version
 will match, and may specify or omit the Debian packaging revision (separated
 by a hyphen). Accepted version relationships are ">>" for greater than,
@@ -240,8 +248,11 @@ In the
 .B Breaks
 and
 .B Conflicts
-fields, the comma should be read as `OR'. An optional version can also be
-given with the same syntax as above for the
+fields, the comma should be read as `OR'.
+An optional architecture qualifier can also be appended to the package name
+with the same syntax as above, but the default is \fBany\fP instead of the
+binary package architecture.
+An optional version can also be given with the same syntax as above for the
 .BR Breaks ,
 .B Conflicts
 and
diff --git a/man/deb-src-control.5 b/man/deb-src-control.5
index 665dced..80305cb 100644
--- a/man/deb-src-control.5
+++ b/man/deb-src-control.5
@@ -2,7 +2,7 @@
 .\"
 .\" Copyright © 2010 Oxan van Leeuwen <[email protected]>
 .\" Copyright © 2011 Raphaël Hertzog <[email protected]>
-.\" Copyright © 2011-2013 Guillem Jover <[email protected]>
+.\" Copyright © 2011-2014 Guillem Jover <[email protected]>
 .\"
 .\" This is free software; you can redistribute it and/or modify
 .\" it under the terms of the GNU General Public License as published by
@@ -186,6 +186,7 @@ fields is a list of groups of alternative packages. Each group is a list
 of packages separated by vertical bar (or "pipe") symbols, "|". The
 groups are separated by commas. Commas are to be read as "AND", and pipes
 as "OR", with pipes binding more tightly. Each package name is
+optionally followed by an architecture qualifier appended after a colon ":",
 optionally followed by a version number specification in parentheses, an
 architecture specification in square brackets, and a restriction formula
 consisting of one or more lists of profile names in angle brackets.
@@ -202,6 +203,17 @@ parentheses, an architecture specification in square brackets, and a
 restriction formula consisting of one or more lists of profile names in
 angle brackets.
 
+An architecture qualifier name can be a real Debian architecture name
+(since dpkg 1.16.5), \fBany\fP (since dpkg 1.16.2) or \fBnative\fP
+(since dpkg 1.16.5).
+If omitted, the default for \fBBuild\-Depends\fP fields is the current host
+architecture, the default for \fBBuild\-Conflicts\fP fields is \fBany\fP.
+A real Debian architecture name will match exactly that architecture for
+that package name, \fBany\fP will match any architecture for that package
+name if the package is marked with \fBMulti\-Arch: allowed\fP, and
+\fBnative\fP will match the current build architecture if the package
+is nor marked with \fBMulti\-Arch: foreign\fP.
+
 A version number may start with a ">>", in which case any later version
 will match, and may specify or omit the Debian packaging revision (separated
 by a hyphen). Accepted version relationships are ">>" for greater than,
-- 
2.1.3

Reply via email to