Re: Build-Depend'ing on libasound2-dev just for Linux
Guillem Jover <email@example.com> writes:
> On Fri, Sep 16, 2005 at 09:09:25AM +0200, Josselin Mouette wrote:
>> Le vendredi 16 septembre 2005 à 00:33 +0200, Aurelien Jarno a écrit :
>> > It is maybe a crazy idea, but it is the only one that work. What you
>> > suggest simply doesn't work, as not+linux is a provided package, and the
>> > autobuilders are not able to see it. In short a package with such a
>> > build-dependency will FTBFS on non linux architectures, if built by an
>> > autobuilder.
>> In this case, it is enough to do something like:
>> Build-Depends: type-handling, libasound2-dev | not+linux-gnu
> No, that's too late, the Build-Depends are analyzed before installing
> them. You'd need some kind of ugly Build-PreDepends or similar.
That isn't the problem at all.
There are 2 problems here:
1. 'Build-Depends: A | B' means the buildd installs A. B is never
considered when looking for something to install.
2. not+linux-gnu is a virtual package and Build-Depends then can cause
apt errors. The official buildd software works around the problem but
apt-get build-dep (as a user might run) won't.
This isn't fatal but anoying.
> So type-handling is broken, do not use it. We (the GNU/kFreeBSD team)
> have adopted it and will push for its removal once dpkg gets the
> needed functionality.
It isn't the fault of type-handling. This is just the way
Build-Depends are ment to work.
To make it behave the way you wanted you need to generate a control.new
file on the fly in clean with type-handling output and fail if that
file differs from control.
It is also nice to have a traget "debian/control" that generates
control.new and copies it over control. But this must not be done
automaticaly as at that point it would be too late.
PS: yes, this sort of sucks.