Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 17060 - "use" in ebuilds could be quieter
Summary: "use" in ebuilds could be quieter
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Nicholas Jones (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-07 21:58 UTC by Aron Griffis (RETIRED)
Modified: 2011-10-30 22:22 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Griffis (RETIRED) gentoo-dev 2003-03-07 21:58:56 UTC
Presently many ebuilds use the form:

    use blah && do something

This spits out "blah" while the ebuild is building...  This is hardly
a serious bug but it's some screen garbage.  In fact I wouldn't care
but it CAN be fixed without breaking the other form:

    if [ "`use blah`" ]; then

Here is a new use() function which makes "use" quiet when outputting
to stdout, so both forms above continue to work.

use() {
	local x
	for x in ${USE}
	do
		if [ "${x}" = "${1}" ]
		then
			tty --quiet </dev/stdout || echo "${x}"
			return 0
		fi
	done
	return 1
}


Reproducible: Always
Steps to Reproduce:
1. emerge xmms (I'm sure there are better examples)
2. watch the output as the emerge starts

Actual Results:  
# emerge xmms
Calculating dependencies ...done!
>>> emerge (1 of 1) media-sound/xmms-1.2.7-r19 to /
>>> md5 ;-) xmms-1.2.7.tar.gz
>>> md5 ;-) xmms-1.2.7-mmx.patch.gz
>>> Unpacking source...
>>> Unpacking xmms-1.2.7.tar.gz to /var/tmp/portage/xmms-1.2.7-r19/work
 * Applying xmms-jump.patch...                                    [ ok ]
 * Applying xmms-sigterm.patch...                                 [ ok ]
x86
mmx
 * Applying xmms-1.2.7-mmx.patch.gz...                            [ ok ]


Expected Results:  
# emerge xmms
Calculating dependencies ...done!
>>> emerge (1 of 1) media-sound/xmms-1.2.7-r19 to /
>>> md5 ;-) xmms-1.2.7.tar.gz
>>> md5 ;-) xmms-1.2.7-mmx.patch.gz
>>> Unpacking source...
>>> Unpacking xmms-1.2.7.tar.gz to /var/tmp/portage/xmms-1.2.7-r19/work
 * Applying xmms-jump.patch...                                    [ ok ]
 * Applying xmms-sigterm.patch...                                 [ ok ]
 * Applying xmms-1.2.7-mmx.patch.gz...                            [ ok ]
Comment 1 Nicholas Jones (RETIRED) gentoo-dev 2003-03-10 21:28:38 UTC
Nice... I'll have to think about whether or not to add it...
I've got it in there, but commented out.

The extra output is informational, and I kinda like it.

Comment 2 Mr. Bones. (RETIRED) gentoo-dev 2003-03-11 17:09:31 UTC
FWIW, I'd prefer quieter ebuilds (unless emerge --verbose is used).
Comment 3 Aron Griffis (RETIRED) gentoo-dev 2003-08-12 08:12:45 UTC
Looks to me like this was applied at some point so I'm closing this bug.