Hello,

On penktadienis 29 Liepa 2011 15:24:10 Raphael Hertzog wrote:
> On Mon, 25 Jul 2011, Modestas Vainius wrote:
> > What do you think about taking this further and supporting expressions
> > like cpuattr:value (or cpuattr-value, or cpuattr=value, or whatever
> > other syntax) in the architecture wildcards (Dpkg::Arch::debarch_is()).
> > In this particular case:
> > 
> > * endian:little and endian:big
> > * bits:32 and bits:64
> > 
> > As a result, arch symbol tag, [] expressions and Architecture fields in
> > debian/control etc. would gain support for this automatically. In my
> > opinion, this would be more flexible in the long term.
> 
> The idea seems nice but I'm not sure it's going to make the implementation
> any cleaner. 

Yeah, probably implementation won't be cleaner (but neither complex) however, 
in my opinion, this would improve flexibility of the expression itself. For 
example, size_t expands to 'long' on all 64-bit arches and s390. This could 
expressed as:

(arch=cpubits-64 s390)

Likewise, it would be possible to match an arch in the negation manner. E.g. 
all 64bit arches on linux:

(arch=!cpubits-32 linux-any !any)

I must admit, the latter isn't a very trivial and obvious expression but still 
a possibility. Could we improve it?

Now if this was as:

(arch=s390|bits=64)

it might look a bit confusing. Sure, "|" here is a tag separator but most will 
assume it to be a disjunction so it would a be mistake to imply anything else. 
This would leave us no way to implement negation.

> And I don't see really the need for it in other places where
> we currently use architecture wildcards.

I agree. I couldn't think of any real world example either. I just want an 
expression to be powerful enough as weird arch-specific symbols are not a very 
rare case.

-- 
Modestas Vainius <mo...@debian.org>

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to