Re: Architecture in *.dsc files

2009-05-30 Thread Russ Allbery
Goswin von Brederlow  writes:

>   architectures separated by spaces (including "all" for architecture
>   independent), or the special value any.
>
> I would change "all" to be no longer special but be one of the
> architectures (like above). Or can one have "Architecture: all any"?

It's still special in debian/control.  The usage is really different now
between all three places that Architecture may appear.

http://bugs.debian.org/530967 is my proposed new wording.

-- 
Russ Allbery (r...@debian.org)   


-- 
To UNSUBSCRIBE, email to debian-dpkg-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: Architecture in *.dsc files

2009-05-30 Thread Goswin von Brederlow
Russ Allbery  writes:

> Currently, Policy's description of Architecture includes the statement:
>
> In the main debian/control file in the source package, or in the
> source package control file .dsc, one may specify a list of
> architectures separated by spaces, or the special values any or all.

  architectures separated by spaces (including "all" for architecture
  independent), or the special value any.

I would change "all" to be no longer special but be one of the
architectures (like above). Or can one have "Architecture: all any"?

> By my reading, this says that the Architecture field may be *either* a
> list of architectures *or* one of any or all.  However, the current
> dpkg-dev appears to generate an Architecture line that includes both
> architectures and special values like "all".
>
> I can see why this was done, and I think it's a more accurate portrayal
> of what the source package generates.  However, it means that Policy is
> wrong and needs to be changed.
>
> What should it say instead?  I assume that the current language should
> be retained for debian/control, but the specification for .dsc is now
> different.

See above.

MfG
Goswin


-- 
To UNSUBSCRIBE, email to debian-dpkg-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: Architecture in *.dsc files

2009-05-30 Thread Goswin von Brederlow
Jonathan Yu  writes:

> Hi:
>
> This is probably a stupid question, but...
>
> On Tue, May 26, 2009 at 11:33 PM, Russ Allbery  wrote:
>> Currently, Policy's description of Architecture includes the statement:
>>
>>    In the main debian/control file in the source package, or in the
>>    source package control file .dsc, one may specify a list of
>>    architectures separated by spaces, or the special values any or all.
>>
>> By my reading, this says that the Architecture field may be *either* a
>> list of architectures *or* one of any or all.  However, the current
>> dpkg-dev appears to generate an Architecture line that includes both
>> architectures and special values like "all".
>
> I'm curious, which package(s) do this? What is the idea of doing so?
> Is it like saying, "build specially on these architectures; otherwise
> just use 'all'"? Or am I missing the point of it completely?

Package: foo
Architecture: amd64 i386

Package: foo-doc
Architecture: all

The dsc file will list all, amd64 and i386.


Before the dsc file would list "any" which then caused the buildds on
all architectures to try to build the package with -B and fail because
there is nothing to build.

MfG
Goswin


-- 
To UNSUBSCRIBE, email to debian-dpkg-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: Architecture in *.dsc files

2009-05-27 Thread Raphael Hertzog
On Wed, 27 May 2009, Russ Allbery wrote:
> Andres Mejia  writes:
> 
> > Perhaps inclusive 'or' is meant here. That's the impression I get from
> > reading this.
> 
> > Perhaps a footnote saying "Here 'or' is meant inclusively" should be
> > added.
> 
> Well, but that doesn't answer the more fundamental question.  What does
> an Architecture field like:
> 
> i386 amd64 all
> 
> in a *.dsc file mean?  Currently, Policy is silent here.

It means you can do:
- dpkg-buildpackage -B (or -b) on i386/amd64
- dpkg-buildpackage -A on all arches (at least in theory, in practice I'm
  sure we have many packages where the arch: all is a by-product of the
  normal full build and hence requires to be built on one of the supported
  arches)

Think of it as a list of arches that have to be auto-built.
Given that autobuilders use -B, you have to generate the arch: all on a
separate auto-builder.

> Can "any" ever appear in combination with architectures (if, for
> example, the package builds some binary packages only on some
> architectures and others on all architectures)?

No. If "any" appears, it will always be alone.

Check line 195-226 of dpkg-source to see what is done.

Cheers,
-- 
Raphaël Hertzog

Contribuez à Debian et gagnez un cahier de l'admin Debian Lenny :
http://www.ouaza.com/wp/2009/03/02/contribuer-a-debian-gagner-un-livre/


-- 
To UNSUBSCRIBE, email to debian-dpkg-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: Architecture in *.dsc files

