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: > foo > elif vendor is Debian: > bar > you face a problem when you meet: > else: > > 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 endif 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-policy-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org