FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 10-08-2010, 03:08 AM
Donnie Berkholz
 
Default New eclass: scons.eclass

On 20:26 Wed 06 Oct , Michał Górny wrote:
> On Wed, 6 Oct 2010 12:52:33 -0500
> Donnie Berkholz <dberkholz@gentoo.org> wrote:
>
> > > local flag=${1}
> > > local varname=${2:-${flag#!}}
> >
> > Could you explain how this works to me, please? It seems like you're
> > reversing the logic when people use the !flag syntax.
>
> It's just the variable (macro) name; the 'flag' var passes ! to use.
> This stripping is just intended to avoid outputting things like
> '!ssl=1' by default, and avoid guesses like 'nossl'.

So what happens if I want the !use syntax and say `use_scons !ssl
nossl`?

--
Thanks,
Donnie

Donnie Berkholz
Sr. Developer, Gentoo Linux
Blog: http://dberkholz.wordpress.com
 
Old 10-08-2010, 05:35 AM
Michał Górny
 
Default New eclass: scons.eclass

On Thu, 7 Oct 2010 22:08:30 -0500
Donnie Berkholz <dberkholz@gentoo.org> wrote:

> So what happens if I want the !use syntax and say `use_scons !ssl
> nossl`?

${2} is set then, and ${flag#!} isn't even evaluated.

BTW I've changed that already to make $(use_scons !ssl) output nossl.
This should be more logical.

--
Best regards,
Michał Górny
 
Old 10-11-2010, 04:11 PM
Donnie Berkholz
 
Default New eclass: scons.eclass

On 07:35 Fri 08 Oct , Michał Górny wrote:
> On Thu, 7 Oct 2010 22:08:30 -0500
> Donnie Berkholz <dberkholz@gentoo.org> wrote:
>
> > So what happens if I want the !use syntax and say `use_scons !ssl
> > nossl`?
>
> ${2} is set then, and ${flag#!} isn't even evaluated.

Oh, right. I'd kind of lost track of the context.

> BTW I've changed that already to make $(use_scons !ssl) output nossl.
> This should be more logical.

Great. The change you've made now addresses my concern with the logic.
At least it will never enable a feature with a !flag.

--
Thanks,
Donnie

Donnie Berkholz
Sr. Developer, Gentoo Linux
Blog: http://dberkholz.wordpress.com
 

Thread Tools




All times are GMT. The time now is 01:03 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org