2009-05-27 Thread Andres Mejia
On Wednesday 27 May 2009 14:19:02 Russ Allbery wrote:
> Andres Mejia  writes:
> > Perhaps inclusive 'or' is meant here. That's the impression I get from
> > reading this.
> >
> > Perhaps a footnote saying "Here 'or' is meant inclusively" should be
> > added.
>
> Well, but that doesn't answer the more fundamental question.  What does
> an Architecture field like:
>
> i386 amd64 all
>
> in a *.dsc file mean?  Currently, Policy is silent here.
>
> Can "any" ever appear in combination with architectures (if, for
> example, the package builds some binary packages only on some
> architectures and others on all architectures)?
>
> The section also has some comma-splice problems and isn't clear in a few
> other ways, so with that information I'll probably rewrite it completely
> and try to make it clearer.

Looking at the code for sbuild [1], it seems that the Architecture is being 
used 
in the sense that policy should be written as,

"one may _either_ specify a list of architectures separated by spaces, or the 
special values any or all."

I'm not sure if this is a problem with policy, or a problem with sbuild.

1. http://git.debian.org/?p=buildd-
tools/sbuild.git;a=blob;f=lib/Sbuild/Build.pm;h=e171239d9e7326b6dd00c24c004faffd3b8f4b43;hb=ce5ef3dabd6a722e8cd515f0694c09343ec49bed#l539

-- 
Regards,
Andres


-- 
To UNSUBSCRIBE, email to debian-dpkg-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: Architecture in *.dsc files

2009-05-27 Thread Adam D. Barratt
On Wed, 2009-05-27 at 11:19 -0700, Russ Allbery wrote:
> Well, but that doesn't answer the more fundamental question.  What does
> an Architecture field like:
> 
> i386 amd64 all
> 
> in a *.dsc file mean?  Currently, Policy is silent here.

That the binary packages referenced by the .dsc file include at least
one package that has Architecture: i386, at least one that has
Architecture: amd64 and at least one that has Architecture: all.

> Can "any" ever appear in combination with architectures (if, for
> example, the package builds some binary packages only on some
> architectures and others on all architectures)?

>From dpkg's point-of-view, the answer here appears to be no.  The patch
introducing the feature includes this hunk:

+if (grep($_ eq 'any', @sourcearch)) {
+   # If we encounter one any then the other arches become insignificant.
+   @sourcearch = ('any');
+}
+$fields->{'Architecture'}= join(' ',@sourcearch);

Regards,

Adam


-- 
To UNSUBSCRIBE, email to debian-dpkg-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: Architecture in *.dsc files

2009-05-27 Thread Russ Allbery
Andres Mejia  writes:

> Perhaps inclusive 'or' is meant here. That's the impression I get from
> reading this.

> Perhaps a footnote saying "Here 'or' is meant inclusively" should be
> added.

Well, but that doesn't answer the more fundamental question.  What does
an Architecture field like:

i386 amd64 all

in a *.dsc file mean?  Currently, Policy is silent here.

Can "any" ever appear in combination with architectures (if, for
example, the package builds some binary packages only on some
architectures and others on all architectures)?

The section also has some comma-splice problems and isn't clear in a few
other ways, so with that information I'll probably rewrite it completely
and try to make it clearer.

-- 
Russ Allbery (r...@debian.org)   


-- 
To UNSUBSCRIBE, email to debian-dpkg-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: Architecture in *.dsc files

2009-05-27 Thread Andres Mejia
On Wednesday 27 May 2009 00:04:19 Russ Allbery wrote:
> Jonathan Yu  writes:
> > This is probably a stupid question, but...
> >
> > On Tue, May 26, 2009 at 11:33 PM, Russ Allbery  wrote:
> >> Currently, Policy's description of Architecture includes the statement:
> >>
> >>In the main debian/control file in the source package, or in the
> >>source package control file .dsc, one may specify a list of
> >>architectures separated by spaces, or the special values any or all.
> >>
> >> By my reading, this says that the Architecture field may be *either* a
> >> list of architectures *or* one of any or all.  However, the current
> >> dpkg-dev appears to generate an Architecture line that includes both
> >> architectures and special values like "all".
> >
> > I'm curious, which package(s) do this? What is the idea of doing so?
> > Is it like saying, "build specially on these architectures; otherwise
> > just use 'all'"? Or am I missing the point of it completely?
>
> I noticed it with the openafs package, whose compiled code only works
> with a restricted set of architectures but which also includes a
> documentation package that's arch: all.
>
> The Architecture field in the .dsc file isn't something that the package
> is responsible for.  dpkg-dev creates it based on the Architecture
> fields in debian/control.
>
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=526617 appears to be
> the relevant change.  I have no problem with this change -- it looks
> correct to me.  It just means the Policy wording is wrong, and I'd
> rather get a definitive statement about what Policy *should* say and
> what the meaning of possible .dsc Architecture field contents are.
>
> --
> Russ Allbery (r...@debian.org)   

