Re: DEB_VENDOR and forks
Raphael Hertzog schrieb:
> On Wed, 18 Mar 2009, Loïc Minier wrote:
>> If you implement conditional behavior in your rules, typically based on
>> lsb_release -is output:
>> if vendor is Ubuntu:
>> elif vendor is Debian:
>> you face a problem when you meet:
>> What behavior should one use here?
> Debian should always be the "else" because it's the default case. It
> ensures that the lack of DEB_VENDOR results in correct package and
> also that any unknown derivatives get the Debian behaviour.
> Of course an Ubuntu derivative could be surprised if they get
> a Debian-variant of a package instead of an Ubuntu-variant… this explains
> your other remark:
>> Instead, I think it would be nice if we could express some inheritance
>> concept so that you can have conditional behavior in rules based on
>> either "this distribution and its derivatives" or "only for this exact
>> distribution" and logical combinations such as "derivatives of Foo
>> except derivatives of Bar".
> I see how we can solve it (add new fields in /etc/dpkg/origins/* to
> describe parent relationship, and create a new tool to query those
> meta-information) but I wonder what impact you expect it would have
> on the decision of exporting DEB_VENDOR in the build environment.
> Would you like a DEB_VENDORS="Gobuntu Ubuntu Debian" or similar
> so that no external tool is required ?
> ifneq (,$(filter Ubuntu,$(DEB_VENDORS)))
> # Ubuntu or derivative
what about a command is_derivative <DEB_VENDOR> which could be used instead?
This wouldn't hard-code any specific vendor names.