Re: [gentoo-dev] Re: RFC: qt.eclass

2005-07-03 Thread Brian D. Harring
On Sat, Jul 02, 2005 at 01:43:43PM +0200, foser wrote: On Fri, 2005-07-01 at 18:33 +0300, Dan Armak wrote: calling a function in a global scope is a bad idea. it leads to lots of unneccessary (and timely) computations Necessary in the case of kde split ebuilds. Take a look at

Re: [gentoo-dev] Re: RFC: qt.eclass

2005-07-02 Thread Marius Mauch
On Sat, 2 Jul 2005 00:00:38 +0300 Dan Armak [EMAIL PROTECTED] wrote: On Friday 01 July 2005 23:19, Paul de Vrieze wrote: It also makes any attempts to parse ebuilds without using bash (our current strategy) a lot harder (actually causing bash reimplementation) You mean you're actually

Re: [gentoo-dev] Re: RFC: qt.eclass

2005-07-02 Thread foser
On Fri, 2005-07-01 at 18:33 +0300, Dan Armak wrote: calling a function in a global scope is a bad idea. it leads to lots of unneccessary (and timely) computations Necessary in the case of kde split ebuilds. Take a look at kde-functions.eclass::deprange(). So you create functions to do

Re: [gentoo-dev] Re: RFC: qt.eclass

2005-07-02 Thread Dan Armak
On Saturday 02 July 2005 14:43, foser wrote: On Fri, 2005-07-01 at 18:33 +0300, Dan Armak wrote: calling a function in a global scope is a bad idea. it leads to lots of unneccessary (and timely) computations Necessary in the case of kde split ebuilds. Take a look at

Re: [gentoo-dev] Re: RFC: qt.eclass

2005-07-02 Thread Paul de Vrieze
On Friday 01 July 2005 23:00, Dan Armak wrote: On Friday 01 July 2005 23:19, Paul de Vrieze wrote: On Friday 01 July 2005 17:14, Jonathan Smith wrote: Thomas de Grenier de Latour wrote: Btw, what's wrong with the `DEPEND=$(your_function) || die` i've proposed? Using a return

Re: [gentoo-dev] Re: RFC: qt.eclass

2005-07-01 Thread Dan Armak
On Friday 01 July 2005 00:38, Aron Griffis wrote: Dan Armak wrote: [Thu Jun 30 2005, 05:11:10PM EDT] Instead of 'exit 1', qt_min_version should use die. I use that in deprange and it does work inside $DEPEND. Well, it's more visible, but it doesn't stop the emerge. I just put

Re: [gentoo-dev] Re: RFC: qt.eclass

2005-07-01 Thread Paul de Vrieze
On Thursday 30 June 2005 23:11, Dan Armak wrote: Instead of 'exit 1', qt_min_version should use die. I use that in deprange and it does work inside $DEPEND. Wouldn't this be a good time to implement actual dependency ranges in portage. Btw. I normally use the following hack that portage might

Re: [gentoo-dev] Re: RFC: qt.eclass

2005-07-01 Thread Dan Armak
On Friday 01 July 2005 12:15, Paul de Vrieze wrote: On Thursday 30 June 2005 23:11, Dan Armak wrote: Instead of 'exit 1', qt_min_version should use die. I use that in deprange and it does work inside $DEPEND. Wouldn't this be a good time to implement actual dependency ranges in portage.

Re: [gentoo-dev] Re: RFC: qt.eclass

2005-07-01 Thread Paul de Vrieze
On Friday 01 July 2005 14:28, Dan Armak wrote: On Friday 01 July 2005 12:15, Paul de Vrieze wrote: On Thursday 30 June 2005 23:11, Dan Armak wrote: Instead of 'exit 1', qt_min_version should use die. I use that in deprange and it does work inside $DEPEND. Wouldn't this be a good time

Re: [gentoo-dev] Re: RFC: qt.eclass

2005-07-01 Thread Francesco R
Francesco R wrote: [snip] s/ # example: ###MY_VER_RANGE 4.0 4.0.16 ###MY_VER_RANGE 4.1 4.1.4 ###MY_VER_RANGE 5.0 # if a patch contains these three lines then: # all version = 4.0 but 4.0.16, # all version = 4.1 but 4.0.16, # all version = 5.0 will be affected by this patch / example:

Re: [gentoo-dev] Re: RFC: qt.eclass

2005-07-01 Thread Dan Armak
On Friday 01 July 2005 16:56, Aron Griffis wrote: Dan Armak wrote: [Fri Jul 01 2005, 03:42:22AM EDT] ...OK, so deprange() needs to signal errors out-of-band. Like setting a KM_ERROR variable which causes the eclass to abort later on. Heh, doesn't work for the same reason you can't

Re: [gentoo-dev] Re: RFC: qt.eclass

2005-07-01 Thread Caleb Tennis
On Friday 01 July 2005 08:56 am, Aron Griffis wrote: How about this? ebuild: DEPEND=some stuff qt_min_dep 3.3 How do you handle the ebuilds which use the qt use flag to determine whether or not that qt is a dependency? Caleb -- gentoo-dev@gentoo.org mailing list

Re: [gentoo-dev] Re: RFC: qt.eclass

