Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in eclass: cdrom.eclass

2012-01-18 Thread Mike Frysinger
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


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in eclass: cdrom.eclass

2012-01-18 Thread Ulrich Mueller
 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



Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in eclass: cdrom.eclass

2012-01-18 Thread Mike Frysinger
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


signature.asc
Description: This is a digitally signed message part.


[gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in eclass: cdrom.eclass

2012-01-14 Thread Ulrich Mueller
 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 u...@gentoo.org +cdrom.eclass:
  New cdrom.eclass, split out CD-ROM functions from eutils.eclass.



Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in eclass: cdrom.eclass

2012-01-14 Thread Ulrich Mueller
 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.

[[ -n ${CDROM_DISABLE_PROPERTIES} ]] || PROPERTIES=interactive



Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in eclass: cdrom.eclass

2012-01-14 Thread Paweł Hajdan, Jr.
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)



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in eclass: cdrom.eclass

2012-01-14 Thread Michael Sterrett
Can you give an example of how you think it would be used in an ebuild?

2012/1/14 Paweł Hajdan, Jr. phajdan...@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)




Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in eclass: cdrom.eclass

2012-01-14 Thread Ulrich Mueller
 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.

 2012/1/14 Paweł Hajdan, Jr. phajdan...@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)



[gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in eclass: cdrom.eclass

2012-01-13 Thread Markos Chandras
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

On 01/13/2012 10:35 PM, Ulrich Mueller (ulm) wrote:
 Don't set PROPERTIES=interactive, bug 398809.
Please do not forget to update the ChangeLog file.

- -- 
Regards,
Markos Chandras / Gentoo Linux Developer / Key ID: B4AFF2C2
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.18 (GNU/Linux)

iQIcBAEBCgAGBQJPEL/qAAoJEPqDWhW0r/LCMKIP/1RPiUUjMcBkBRzUBWq2hPIu
jsdHgPj6MmEr3A4Pcj5HVIYSM9mhZmPQ0YS5EOqaN/x07f1xfMw+Tj9YaMNfURmX
PGiFhRiAAe669I3LDIeppf5ofkj7P7VwUzg/0vLFNpVRabYO/jFYwVhz3d9d6rO/
/bKMIuNj++yWdygcxwkPMC2w+dI/0aof6kp4tg8mB6wtnDRyrRTNpX5gWDjAstyI
siRpqlofEHFKyKfNdOUAqX/zQvV2jr0tgvgb8N402yO788TkVgVf8Rf1V5gCs2/7
9QYv7epWOvBnDHqHOe6kq/aYeoIwtbr8lwepZo8qrFqk6e0nupqFxQj9mIKNs4L8
hahbftZCJPwyRhQS4mQt/fBykcf5nFP9PvapjXFrsjbbcwZ1ic8+Ru1rhOMTxYXZ
lBzawNkOY7SMxdy+g7kTu8mhDmTaS3ZJXeDP+voxDm0u5GMALHJa59o5DnqZRNeq
JMujYCbq4SsfKF/ogoXhlyRpzMyWRG4hfnMweTVKHEwuxOquNGKmoqJoePitpsCX
w/x/3v8TuhbI8q/lNlSpjBq8zOrQpcbXZ9LtAhRvhYuD4g1umR38VKt4AYmRhPEp
6+09nBTSyeXYE5Inj6zL6vHFGl21/QNi81HHnAvaA/GAwCsr8UL7yHlfGA5E9afd
DNC4XZBIGKwpcjtpAdzg
=4SPn
-END PGP SIGNATURE-



Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in eclass: cdrom.eclass

2012-01-13 Thread Paweł Hajdan, Jr.
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).



signature.asc
Description: OpenPGP digital signature