Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-portage-dev
Navigation:
Lists: gentoo-portage-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-portage-dev@g.o
From: Johannes Fahrenkrug <jfa@...>
Subject: Re: emerge-webrsync patch
Date: Mon, 23 Jan 2006 12:39:06 +0100
Brian,

did you have a chance to look at this yet?

- Johannes.

Johannes Fahrenkrug wrote:

> Brian Harring wrote:
>
>> On Wed, Jan 11, 2006 at 10:15:00AM +0100, Johannes Fahrenkrug wrote:
>>  
>>
>>> if [[ -n $PORTAGE_NICENESS ]] && ! [[ -z $WE_ARE_NICED ]]; then
>>>   
>>
>>
>> Haven't looked at the patch yet, but a bit of bash fu for ya-
>>
>> [[ -n $VAR ]] == ! [[ -z $VAR ]]
>>
>> -z is zero length or unset, -n is length >= 1 (thus must be set).
>>  
>>
> Exactly!
> This code ...
>
> If  [[ -n $VAR ]] == ! [[ -z $VAR ]] (which it is) then
>    export WE_ARE_NICED=1
>    exec nice -n "$PORTAGE_NICENESS" "$0" "$@"
> fi
>
> ...has the purpose to execute the current script again with
> nice if PORTAGE_NICENESS is set and WE_ARE_NICED is not set (to avoid 
> an infinite loop).
> Right?
>
> If...
>
> if [[ -n $PORTAGE_NICENESS ]] && ! [[ -z $WE_ARE_NICED ]]; then
>
> ...is the same as...
>
> if [[ -n $PORTAGE_NICENESS ]] && [[ -n $WE_ARE_NICED ]]; then
>
> ...then that would mean that the condition is only met when both 
> PORTAGE_NICENESS
> and WE_ARE_NICED are set. But WE_ARE_NICED is only set inside the 
> if-body. So
> I think the condition should read
> if [[ -n $PORTAGE_NICENESS ]] &&  [[ -z $WE_ARE_NICED ]]; then
> meaning the condition is only met when PORTAGE_NICENESS is set and 
> WE_ARE_NICED is NOT set.
>
> Maybe I'm completely wrong here, but I think that's the only way the 
> condition makes sense.
> Please enlighten me if I'm wrong :)
>
> - Johannes.
>
>   


-- 
gentoo-portage-dev@g.o mailing list


Replies:
Re: emerge-webrsync patch
-- Brian Harring
References:
emerge-webrsync patch
-- Johannes Fahrenkrug
Re: emerge-webrsync patch
-- Paul Varner
Re: emerge-webrsync patch
-- Johannes Fahrenkrug
Re: emerge-webrsync patch
-- Brian Harring
Re: emerge-webrsync patch
-- Johannes Fahrenkrug
Re: emerge-webrsync patch
-- Brian Harring
Re: emerge-webrsync patch
-- Johannes Fahrenkrug
Re: emerge-webrsync patch
-- Johannes Fahrenkrug
Re: emerge-webrsync patch
-- Brian Harring
Re: emerge-webrsync patch
-- Johannes Fahrenkrug
Re: emerge-webrsync patch
-- Brian Harring
Re: emerge-webrsync patch
-- Johannes Fahrenkrug
Navigation:
Lists: gentoo-portage-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: emerge-webrsync patch
Next by thread:
Re: emerge-webrsync patch
Previous by date:
Re: Re: Plausible idea for GLEP 19?
Next by date:
Re: making aux_get more usable for vardbapi


Updated Jun 17, 2009

Summary: Archive of the gentoo-portage-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.