2005-07-01 Thread Thomas de Grenier de Latour
On Fri, 1 Jul 2005 17:45:57 +0300 Dan Armak [EMAIL PROTECTED] wrote: I'd rather signal failure to code outside the subshell by touching a file in $T. The ${T} directory does not exists when portage source an ebuild to get its metadatas, so I'm not sure that's a good idea. Btw, what's

Re: [gentoo-dev] Re: RFC: qt.eclass

2005-07-01 Thread Jonathan Smith
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thomas de Grenier de Latour wrote: Btw, what's wrong with the `DEPEND=$(your_function) || die` i've proposed? Using a return code seems to be the simplest way to signal a failure, no? calling a function in a global scope is a bad idea. it

Re: [gentoo-dev] Re: RFC: qt.eclass

2005-07-01 Thread Dan Armak
On Friday 01 July 2005 18:14, Jonathan Smith wrote: - gpg control packet Thomas de Grenier de Latour wrote: Btw, what's wrong with the `DEPEND=$(your_function) || die` i've proposed? Using a return code seems to be the simplest way to signal a failure, no? calling a function in a

Re: [gentoo-dev] Re: RFC: qt.eclass

2005-07-01 Thread Dan Armak
On Friday 01 July 2005 18:03, Thomas de Grenier de Latour wrote: On Fri, 1 Jul 2005 17:45:57 +0300 Dan Armak [EMAIL PROTECTED] wrote: I'd rather signal failure to code outside the subshell by touching a file in $T. The ${T} directory does not exists when portage source an ebuild to get

Re: [gentoo-dev] Re: RFC: qt.eclass

2005-07-01 Thread Paul de Vrieze
On Friday 01 July 2005 17:14, Jonathan Smith wrote: Thomas de Grenier de Latour wrote: Btw, what's wrong with the `DEPEND=$(your_function) || die` i've proposed? Using a return code seems to be the simplest way to signal a failure, no? calling a function in a global scope is a bad

Re: [gentoo-dev] Re: RFC: qt.eclass

2005-07-01 Thread Dan Armak
On Friday 01 July 2005 23:19, Paul de Vrieze wrote: On Friday 01 July 2005 17:14, Jonathan Smith wrote: Thomas de Grenier de Latour wrote: Btw, what's wrong with the `DEPEND=$(your_function) || die` i've proposed? Using a return code seems to be the simplest way to signal a

Re: [gentoo-dev] Re: RFC: qt.eclass

2005-07-01 Thread Aron Griffis
Dan Armak wrote:[Fri Jul 01 2005, 10:45:57AM EDT] Would work, but be against the general move to make the general ebuild section purely declarative :-( Ok, but DEPEND=$(some-function) is no more declarative. The function is evaluated at the time that the ebuild is read, not later when

Re: [gentoo-dev] Re: RFC: qt.eclass

2005-07-01 Thread Aron Griffis
Caleb Tennis wrote:[Fri Jul 01 2005, 10:48:38AM EDT] On Friday 01 July 2005 08:56 am, Aron Griffis wrote: How about this? ebuild: DEPEND=some stuff qt_min_dep 3.3 How do you handle the ebuilds which use the qt use flag to determine whether or not that qt is a dependency?

Re: [gentoo-dev] Re: RFC: qt.eclass

2005-06-30 Thread Dan Armak
On Thursday 30 June 2005 22:37, Michael Sterrett -Mr. Bones.- wrote: On Thu, 30 Jun 2005, Caleb Tennis wrote: Understandable, but I don't know any other way to do it. The function does nothing more than return a list of ebuild versions to make the depend happy. It doesn't rely on anything

Re: [gentoo-dev] Re: RFC: qt.eclass

2005-06-30 Thread Aron Griffis
Dan Armak wrote:[Thu Jun 30 2005, 04:06:03PM EDT] Because the function takes a parameter - the minimal version required from which to start the list in the ||. Makes sense. Any everyone who thinks functions inside $DEPEND are iffy should look at deprange() and deprange-dual()... /me

Re: [gentoo-dev] Re: RFC: qt.eclass

2005-06-30 Thread Caleb Tennis
On Thursday 30 June 2005 03:36 pm, Aron Griffis wrote: See the problem? It didn't exit. That's what will happen if a function in DEPEND fails: nothing. Except that yours will currently stick this in DEPEND: !!! error: qt_min_version called with invalid parameter: \$1\, please

Re: [gentoo-dev] Re: RFC: qt.eclass

2005-06-30 Thread Mike Frysinger
On Thursday 30 June 2005 04:42 pm, Caleb Tennis wrote: On Thursday 30 June 2005 03:36 pm, Aron Griffis wrote: See the problem? It didn't exit. That's what will happen if a function in DEPEND fails: nothing. Except that yours will currently stick this in DEPEND: !!! error:

Re: [gentoo-dev] Re: RFC: qt.eclass

2005-06-30 Thread Dan Armak
On Thursday 30 June 2005 23:36, Aron Griffis wrote: Dan Armak wrote: [Thu Jun 30 2005, 04:06:03PM EDT] Because the function takes a parameter - the minimal version required from which to start the list in the ||. Makes sense. Any everyone who thinks functions inside $DEPEND are