public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in app-doc/gimp-help: ChangeLog gimp-help-0.13.ebuild
       [not found] <E1IaN9Q-0006Qq-Hx@stork.gentoo.org>
@ 2007-09-26  6:17 ` Christian Faulhammer
  2007-09-26  8:07 ` Donnie Berkholz
  1 sibling, 0 replies; 11+ messages in thread
From: Christian Faulhammer @ 2007-09-26  6:17 UTC (permalink / raw
  To: hanno; +Cc: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 433 bytes --]

"Hanno Boeck (hanno)" <hanno@gentoo.org>:

>   Modified:             ChangeLog
>   Added:                gimp-help-0.13.ebuild
>   Log:
>   gimp-help version bump

> src_install() {
> 	make DESTDIR="${D}" install || die "make install failed"

 No emake here?

V-Li

-- 
Christian Faulhammer, Gentoo Lisp project
<URL:http://www.gentoo.org/proj/en/lisp/>, #gentoo-lisp on FreeNode

<URL:http://www.faulhammer.org/>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in app-doc/gimp-help: ChangeLog gimp-help-0.13.ebuild
       [not found] <E1IaN9Q-0006Qq-Hx@stork.gentoo.org>
  2007-09-26  6:17 ` [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in app-doc/gimp-help: ChangeLog gimp-help-0.13.ebuild Christian Faulhammer
@ 2007-09-26  8:07 ` Donnie Berkholz
  2007-09-26  8:36   ` Mike Frysinger
  1 sibling, 1 reply; 11+ messages in thread
From: Donnie Berkholz @ 2007-09-26  8:07 UTC (permalink / raw
  To: gentoo-dev, hanno

On 03:01 Wed 26 Sep     , Hanno Boeck (hanno) wrote:
> hanno       07/09/26 03:01:24
> 
>   Modified:             ChangeLog
>   Added:                gimp-help-0.13.ebuild
>   Log:
>   gimp-help version bump
>   (Portage version: 2.1.3.9)

> 1.1                  app-doc/gimp-help/gimp-help-0.13.ebuild
> 
> file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-doc/gimp-help/gimp-help-0.13.ebuild?rev=1.1&view=markup
> plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-doc/gimp-help/gimp-help-0.13.ebuild?rev=1.1&content-type=text/plain

> 	local ALL_LINGUAS=""
> 
> 	use linguas_cs && ALL_LINGUAS="${ALL_LINGUAS} cs"
> 	use linguas_de && ALL_LINGUAS="${ALL_LINGUAS} de"
> 	use linguas_en && ALL_LINGUAS="${ALL_LINGUAS} en"
> 	use linguas_es && ALL_LINGUAS="${ALL_LINGUAS} es"
> 	use linguas_fr && ALL_LINGUAS="${ALL_LINGUAS} fr"
> 	use linguas_hr && ALL_LINGUAS="${ALL_LINGUAS} hr"
> 	use linguas_it && ALL_LINGUAS="${ALL_LINGUAS} it"
> 	use linguas_ko && ALL_LINGUAS="${ALL_LINGUAS} ko"
> 	use linguas_nl && ALL_LINGUAS="${ALL_LINGUAS} nl"
> 	use linguas_no && ALL_LINGUAS="${ALL_LINGUAS} no"
> 	use linguas_ru && ALL_LINGUAS="${ALL_LINGUAS} ru"
> 	use linguas_sv && ALL_LINGUAS="${ALL_LINGUAS} sv"
> 	use linguas_zh_CN && ALL_LINGUAS="${ALL_LINGUAS} zh_CN"

I might define a custom function here to reduce duplication and increase 
readability.

use_linguas() {
	local lingua=$1
	use linguas_${lingua} && ALL_LINGUAS="${ALL_LINGUAS} ${lingua}"
}

And then..

use_linguas de
use_linguas en
...

Thanks,
Donnie
-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in app-doc/gimp-help: ChangeLog gimp-help-0.13.ebuild
  2007-09-26  8:07 ` Donnie Berkholz
@ 2007-09-26  8:36   ` Mike Frysinger
  2007-09-26  8:42     ` Donnie Berkholz
  0 siblings, 1 reply; 11+ messages in thread
From: Mike Frysinger @ 2007-09-26  8:36 UTC (permalink / raw
  To: gentoo-dev; +Cc: Donnie Berkholz, hanno

[-- Attachment #1: Type: text/plain, Size: 1753 bytes --]

On Wednesday 26 September 2007, Donnie Berkholz wrote:
> On 03:01 Wed 26 Sep     , Hanno Boeck (hanno) wrote:
> > hanno       07/09/26 03:01:24
> >
> >   Modified:             ChangeLog
> >   Added:                gimp-help-0.13.ebuild
> >   Log:
> >   gimp-help version bump
> >   (Portage version: 2.1.3.9)
> >
> > 1.1                  app-doc/gimp-help/gimp-help-0.13.ebuild
> >
> > file :
> > http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-doc/gimp-help/gimp-he
> >lp-0.13.ebuild?rev=1.1&view=markup plain:
> > http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-doc/gimp-help/gimp-he
> >lp-0.13.ebuild?rev=1.1&content-type=text/plain
> >
> > 	local ALL_LINGUAS=""
> >
> > 	use linguas_cs && ALL_LINGUAS="${ALL_LINGUAS} cs"
> > 	use linguas_de && ALL_LINGUAS="${ALL_LINGUAS} de"
> > 	use linguas_en && ALL_LINGUAS="${ALL_LINGUAS} en"
> > 	use linguas_es && ALL_LINGUAS="${ALL_LINGUAS} es"
> > 	use linguas_fr && ALL_LINGUAS="${ALL_LINGUAS} fr"
> > 	use linguas_hr && ALL_LINGUAS="${ALL_LINGUAS} hr"
> > 	use linguas_it && ALL_LINGUAS="${ALL_LINGUAS} it"
> > 	use linguas_ko && ALL_LINGUAS="${ALL_LINGUAS} ko"
> > 	use linguas_nl && ALL_LINGUAS="${ALL_LINGUAS} nl"
> > 	use linguas_no && ALL_LINGUAS="${ALL_LINGUAS} no"
> > 	use linguas_ru && ALL_LINGUAS="${ALL_LINGUAS} ru"
> > 	use linguas_sv && ALL_LINGUAS="${ALL_LINGUAS} sv"
> > 	use linguas_zh_CN && ALL_LINGUAS="${ALL_LINGUAS} zh_CN"
>
> I might define a custom function here to reduce duplication and increase
> readability.
>
> use_linguas() {
> 	local lingua=$1
> 	use linguas_${lingua} && ALL_LINGUAS="${ALL_LINGUAS} ${lingua}"
> }
>
> And then..
>
> use_linguas de
> use_linguas en
> ...

nice ... and to take it a step further:
for l in de en ... ; do use_linguas ${l} ; done
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 827 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in app-doc/gimp-help: ChangeLog gimp-help-0.13.ebuild
  2007-09-26  8:36   ` Mike Frysinger
@ 2007-09-26  8:42     ` Donnie Berkholz
  2007-09-26  8:51       ` Mike Frysinger
  0 siblings, 1 reply; 11+ messages in thread
From: Donnie Berkholz @ 2007-09-26  8:42 UTC (permalink / raw
  To: Mike Frysinger; +Cc: gentoo-dev, hanno

On 04:36 Wed 26 Sep     , Mike Frysinger wrote:
> On Wednesday 26 September 2007, Donnie Berkholz wrote:
> > I might define a custom function here to reduce duplication and increase
> > readability.
> >
> > use_linguas() {
> > 	local lingua=$1
> > 	use linguas_${lingua} && ALL_LINGUAS="${ALL_LINGUAS} ${lingua}"
> > }
> >
> > And then..
> >
> > use_linguas de
> > use_linguas en
> > ...
> 
> nice ... and to take it a step further:
> for l in de en ... ; do use_linguas ${l} ; done

And a step farther than that... =)

for USE in ${IUSE}; do
	[[ ${USE} = linguas_* ]] && use_linguas ${USE}
done

with a slightly different definition of use_linguas(). The benefit of 
this is that you only need to define the available languages in one 
place, so you don't need to worry about them getting out of sync. It 
would be a little more elegant if you had IUSE_LINGUAS, which was then 
included in IUSE, so you didn't need to do that test.

Thanks,
Donnie
-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in app-doc/gimp-help: ChangeLog gimp-help-0.13.ebuild
  2007-09-26  8:42     ` Donnie Berkholz
@ 2007-09-26  8:51       ` Mike Frysinger
  2007-09-26  9:03         ` Donnie Berkholz
  0 siblings, 1 reply; 11+ messages in thread
From: Mike Frysinger @ 2007-09-26  8:51 UTC (permalink / raw
  To: Donnie Berkholz; +Cc: gentoo-dev, hanno

[-- Attachment #1: Type: text/plain, Size: 951 bytes --]

On Wednesday 26 September 2007, Donnie Berkholz wrote:
> On 04:36 Wed 26 Sep     , Mike Frysinger wrote:
> > On Wednesday 26 September 2007, Donnie Berkholz wrote:
> > > I might define a custom function here to reduce duplication and
> > > increase readability.
> > >
> > > use_linguas() {
> > > 	local lingua=$1
> > > 	use linguas_${lingua} && ALL_LINGUAS="${ALL_LINGUAS} ${lingua}"
> > > }
> > >
> > > And then..
> > >
> > > use_linguas de
> > > use_linguas en
> > > ...
> >
> > nice ... and to take it a step further:
> > for l in de en ... ; do use_linguas ${l} ; done
>
> And a step farther than that... =)

even nicer

> for USE in ${IUSE}; do
> 	[[ ${USE} = linguas_* ]] && use_linguas ${USE}
> done

you dont want to use the variable 'USE' ... while it would work correctly if 
you declared it with 'local', it'd be confusing and repoman may just barf on 
it ($USE is supposed to be readonly for ebuilds)
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 827 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in app-doc/gimp-help: ChangeLog gimp-help-0.13.ebuild
  2007-09-26  8:51       ` Mike Frysinger
@ 2007-09-26  9:03         ` Donnie Berkholz
  2007-09-26  9:14           ` Mike Frysinger
  0 siblings, 1 reply; 11+ messages in thread
From: Donnie Berkholz @ 2007-09-26  9:03 UTC (permalink / raw
  To: gentoo-dev; +Cc: hanno

On 04:51 Wed 26 Sep     , Mike Frysinger wrote:
> On Wednesday 26 September 2007, Donnie Berkholz wrote:
> > for USE in ${IUSE}; do
> > 	[[ ${USE} = linguas_* ]] && use_linguas ${USE}
> > done
> 
> you dont want to use the variable 'USE' ... while it would work 
> correctly if you declared it with 'local', it'd be confusing and 
> repoman may just barf on it ($USE is supposed to be readonly for 
> ebuilds)

Ahh, reviewing is so fun and educational, it almost feels like I'm 
watching the Discovery channel. Although I'm not sure why $USE is 
directly accessible from ebuilds ... seems like it should only be 
accessible to use(). Implementation detail, or should it be part of the 
PMS?

Thanks,
Donnie
-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in app-doc/gimp-help: ChangeLog gimp-help-0.13.ebuild
  2007-09-26  9:03         ` Donnie Berkholz
@ 2007-09-26  9:14           ` Mike Frysinger
  2007-09-26  9:30             ` Donnie Berkholz
  0 siblings, 1 reply; 11+ messages in thread
From: Mike Frysinger @ 2007-09-26  9:14 UTC (permalink / raw
  To: gentoo-dev; +Cc: Donnie Berkholz, hanno

[-- Attachment #1: Type: text/plain, Size: 1006 bytes --]

On Wednesday 26 September 2007, Donnie Berkholz wrote:
> On 04:51 Wed 26 Sep     , Mike Frysinger wrote:
> > On Wednesday 26 September 2007, Donnie Berkholz wrote:
> > > for USE in ${IUSE}; do
> > > 	[[ ${USE} = linguas_* ]] && use_linguas ${USE}
> > > done
> >
> > you dont want to use the variable 'USE' ... while it would work
> > correctly if you declared it with 'local', it'd be confusing and
> > repoman may just barf on it ($USE is supposed to be readonly for
> > ebuilds)
>
> Ahh, reviewing is so fun and educational, it almost feels like I'm
> watching the Discovery channel. Although I'm not sure why $USE is
> directly accessible from ebuilds ... seems like it should only be
> accessible to use(). Implementation detail, or should it be part of the
> PMS?

if it's all common shell, it's pretty hard to hide ... you could try some 
tricks like rewriting USE to __USE__ so internal code (like the `use` 
function) still work, but in the end, does that really help ?
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 827 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in app-doc/gimp-help: ChangeLog gimp-help-0.13.ebuild
  2007-09-26  9:14           ` Mike Frysinger
@ 2007-09-26  9:30             ` Donnie Berkholz
  2007-09-27  6:33               ` Mike Frysinger
  2007-09-27 15:30               ` [gentoo-dev] " Steve Long
  0 siblings, 2 replies; 11+ messages in thread
From: Donnie Berkholz @ 2007-09-26  9:30 UTC (permalink / raw
  To: gentoo-dev; +Cc: hanno

On 05:14 Wed 26 Sep     , Mike Frysinger wrote:
> if it's all common shell, it's pretty hard to hide ... you could try some 
> tricks like rewriting USE to __USE__ so internal code (like the `use` 
> function) still work, but in the end, does that really help ?

I think so. It explicitly says that's private and not part of the API, 
and it makes accidental overwrites much more unlikely.

Thanks,
Donnie
-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in app-doc/gimp-help: ChangeLog gimp-help-0.13.ebuild
  2007-09-26  9:30             ` Donnie Berkholz
@ 2007-09-27  6:33               ` Mike Frysinger
  2007-09-27 15:17                 ` Hanno Böck
  2007-09-27 15:30               ` [gentoo-dev] " Steve Long
  1 sibling, 1 reply; 11+ messages in thread
From: Mike Frysinger @ 2007-09-27  6:33 UTC (permalink / raw
  To: gentoo-dev; +Cc: Donnie Berkholz, hanno

[-- Attachment #1: Type: text/plain, Size: 676 bytes --]

On Wednesday 26 September 2007, Donnie Berkholz wrote:
> On 05:14 Wed 26 Sep     , Mike Frysinger wrote:
> > if it's all common shell, it's pretty hard to hide ... you could try some
> > tricks like rewriting USE to __USE__ so internal code (like the `use`
> > function) still work, but in the end, does that really help ?
>
> I think so. It explicitly says that's private and not part of the API,
> and it makes accidental overwrites much more unlikely.

you cant accidentally do it now though ... there is a list of variables that 
repoman explicitly has marked so you cant set them (and i think portage 
declares them readonly now in the ebuild env ...)
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 827 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in app-doc/gimp-help: ChangeLog gimp-help-0.13.ebuild
  2007-09-27  6:33               ` Mike Frysinger
@ 2007-09-27 15:17                 ` Hanno Böck
  0 siblings, 0 replies; 11+ messages in thread
From: Hanno Böck @ 2007-09-27 15:17 UTC (permalink / raw
  To: Mike Frysinger; +Cc: gentoo-dev, Donnie Berkholz, Christian Faulhammer

[-- Attachment #1: Type: text/plain, Size: 336 bytes --]

Guys, it's nice that you have so interesting discussions, but let me just 
state that I haven't written this code. I just did a trivial copy-over-bump.

If anyone wants to improve the ebuild, feel free do go ahead and commit your 
changes.

-- 
Hanno Böck		Blog:   http://www.hboeck.de/
GPG: 3DBD3B20		Jabber: hanno@hboeck.de

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [gentoo-dev]  Re: Re: [gentoo-commits] gentoo-x86 commit in app-doc/gimp-help: ChangeLog gimp-help-0.13.ebuild
  2007-09-26  9:30             ` Donnie Berkholz
  2007-09-27  6:33               ` Mike Frysinger
@ 2007-09-27 15:30               ` Steve Long
  1 sibling, 0 replies; 11+ messages in thread
From: Steve Long @ 2007-09-27 15:30 UTC (permalink / raw
  To: gentoo-dev

Donnie Berkholz wrote:

> On 05:14 Wed 26 Sep     , Mike Frysinger wrote:
>> if it's all common shell, it's pretty hard to hide ... you could try some
>> tricks like rewriting USE to __USE__ so internal code (like the `use`
>> function) still work, but in the end, does that really help ?
> 
> I think so. It explicitly says that's private and not part of the API,
> and it makes accidental overwrites much more unlikely.
> 
Yeah but if it's been declare'd -r (readonly) that isn't an issue. 

Personally I think access to all the variables is fine; an ebuild is a
shell-script, not a C++ project, and if a dev breaks something it's his
responsibility to fix it. (Quite apart from this review process picking
stuff up.) My 2c on that.

Wrt to the function, I'd define it so:

use_linguas() {
        (($#)) || die 'use_linguas() called with no arguments'
        ALL_LINGUAS=
        local lingua
        for lingua; do
                use "linguas_$lingua" && ALL_LINGUAS+=" $lingua"
        done
        # [[ $ALL_LINGUAS ]] || die 'No Linguas available'
        [[ $ALL_LINGUAS ]] && return 0
        # ALL_LINGUAS=en # default to English
        return 1
}
..to call with use_linguas de en es it zh # for example

It'd be easier to maintain if the ebuild author wrote:
MY_LINGUAS='de en es it zh'
..at the top of the file, with calls to:
use_linguas $MY_LINGUAS
..where needed.


-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2007-09-27 15:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <E1IaN9Q-0006Qq-Hx@stork.gentoo.org>
2007-09-26  6:17 ` [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in app-doc/gimp-help: ChangeLog gimp-help-0.13.ebuild Christian Faulhammer
2007-09-26  8:07 ` Donnie Berkholz
2007-09-26  8:36   ` Mike Frysinger
2007-09-26  8:42     ` Donnie Berkholz
2007-09-26  8:51       ` Mike Frysinger
2007-09-26  9:03         ` Donnie Berkholz
2007-09-26  9:14           ` Mike Frysinger
2007-09-26  9:30             ` Donnie Berkholz
2007-09-27  6:33               ` Mike Frysinger
2007-09-27 15:17                 ` Hanno Böck
2007-09-27 15:30               ` [gentoo-dev] " Steve Long

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox