Gentoo Archives: gentoo-dev

From: Ulrich Mueller <ulm@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in eclass: cdrom.eclass
Date: Sat, 14 Jan 2012 16:04:13
Message-Id: 20241.42822.751764.24430@a1i15.kph.uni-mainz.de
In Reply to: Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in eclass: cdrom.eclass by Michael Sterrett
1 >>>>> On Sat, 14 Jan 2012, Michael Sterrett wrote:
2
3 > Can you give an example of how you think it would be used in an
4 > ebuild?
5
6 For example, like this:
7
8 CDROM_DISABLE_PROPERTIES=1
9 inherit [...] cdrom
10
11 IUSE="cdinstall"
12 PROPERTIES="cdinstall? ( interactive )"
13
14 It would be required for 7 out of the 36 packages that use cdrom
15 functions.
16
17 > 2012/1/14 "Pawe³ Hajdan, Jr." <phajdan.jr@g.o>:
18 >> On 1/14/12 12:21 PM, Ulrich Mueller wrote:
19 >>> It can't be a USE flag, but something like the following might work:
20 >>>
21 >>> # @ECLASS-VARIABLE: CDROM_DISABLE_PROPERTIES
22 >>> # @DEFAULT_UNSET
23 >>> # @DESCRIPTION:
24 >>> # By default, the eclass sets PROPERTIES="interactive".
25 >>> # A non-empty value of CDROM_DISABLE_PROPERTIES suppresses this.
26 >>>
27 >>> [[ -n ${CDROM_DISABLE_PROPERTIES} ]] || PROPERTIES="interactive"
28 >>
29 >> LGTM (looks good to me)

Replies