public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [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

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