* [gentoo-dev] More general interface to use flags
@ 2007-11-02 13:44 Marijn Schouten (hkBst)
2007-11-02 14:04 ` Roy Marples
0 siblings, 1 reply; 17+ messages in thread
From: Marijn Schouten (hkBst) @ 2007-11-02 13:44 UTC (permalink / raw
To: gentoo-dev@lists.gentoo.org; +Cc: gentoo-portage-dev
[-- Attachment #1.1: Type: text/plain, Size: 1725 bytes --]
Hi list,
the current interface to use flags, useq, usev, use_with, use_enable, as
defined in /usr/lib/portage/bin/ebuild.sh lacks generality. The common thing
is testing a use flag and possibly echoing a string, but there is no function
that implements this common behaviour.
I propose that we add such a function. Proposed name for the function is "ifuse".
I also propose to add the utility function "ifv" which is useful for writing
concise and clean code.
These additions would allow you to easily define your own function for
processing use flags in ebuilds and eclasses. One such example is
use_mime() {
local WORD=$(ifv "$2" "$2" "$1")
ifuse "$1" "${WORD};"
}
for generating a string of ';'-separated mime-types based on use flags.
The explanation of this function is:
#set WORD to argument 2 or if that is empty to argument 1
#output "${WORD};" if use flag $1 is set (or if it starts with ! and is unset)
#otherwise don't output anything
The existing interface is also simple to reimplement:
use() {
ifuse "${1}"
}
useq() {
ifuse "${1}"
}
usev() {
ifuse "${1}" "${1}"
}
use_with() {
local SUFFIX=$(ifv "$3" "=$3")
local WORD=$(ifv "$2" "$2" "$1")
ifuse "$1" "--with-${WORD}${SUFFIX}" "--without-${WORD}"
}
use_enable() {
local SUFFIX=$(ifv "$3" "=$3")
local WORD=$(ifv "$2" "$2" "$1")
ifuse "$1" "--enable-${WORD}${SUFFIX}" "--disable-${WORD}"
}
ifuse's code is much like useq's code now, but more versatile. You can find it
attached along with ifv.
Please comment,
Marijn
--
Marijn Schouten (hkBst), Gentoo Lisp project
<http://www.gentoo.org/proj/en/lisp/>, #gentoo-lisp on FreeNode
[-- Attachment #1.2: new_use_interface --]
[-- Type: text/plain, Size: 785 bytes --]
# test a use flag and return the result, possibly echo a non-empty string
ifuse() {
local flag=$1
local string_success=$2
local string_failure=$3
local success=0
# invert the return value for "!blah" and strip the '!'
[[ ${flag} = !* ]] && { success=1 ; flag=${flag:1} }
# Make sure we have this USE flag in IUSE
if ! hasq "${flag}" ${IUSE} ${E_IUSE} && ! hasq "${flag}" ${PORTAGE_ARCHLIST} selinux; then
eqawarn "QA Notice: USE Flag '${flag}' not in IUSE for ${CATEGORY}/${PF}"
fi
hasq "${flag}" ${USE} || ((success=1-success))
string=$( (( ${success} == 0 )) && echo ${string_success} || echo ${string_failure} )
[[ -n ${string} ]] && echo ${string}
return ${success}
}
ifv() {
[[ -n $1 ]] && echo $2 || echo $3
}
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] More general interface to use flags
2007-11-02 13:44 Marijn Schouten (hkBst)
@ 2007-11-02 14:04 ` Roy Marples
2007-11-02 14:27 ` Marijn Schouten (hkBst)
2007-11-02 14:59 ` Mike Frysinger
0 siblings, 2 replies; 17+ messages in thread
From: Roy Marples @ 2007-11-02 14:04 UTC (permalink / raw
To: gentoo-dev
On Fri, 2007-11-02 at 14:44 +0100, Marijn Schouten (hkBst) wrote:
> [[ ${flag} = !* ]] && { success=1 ; flag=${flag:1} }
Could be written as
[ "${flag#!}" != "${flag}" ] && { success=1; flag=${flag#!}; }
> string=$( (( ${success} == 0 )) && echo ${string_success} || echo
> ${string_failure} )
> [[ -n ${string} ]] && echo ${string}
if [ "${success}" = "0" ]; then
string=${string_success}
else
string=${string_failure}
fi
[ -n "${string}" ] && echo "${string}"
Thanks
Roy
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] More general interface to use flags
[not found] <472B2969.1070701@gentoo.org>
@ 2007-11-02 14:18 ` Daniel Drake
2007-11-02 14:52 ` Marijn Schouten (hkBst)
2007-11-02 14:53 ` Marijn Schouten (hkBst)
0 siblings, 2 replies; 17+ messages in thread
From: Daniel Drake @ 2007-11-02 14:18 UTC (permalink / raw
To: gentoo-dev; +Cc: gentoo-portage-dev
Marijn Schouten (hkBst) wrote:
> Hi list,
>
> the current interface to use flags, useq, usev, use_with, use_enable, as
> defined in /usr/lib/portage/bin/ebuild.sh lacks generality. The common thing
> is testing a use flag and possibly echoing a string, but there is no function
> that implements this common behaviour.
>
> I propose that we add such a function. Proposed name for the function is "ifuse".
So these modifications are just cleanups to portage internals and would
not affect the interfaces or behaviour of use/use_with/...?
> I also propose to add the utility function "ifv" which is useful for writing
> concise and clean code.
>
> These additions would allow you to easily define your own function for
> processing use flags in ebuilds and eclasses. One such example is
>
> use_mime() {
> local WORD=$(ifv "$2" "$2" "$1")
>
> ifuse "$1" "${WORD};"
> }
>
> for generating a string of ';'-separated mime-types based on use flags.
>
> The explanation of this function is:
>
> #set WORD to argument 2 or if that is empty to argument 1
> #output "${WORD};" if use flag $1 is set (or if it starts with ! and is unset)
> #otherwise don't output anything
I don't quite understand what this function does. What ebuild nastiness
does it replace, or what does it allow that was not previously possible?
(can you give an example?)
Thanks,
Daniel
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] More general interface to use flags
2007-11-02 14:04 ` Roy Marples
@ 2007-11-02 14:27 ` Marijn Schouten (hkBst)
2007-11-02 14:52 ` Roy Marples
2007-11-02 14:59 ` Mike Frysinger
1 sibling, 1 reply; 17+ messages in thread
From: Marijn Schouten (hkBst) @ 2007-11-02 14:27 UTC (permalink / raw
To: gentoo-dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Roy Marples wrote:
> On Fri, 2007-11-02 at 14:44 +0100, Marijn Schouten (hkBst) wrote:
>> [[ ${flag} = !* ]] && { success=1 ; flag=${flag:1} }
>
> Could be written as
> [ "${flag#!}" != "${flag}" ] && { success=1; flag=${flag#!}; }
>
>> string=$( (( ${success} == 0 )) && echo ${string_success} || echo
>> ${string_failure} )
>> [[ -n ${string} ]] && echo ${string}
>
> if [ "${success}" = "0" ]; then
> string=${string_success}
> else
> string=${string_failure}
> fi
> [ -n "${string}" ] && echo "${string}"
Actually I'd prefer to introduce
ifz() {
[[ $1 = 0 ]] && echo $2 || echo $3
}
and reimplement as follows
string=$(ifz ${success} "${string_success}" "${string_failure}")
but I don't want to push my luck,
Marijn
- --
Marijn Schouten (hkBst), Gentoo Lisp project
<http://www.gentoo.org/proj/en/lisp/>, #gentoo-lisp on FreeNode
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHKzPXp/VmCx0OL2wRAhvNAKCB5yPezkffi/QXx6aDEXsgB662kwCfb3DV
SDZ66FZzdoSF3uftGd+ZBik=
=ylxW
-----END PGP SIGNATURE-----
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] More general interface to use flags
2007-11-02 14:27 ` Marijn Schouten (hkBst)
@ 2007-11-02 14:52 ` Roy Marples
0 siblings, 0 replies; 17+ messages in thread
From: Roy Marples @ 2007-11-02 14:52 UTC (permalink / raw
To: gentoo-dev
On Fri, 2007-11-02 at 15:27 +0100, Marijn Schouten (hkBst) wrote:
>
> ifz() {
> [[ $1 = 0 ]] && echo $2 || echo $3
> }
And that could be written as
[ "$1" = 0 ] && echo "$2" || echo "$3"
Thanks
Roy
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] More general interface to use flags
2007-11-02 14:18 ` [gentoo-dev] More general interface to use flags Daniel Drake
@ 2007-11-02 14:52 ` Marijn Schouten (hkBst)
2007-11-02 14:53 ` Marijn Schouten (hkBst)
1 sibling, 0 replies; 17+ messages in thread
From: Marijn Schouten (hkBst) @ 2007-11-02 14:52 UTC (permalink / raw
To: gentoo-dev; +Cc: gentoo-portage-dev, lack
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Daniel Drake wrote:
> Marijn Schouten (hkBst) wrote:
>> use_mime() {
>> local WORD=$(ifv "$2" "$2" "$1")
>>
>> ifuse "$1" "${WORD};"
>> }
>>
>> for generating a string of ';'-separated mime-types based on use flags.
>>
>> The explanation of this function is:
>>
>> #set WORD to argument 2 or if that is empty to argument 1
>> #output "${WORD};" if use flag $1 is set (or if it starts with ! and
>> is unset)
>> #otherwise don't output anything
>
> I don't quite understand what this function does. What ebuild nastiness
> does it replace, or what does it allow that was not previously possible?
> (can you give an example?)
It's something I built following some questions by lack in #gentoo-dev-help.
Perhaps he can clarify if necessary.
[di okt 30 2007] [18:02:10]
<lack> Now, I want to have each ebuild have a global variable called
'APPMIME' that somehow contains the mime-types available and the associated
USE flags, such that the eclass that actually creates the .desktop file can
appropriately go through and add only the mime-types that are enabled by the
USE flags.
<zlin> no, there is no such convenience function.
<lack> That's too bad - it would be pretty useful. Oh well, I'll have to
write some sort of fancy function in the ebuild then.
<hkBst> lack: what about APPMIME="thing1 $(usev thing2)" ?
<zlin> I you think such a flattener would be really useful I suppose you
can suggest it on -dev@ ..
<lack> hkBst: Hm, that's not too bad.
<zlin> *If
<lack> I wonder, would that work like: APPMIME="one;$(if usev
thing2;thing3);thing4"?
<lack> Maybe I'd have to do some odd escaping in that case of a
semicolon-separated list.
<hkBst> lack: why do you want it to be ;-separated?
<lack> Because that's the eventual format of 'MIME=type/one;type/two' in
the .desktop file.
<lack> If I could just set up the variable so the eclass doesn't have to
actually do any parsing that would be easiest.
<lack> APPMIME="type/one;type/two$(if use foo ';type/foo1;type/foo2')$(if
use bar ';type/barx;type/bary')" Perhaps?
<zlin> usemime() { useq $1 && echo "$2;"; }; APPMIME="thing1;$(usemime
useflag thing2)$(usemime useflag2 "thing3;thing4")thing5"
<lack> Ah, that usemime feature looks useful, thanks!
But
usemime() { useq $1 && echo "$2;"; }
lacks default arguments and ifuse provides a nicer interface if you want to do
output, which is the use case I am proposing ifuse for.
Some other examples:
in dev-scheme/bigloo-3.0b_p2 I use (econf doesn't work):
./configure \
$(use java && echo "--jvm=yes --java=$(java-config --java)
- --javac=$(java-config --javac)") \
- --prefix=/usr \
# --bee=$(if use fullbee; then echo full; else echo partial; fi)
it would be a bit nicer if I could just write:
./configure \
$(ifuse java "--jvm=yes --java=$(java-config --java) --javac=$(java-config
- --javac)") \
- --prefix=/usr \
# --bee=$(ifuse fullbee full partial)
The example from
<http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml?part=2&chap=1>
if use gnutls ; then
myconf="${myconf} --enable-ssl --with-ssl=gnutls"
elif use ssl ; then
myconf="${myconf} --enable-ssl --with-ssl=openssl"
else
myconf="${myconf} --disable-ssl"
fi
econf \
# Other stuff
${myconf} \
|| die "configure failed"
could become:
econf \
# Other stuff
$(ifuse gnutls "--enable-ssl --with-ssl=gnutls" \
$(ifuse ssl "--enable-ssl --with-ssl=openssl" --disable-ssl)) \
|| die "configure failed"
which may require some getting used to. But no functionality will be lost, so
if you prefer the old way, all your existing methods will continue to work.
There will just be another option.
Marijn
- --
Marijn Schouten (hkBst), Gentoo Lisp project
<http://www.gentoo.org/proj/en/lisp/>, #gentoo-lisp on FreeNode
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHKzmzp/VmCx0OL2wRAk8bAJ9rDW57WStJ79PBpXIbQN9phEv6GwCcChaR
OqLUSnsTRttVwFdmCwDnW7I=
=Zw+z
-----END PGP SIGNATURE-----
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] More general interface to use flags
2007-11-02 14:18 ` [gentoo-dev] More general interface to use flags Daniel Drake
2007-11-02 14:52 ` Marijn Schouten (hkBst)
@ 2007-11-02 14:53 ` Marijn Schouten (hkBst)
1 sibling, 0 replies; 17+ messages in thread
From: Marijn Schouten (hkBst) @ 2007-11-02 14:53 UTC (permalink / raw
To: gentoo-dev; +Cc: gentoo-portage-dev, lack
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Daniel Drake wrote:
> Marijn Schouten (hkBst) wrote:
>> use_mime() {
>> local WORD=$(ifv "$2" "$2" "$1")
>>
>> ifuse "$1" "${WORD};"
>> }
>>
>> for generating a string of ';'-separated mime-types based on use flags.
>>
>> The explanation of this function is:
>>
>> #set WORD to argument 2 or if that is empty to argument 1
>> #output "${WORD};" if use flag $1 is set (or if it starts with ! and
>> is unset)
>> #otherwise don't output anything
>
> I don't quite understand what this function does. What ebuild nastiness
> does it replace, or what does it allow that was not previously possible?
> (can you give an example?)
It's something I built following some questions by lack in #gentoo-dev-help.
Perhaps he can clarify if necessary.
[di okt 30 2007] [18:02:10]
<lack> Now, I want to have each ebuild have a global variable called
'APPMIME' that somehow contains the mime-types available and the associated
USE flags, such that the eclass that actually creates the .desktop file can
appropriately go through and add only the mime-types that are enabled by the
USE flags.
<zlin> no, there is no such convenience function.
<lack> That's too bad - it would be pretty useful. Oh well, I'll have to
write some sort of fancy function in the ebuild then.
<hkBst> lack: what about APPMIME="thing1 $(usev thing2)" ?
<zlin> I you think such a flattener would be really useful I suppose you
can suggest it on -dev@ ..
<lack> hkBst: Hm, that's not too bad.
<zlin> *If
<lack> I wonder, would that work like: APPMIME="one;$(if usev
thing2;thing3);thing4"?
<lack> Maybe I'd have to do some odd escaping in that case of a
semicolon-separated list.
<hkBst> lack: why do you want it to be ;-separated?
<lack> Because that's the eventual format of 'MIME=type/one;type/two' in
the .desktop file.
<lack> If I could just set up the variable so the eclass doesn't have to
actually do any parsing that would be easiest.
<lack> APPMIME="type/one;type/two$(if use foo ';type/foo1;type/foo2')$(if
use bar ';type/barx;type/bary')" Perhaps?
<zlin> usemime() { useq $1 && echo "$2;"; }; APPMIME="thing1;$(usemime
useflag thing2)$(usemime useflag2 "thing3;thing4")thing5"
<lack> Ah, that usemime feature looks useful, thanks!
But
usemime() { useq $1 && echo "$2;"; }
lacks default arguments and ifuse provides a nicer interface if you want to do
output, which is the use case I am proposing ifuse for.
Some other examples:
in dev-scheme/bigloo-3.0b_p2 I use (econf doesn't work):
./configure \
$(use java && echo "--jvm=yes --java=$(java-config --java)
- --javac=$(java-config --javac)") \
- --prefix=/usr \
# --bee=$(if use fullbee; then echo full; else echo partial; fi)
it would be a bit nicer if I could just write:
./configure \
$(ifuse java "--jvm=yes --java=$(java-config --java) --javac=$(java-config
- --javac)") \
- --prefix=/usr \
# --bee=$(ifuse fullbee full partial)
The example from
<http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml?part=2&chap=1>
if use gnutls ; then
myconf="${myconf} --enable-ssl --with-ssl=gnutls"
elif use ssl ; then
myconf="${myconf} --enable-ssl --with-ssl=openssl"
else
myconf="${myconf} --disable-ssl"
fi
econf \
# Other stuff
${myconf} \
|| die "configure failed"
could become:
econf \
# Other stuff
$(ifuse gnutls "--enable-ssl --with-ssl=gnutls" \
$(ifuse ssl "--enable-ssl --with-ssl=openssl" --disable-ssl)) \
|| die "configure failed"
which may require some getting used to. But no functionality will be lost, so
if you prefer the old way, all your existing methods will continue to work.
There will just be another option.
Marijn
- --
Marijn Schouten (hkBst), Gentoo Lisp project
<http://www.gentoo.org/proj/en/lisp/>, #gentoo-lisp on FreeNode
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHKzmzp/VmCx0OL2wRAk8bAJ9rDW57WStJ79PBpXIbQN9phEv6GwCcChaR
OqLUSnsTRttVwFdmCwDnW7I=
=Zw+z
-----END PGP SIGNATURE-----
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] More general interface to use flags
2007-11-02 14:04 ` Roy Marples
2007-11-02 14:27 ` Marijn Schouten (hkBst)
@ 2007-11-02 14:59 ` Mike Frysinger
2007-11-02 15:30 ` Roy Marples
1 sibling, 1 reply; 17+ messages in thread
From: Mike Frysinger @ 2007-11-02 14:59 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 222 bytes --]
On Friday 02 November 2007, Roy Marples wrote:
> On Fri, 2007-11-02 at 14:44 +0100, Marijn Schouten (hkBst) wrote:
> > [[ ${flag} = !* ]] && { success=1 ; flag=${flag:1} }
>
> Could be written as
irrelevant, thanks
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 827 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] More general interface to use flags
2007-11-02 14:59 ` Mike Frysinger
@ 2007-11-02 15:30 ` Roy Marples
2007-11-02 15:38 ` Mike Frysinger
0 siblings, 1 reply; 17+ messages in thread
From: Roy Marples @ 2007-11-02 15:30 UTC (permalink / raw
To: gentoo-dev
On Fri, 2007-11-02 at 10:59 -0400, Mike Frysinger wrote:
> On Friday 02 November 2007, Roy Marples wrote:
> > On Fri, 2007-11-02 at 14:44 +0100, Marijn Schouten (hkBst) wrote:
> > > [[ ${flag} = !* ]] && { success=1 ; flag=${flag:1} }
> >
> > Could be written as
>
> irrelevant, thanks
My mail was relevant to the discussion, yours is just trolling and has
no place here.
Thanks
Roy
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] More general interface to use flags
2007-11-02 15:30 ` Roy Marples
@ 2007-11-02 15:38 ` Mike Frysinger
2007-11-02 15:48 ` Roy Marples
0 siblings, 1 reply; 17+ messages in thread
From: Mike Frysinger @ 2007-11-02 15:38 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 808 bytes --]
On Friday 02 November 2007, Roy Marples wrote:
> On Fri, 2007-11-02 at 10:59 -0400, Mike Frysinger wrote:
> > On Friday 02 November 2007, Roy Marples wrote:
> > > On Fri, 2007-11-02 at 14:44 +0100, Marijn Schouten (hkBst) wrote:
> > > > [[ ${flag} = !* ]] && { success=1 ; flag=${flag:1} }
> > >
> > > Could be written as
> >
> > irrelevant, thanks
>
> My mail was relevant to the discussion, yours is just trolling and has
> no place here.
wrong. the point of the discussion on the gentoo dev mailing list is to go
over the exported API for *ebuilds*, not for the implementation. the
implementation is already baked and really, Marijn shouldnt have sent it to
the gentoo dev mailing list in the first place. your pointless POSIX
conversions have no place in the discussion.
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 827 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] More general interface to use flags
2007-11-02 15:38 ` Mike Frysinger
@ 2007-11-02 15:48 ` Roy Marples
2007-11-02 15:58 ` Mike Frysinger
0 siblings, 1 reply; 17+ messages in thread
From: Roy Marples @ 2007-11-02 15:48 UTC (permalink / raw
To: gentoo-dev
On Fri, 2007-11-02 at 11:38 -0400, Mike Frysinger wrote:
> wrong. the point of the discussion on the gentoo dev mailing list is to go
> over the exported API for *ebuilds*, not for the implementation. the
> implementation is already baked and really, Marijn shouldnt have sent it to
> the gentoo dev mailing list in the first place. your pointless POSIX
> conversions have no place in the discussion.
However, I notice that you have no problem discussing the implementation
of ebuild commits or are they special in some way?
My POSIX conversations encourage the use of POSIX over non portable bash
as that's something I try and encourage. And that is very pertinent to
-dev.
Thanks
Roy
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] More general interface to use flags
2007-11-02 15:48 ` Roy Marples
@ 2007-11-02 15:58 ` Mike Frysinger
2007-11-02 16:10 ` Roy Marples
0 siblings, 1 reply; 17+ messages in thread
From: Mike Frysinger @ 2007-11-02 15:58 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1349 bytes --]
On Friday 02 November 2007, Roy Marples wrote:
> On Fri, 2007-11-02 at 11:38 -0400, Mike Frysinger wrote:
> > wrong. the point of the discussion on the gentoo dev mailing list is to
> > go over the exported API for *ebuilds*, not for the implementation. the
> > implementation is already baked and really, Marijn shouldnt have sent it
> > to the gentoo dev mailing list in the first place. your pointless POSIX
> > conversions have no place in the discussion.
>
> However, I notice that you have no problem discussing the implementation
> of ebuild commits or are they special in some way?
that's because the point of said discussions *is about the implementation*.
this thread is not about the implementation, but about the API. besides, i'd
give you the same answer there when you attempt to get people to change
perfectly valid (and preferred) code structures.
> My POSIX conversations encourage the use of POSIX over non portable bash
> as that's something I try and encourage. And that is very pertinent to
> -dev.
and the answer is still the same. POSIX conversions are irrelevant until you
can propose solutions for the things bash can do but POSIX cannot. you can
only provide workarounds or hacks, so any further attempt on the topic is
half way conversions that lead to ugly inconsistencies.
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 827 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] More general interface to use flags
2007-11-02 15:58 ` Mike Frysinger
@ 2007-11-02 16:10 ` Roy Marples
2007-11-02 16:30 ` Bo Ørsted Andresen
0 siblings, 1 reply; 17+ messages in thread
From: Roy Marples @ 2007-11-02 16:10 UTC (permalink / raw
To: gentoo-dev
On Fri, 2007-11-02 at 11:58 -0400, Mike Frysinger wrote:
> and the answer is still the same. POSIX conversions are irrelevant until you
> can propose solutions for the things bash can do but POSIX cannot. you can
> only provide workarounds or hacks, so any further attempt on the topic is
> half way conversions that lead to ugly inconsistencies.
Please point to the ugly inconsistent POSIX hacks in this thread?
Thanks
Roy
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] More general interface to use flags
2007-11-02 16:10 ` Roy Marples
@ 2007-11-02 16:30 ` Bo Ørsted Andresen
2007-11-02 16:52 ` Roy Marples
0 siblings, 1 reply; 17+ messages in thread
From: Bo Ørsted Andresen @ 2007-11-02 16:30 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 577 bytes --]
On Friday 02 November 2007 17:10:29 Roy Marples wrote:
> > and the answer is still the same. POSIX conversions are irrelevant until
> > you can propose solutions for the things bash can do but POSIX cannot.
> > you can only provide workarounds or hacks, so any further attempt on the
> > topic is half way conversions that lead to ugly inconsistencies.
>
> Please point to the ugly inconsistent POSIX hacks in this thread?
Please explain why you hijack this thread to discuss POSIX vs. bash when it's
supposed to be about the API for ebuilds.
--
Bo Andresen
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] More general interface to use flags
2007-11-02 16:30 ` Bo Ørsted Andresen
@ 2007-11-02 16:52 ` Roy Marples
2007-11-02 17:17 ` Bo Ørsted Andresen
0 siblings, 1 reply; 17+ messages in thread
From: Roy Marples @ 2007-11-02 16:52 UTC (permalink / raw
To: gentoo-dev
On Fri, 2007-11-02 at 17:30 +0100, Bo Ørsted Andresen wrote:
> Please explain why you hijack this thread to discuss POSIX vs. bash when it's
> supposed to be about the API for ebuilds.
I dislike the gratuitous use of bash for no good reason - and in the
code he gave there is no good reason for using bashisms.
Thanks
Roy
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] More general interface to use flags
2007-11-02 16:52 ` Roy Marples
@ 2007-11-02 17:17 ` Bo Ørsted Andresen
2007-11-02 17:35 ` Roy Marples
0 siblings, 1 reply; 17+ messages in thread
From: Bo Ørsted Andresen @ 2007-11-02 17:17 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 556 bytes --]
On Friday 02 November 2007 17:52:13 Roy Marples wrote:
> On Fri, 2007-11-02 at 17:30 +0100, Bo Ørsted Andresen wrote:
> > Please explain why you hijack this thread to discuss POSIX vs. bash when
> > it's supposed to be about the API for ebuilds.
>
> I dislike the gratuitous use of bash for no good reason - and in the
> code he gave there is no good reason for using bashisms.
So your approach to getting it your way is to hijack every thread that shows
use of bashisms until people start using your inferior workarounds?
--
Bo Andresen
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-dev] More general interface to use flags
2007-11-02 17:17 ` Bo Ørsted Andresen
@ 2007-11-02 17:35 ` Roy Marples
0 siblings, 0 replies; 17+ messages in thread
From: Roy Marples @ 2007-11-02 17:35 UTC (permalink / raw
To: gentoo-dev
On Fri, 2007-11-02 at 18:17 +0100, Bo Ørsted Andresen wrote:
> On Friday 02 November 2007 17:52:13 Roy Marples wrote:
> > On Fri, 2007-11-02 at 17:30 +0100, Bo Ørsted Andresen wrote:
> > > Please explain why you hijack this thread to discuss POSIX vs. bash when
> > > it's supposed to be about the API for ebuilds.
> >
> > I dislike the gratuitous use of bash for no good reason - and in the
> > code he gave there is no good reason for using bashisms.
>
> So your approach to getting it your way is to hijack every thread that shows
> use of bashisms until people start using your inferior workarounds?
I don't see them as inferior.
I see them as more portable and less confusing.
Of course you are welcome to compare the code in question and state
which is inferior and why it is so.
Thanks
Roy
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2007-11-02 17:39 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <472B2969.1070701@gentoo.org>
2007-11-02 14:18 ` [gentoo-dev] More general interface to use flags Daniel Drake
2007-11-02 14:52 ` Marijn Schouten (hkBst)
2007-11-02 14:53 ` Marijn Schouten (hkBst)
2007-11-02 13:44 Marijn Schouten (hkBst)
2007-11-02 14:04 ` Roy Marples
2007-11-02 14:27 ` Marijn Schouten (hkBst)
2007-11-02 14:52 ` Roy Marples
2007-11-02 14:59 ` Mike Frysinger
2007-11-02 15:30 ` Roy Marples
2007-11-02 15:38 ` Mike Frysinger
2007-11-02 15:48 ` Roy Marples
2007-11-02 15:58 ` Mike Frysinger
2007-11-02 16:10 ` Roy Marples
2007-11-02 16:30 ` Bo Ørsted Andresen
2007-11-02 16:52 ` Roy Marples
2007-11-02 17:17 ` Bo Ørsted Andresen
2007-11-02 17:35 ` Roy Marples
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox