* [gentoo-dev] use foo && bar vs. [ `use foo` ] && bar
@ 2004-07-19 17:33 Tom Knight
2004-07-19 17:44 ` Ciaran McCreesh
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Tom Knight @ 2004-07-19 17:33 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 877 bytes --]
Hi
First I want to say how glad I am to be part of the dev team. I'll try my
best not to screw anything up, so excuse any silly questions I'm bound to
have.
Back on topic, I've searched for this on bugzilla, and didn't find anything,
but I'm sure it's come up on the forums before. There are several ebuilds
which have something along the lines of:
use foo && bar
Which executes bar if the foo USE flag is set, the problem is that the use
function not only returns true when the USE flag is set it also echos the
flag to stdout. When you emerge something you end up with loads of use flags
outputted.
The solution is to do it like this:
[ `use foo` ] && bar
Which returns true if foo is in USE, but doesn't output the USE flag.
I'm going have a go at fixing some of the net-mail packages, if others can
do the same taht would be great.
tom
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-dev] use foo && bar vs. [ `use foo` ] && bar
2004-07-19 17:33 [gentoo-dev] use foo && bar vs. [ `use foo` ] && bar Tom Knight
@ 2004-07-19 17:44 ` Ciaran McCreesh
2004-07-19 17:48 ` Tom Knight
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Ciaran McCreesh @ 2004-07-19 17:44 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1079 bytes --]
On Mon, 19 Jul 2004 18:33:49 +0100 Tom Knight <tomk@gentoo.org> wrote:
| Back on topic, I've searched for this on bugzilla, and didn't find
| anything, but I'm sure it's come up on the forums before. There are
| several ebuilds which have something along the lines of:
|
| use foo && bar
This is correct.
| Which executes bar if the foo USE flag is set, the problem is that the
| use function not only returns true when the USE flag is set it also
| echos the flag to stdout. When you emerge something you end up with
| loads of use flags outputted.
This is about to change. In the future use will be silent and usev (?
can't remember whether it's a v...) will output.
| The solution is to do it like this:
|
| [ `use foo` ] && bar
Don't do that.
| I'm going have a go at fixing some of the net-mail packages, if others
| can do the same taht would be great.
Don't. You'll just have to un'fix' it again later :)
--
Ciaran McCreesh : Gentoo Developer (Sparc, MIPS, Vim, Fluxbox)
Mail : ciaranm at gentoo.org
Web : http://dev.gentoo.org/~ciaranm
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-dev] use foo && bar vs. [ `use foo` ] && bar
2004-07-19 17:33 [gentoo-dev] use foo && bar vs. [ `use foo` ] && bar Tom Knight
2004-07-19 17:44 ` Ciaran McCreesh
@ 2004-07-19 17:48 ` Tom Knight
2004-07-19 20:34 ` Mike Frysinger
2004-07-19 20:53 ` Stuart Herbert
3 siblings, 0 replies; 6+ messages in thread
From: Tom Knight @ 2004-07-19 17:48 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 501 bytes --]
On Mon, Jul 19, 2004 at 06:33:49PM +0100, Tom Knight wrote:
>
> The solution is to do it like this:
>
> [ `use foo` ] && bar
>
> Which returns true if foo is in USE, but doesn't output the USE flag.
OK, have had a word with a few people on #g-dev, the way that the use
function works is going to change so that it doesn't output the use flag, so
ignore what I said in the last message.
tom
--
Tom Knight
tomk@gentoo.org
GPG Public Key: http://dev.gentoo.org/~tomk/tomk.asc
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-dev] use foo && bar vs. [ `use foo` ] && bar
2004-07-19 17:33 [gentoo-dev] use foo && bar vs. [ `use foo` ] && bar Tom Knight
2004-07-19 17:44 ` Ciaran McCreesh
2004-07-19 17:48 ` Tom Knight
@ 2004-07-19 20:34 ` Mike Frysinger
2004-07-19 20:53 ` Stuart Herbert
3 siblings, 0 replies; 6+ messages in thread
From: Mike Frysinger @ 2004-07-19 20:34 UTC (permalink / raw
To: gentoo-dev
On Monday 19 July 2004 01:33 pm, Tom Knight wrote:
> First I want to say how glad I am to be part of the dev team. I'll try my
> best not to screw anything up, so excuse any silly questions I'm bound to
> have.
well you e-mailed gentoo-dev before breaking these packages so you're getting
off on the right foot :)
> Back on topic, I've searched for this on bugzilla, and didn't find
> anything, but I'm sure it's come up on the forums before. There are several
> ebuilds which have something along the lines of:
search the mail archives for threads that go into this in detail
-mike
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-dev] use foo && bar vs. [ `use foo` ] && bar
2004-07-19 17:33 [gentoo-dev] use foo && bar vs. [ `use foo` ] && bar Tom Knight
` (2 preceding siblings ...)
2004-07-19 20:34 ` Mike Frysinger
@ 2004-07-19 20:53 ` Stuart Herbert
2004-07-19 22:13 ` Mike Frysinger
3 siblings, 1 reply; 6+ messages in thread
From: Stuart Herbert @ 2004-07-19 20:53 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 554 bytes --]
On Monday 19 July 2004 18:33, Tom Knight wrote:
> The solution is to do it like this:
>
> [ `use foo` ] && bar
*cough cough* useq
useq foo && bar
Best regards,
Stu
--
Stuart Herbert stuart@gentoo.org
Gentoo Developer http://www.gentoo.org/
http://stu.gnqs.org/diary/
GnuPG key id# F9AFC57C available from http://pgp.mit.edu
Key fingerprint = 31FB 50D4 1F88 E227 F319 C549 0C2F 80BA F9AF C57C
--
[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-dev] use foo && bar vs. [ `use foo` ] && bar
2004-07-19 20:53 ` Stuart Herbert
@ 2004-07-19 22:13 ` Mike Frysinger
0 siblings, 0 replies; 6+ messages in thread
From: Mike Frysinger @ 2004-07-19 22:13 UTC (permalink / raw
To: gentoo-dev
On Monday 19 July 2004 04:53 pm, Stuart Herbert wrote:
> *cough cough* useq
useq is dead; please dont ever mention or use it ever again
-mike
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-07-19 22:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-19 17:33 [gentoo-dev] use foo && bar vs. [ `use foo` ] && bar Tom Knight
2004-07-19 17:44 ` Ciaran McCreesh
2004-07-19 17:48 ` Tom Knight
2004-07-19 20:34 ` Mike Frysinger
2004-07-19 20:53 ` Stuart Herbert
2004-07-19 22:13 ` Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox