On 1/14/12 12:36 AM, Markos Chandras wrote:
> On 01/13/2012 10:35 PM, Ulrich Mueller (ulm) wrote:
>> Don't set PROPERTIES=interactive, bug 398809.
How about this: set PROPERTIES=interactive by default (so it's difficult
to forget it), but allow the ebuilds to specify a USE flag in case the
interactive behavior is optional (maybe similar to subversion.eclass,
python.eclass or other eclasses, where the main dependency can also be
made optional based on a USE flag).
01-14-2012, 09:15 AM
Ulrich Mueller
gentoo-x86 commit in eclass: cdrom.eclass
>>>>> On Fri, 13 Jan 2012, Markos Chandras wrote:
> Please do not forget to update the ChangeLog file.
It's covered by this entry:
13 Jan 2012; Ulrich Müller <ulm@gentoo.org> +cdrom.eclass:
New cdrom.eclass, split out CD-ROM functions from eutils.eclass.
01-14-2012, 10:21 AM
Ulrich Mueller
gentoo-x86 commit in eclass: cdrom.eclass
>>>>> On Sat, 14 Jan 2012, Paweł Hajdan, Jr. wrote:
>>> Don't set PROPERTIES=interactive, bug 398809.
> How about this: set PROPERTIES=interactive by default (so it's
> difficult to forget it), but allow the ebuilds to specify a USE flag
> in case the interactive behavior is optional (maybe similar to
> subversion.eclass, python.eclass or other eclasses, where the main
> dependency can also be made optional based on a USE flag).
It can't be a USE flag, but something like the following might work:
# @ECLASS-VARIABLE: CDROM_DISABLE_PROPERTIES
# @DEFAULT_UNSET
# @DESCRIPTION:
# By default, the eclass sets PROPERTIES="interactive".
# A non-empty value of CDROM_DISABLE_PROPERTIES suppresses this.
Can you give an example of how you think it would be used in an ebuild?
2012/1/14 "Paweł Hajdan, Jr." <phajdan.jr@gentoo.org>:
> On 1/14/12 12:21 PM, Ulrich Mueller wrote:
>> It can't be a USE flag, but something like the following might work:
>>
>> # @ECLASS-VARIABLE: CDROM_DISABLE_PROPERTIES
>> # @DEFAULT_UNSET
>> # @DESCRIPTION:
>> # By default, the eclass sets PROPERTIES="interactive".
>> # A non-empty value of CDROM_DISABLE_PROPERTIES suppresses this.
>>
>> [[ -n ${CDROM_DISABLE_PROPERTIES} ]] || PROPERTIES="interactive"
>
> LGTM (looks good to me)
>
01-14-2012, 03:03 PM
Ulrich Mueller
gentoo-x86 commit in eclass: cdrom.eclass
>>>>> On Sat, 14 Jan 2012, Michael Sterrett wrote:
> Can you give an example of how you think it would be used in an
> ebuild?
It would be required for 7 out of the 36 packages that use cdrom
functions.
> 2012/1/14 "Paweł Hajdan, Jr." <phajdan.jr@gentoo.org>:
>> On 1/14/12 12:21 PM, Ulrich Mueller wrote:
>>> It can't be a USE flag, but something like the following might work:
>>>
>>> # @ECLASS-VARIABLE: CDROM_DISABLE_PROPERTIES
>>> # @DEFAULT_UNSET
>>> # @DESCRIPTION:
>>> # By default, the eclass sets PROPERTIES="interactive".
>>> # A non-empty value of CDROM_DISABLE_PROPERTIES suppresses this.
>>>
>>> [[ -n ${CDROM_DISABLE_PROPERTIES} ]] || PROPERTIES="interactive"
>>
>> LGTM (looks good to me)
01-18-2012, 10:26 AM
Mike Frysinger
gentoo-x86 commit in eclass: cdrom.eclass
On Saturday 14 January 2012 11:03:18 Ulrich Mueller wrote:
> >>>>> On Sat, 14 Jan 2012, Michael Sterrett wrote:
> > Can you give an example of how you think it would be used in an
> > ebuild?
>
> For example, like this:
>
> CDROM_DISABLE_PROPERTIES=1
> inherit [...] cdrom
>
> IUSE="cdinstall"
> PROPERTIES="cdinstall? ( interactive )"
>
> It would be required for 7 out of the 36 packages that use cdrom
> functions.
since USE=cdinstall has been our standard, then perhaps we should codify that
in the eclass. are there ebuilds that set CDROM_DISABLE_PROPERTIES and don't
have IUSE=cdinstall ?
ebuild:
CDROM_OPTIONAL="yes"
inherit cdrom
eclass:
if [[ ${CDROM_OPTIONAL} == "yes" ]] ; then
PROPERTIES="cdinstall? ( interactive )"
else
PROPERTIES="interactive"
fi
IUSE="cdinstall"
-mike
01-18-2012, 10:45 AM
Ulrich Mueller
gentoo-x86 commit in eclass: cdrom.eclass
>>>>> On Wed, 18 Jan 2012, Mike Frysinger wrote:
>> CDROM_DISABLE_PROPERTIES=1
>> inherit [...] cdrom
>>
>> IUSE="cdinstall"
>> PROPERTIES="cdinstall? ( interactive )"
>>
>> It would be required for 7 out of the 36 packages that use cdrom
>> functions.
> since USE=cdinstall has been our standard, then perhaps we should codify that
> in the eclass. are there ebuilds that set CDROM_DISABLE_PROPERTIES and don't
> have IUSE=cdinstall ?
Indeed, all of them have PROPERTIES="cdinstall? ( interactive )".
> ebuild:
> CDROM_OPTIONAL="yes"
> inherit cdrom
> eclass:
> if [[ ${CDROM_OPTIONAL} == "yes" ]] ; then
> PROPERTIES="cdinstall? ( interactive )"
> else
> PROPERTIES="interactive"
> fi
> IUSE="cdinstall"
Looks good, except that I would move the IUSE line into the "then"
clause.
Ulrich
01-18-2012, 10:57 AM
Mike Frysinger
gentoo-x86 commit in eclass: cdrom.eclass
On Wednesday 18 January 2012 06:45:59 Ulrich Mueller wrote:
> >>>>> On Wed, 18 Jan 2012, Mike Frysinger wrote:
> > ebuild:
> > CDROM_OPTIONAL="yes"
> > inherit cdrom
> >
> > eclass:
> > if [[ ${CDROM_OPTIONAL} == "yes" ]] ; then
> > PROPERTIES="cdinstall? ( interactive )"
> > else
> > PROPERTIES="interactive"
> > fi
> > IUSE="cdinstall"
>
> Looks good, except that I would move the IUSE line into the "then"
> clause.
err, yeah. i'll commit this proposal so you don't have to be on the hook for
the breakage .
-mike