Perhaps inclusive 'or' is meant here. That's the impression I get from reading 
this.

Perhaps a footnote saying "Here 'or' is meant inclusively" should be added.

-- 
Regards,
Andres


-- 
To UNSUBSCRIBE, email to debian-dpkg-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: Architecture in *.dsc files

2009-05-26 Thread Russ Allbery
Jonathan Yu  writes:

> This is probably a stupid question, but...
>
> On Tue, May 26, 2009 at 11:33 PM, Russ Allbery  wrote:
>> Currently, Policy's description of Architecture includes the statement:
>>
>>In the main debian/control file in the source package, or in the
>>source package control file .dsc, one may specify a list of
>>architectures separated by spaces, or the special values any or all.
>>
>> By my reading, this says that the Architecture field may be *either* a
>> list of architectures *or* one of any or all.  However, the current
>> dpkg-dev appears to generate an Architecture line that includes both
>> architectures and special values like "all".
>
> I'm curious, which package(s) do this? What is the idea of doing so?
> Is it like saying, "build specially on these architectures; otherwise
> just use 'all'"? Or am I missing the point of it completely?

I noticed it with the openafs package, whose compiled code only works
with a restricted set of architectures but which also includes a
documentation package that's arch: all.

The Architecture field in the .dsc file isn't something that the package
is responsible for.  dpkg-dev creates it based on the Architecture
fields in debian/control.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=526617 appears to be
the relevant change.  I have no problem with this change -- it looks
correct to me.  It just means the Policy wording is wrong, and I'd
rather get a definitive statement about what Policy *should* say and
what the meaning of possible .dsc Architecture field contents are.

-- 
Russ Allbery (r...@debian.org)   


-- 
To UNSUBSCRIBE, email to debian-dpkg-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: Architecture in *.dsc files

2009-05-26 Thread Jonathan Yu
Hi:

This is probably a stupid question, but...

On Tue, May 26, 2009 at 11:33 PM, Russ Allbery  wrote:
> Currently, Policy's description of Architecture includes the statement:
>
>    In the main debian/control file in the source package, or in the
>    source package control file .dsc, one may specify a list of
>    architectures separated by spaces, or the special values any or all.
>
> By my reading, this says that the Architecture field may be *either* a
> list of architectures *or* one of any or all.  However, the current
> dpkg-dev appears to generate an Architecture line that includes both
> architectures and special values like "all".

I'm curious, which package(s) do this? What is the idea of doing so?
Is it like saying, "build specially on these architectures; otherwise
just use 'all'"? Or am I missing the point of it completely?
>
> I can see why this was done, and I think it's a more accurate portrayal
> of what the source package generates.  However, it means that Policy is
> wrong and needs to be changed.
>
> What should it say instead?  I assume that the current language should
> be retained for debian/control, but the specification for .dsc is now
> different.
>
> --
> Russ Allbery (r...@debian.org)               
>
>
> --
> To UNSUBSCRIBE, email to debian-dpkg-requ...@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
>
>


--
To UNSUBSCRIBE, email to debian-dpkg-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Architecture in *.dsc files

2009-05-26 Thread Russ Allbery
Currently, Policy's description of Architecture includes the statement:

In the main debian/control file in the source package, or in the
source package control file .dsc, one may specify a list of
architectures separated by spaces, or the special values any or all.

By my reading, this says that the Architecture field may be *either* a
list of architectures *or* one of any or all.  However, the current
dpkg-dev appears to generate an Architecture line that includes both
architectures and special values like "all".

I can see why this was done, and I think it's a more accurate portrayal
of what the source package generates.  However, it means that Policy is
wrong and needs to be changed.

What should it say instead?  I assume that the current language should
be retained for debian/control, but the specification for .dsc is now
different.

-- 
Russ Allbery (r...@debian.org)   


-- 
To UNSUBSCRIBE, email to debian-dpkg-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org