FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

LinkBack Thread Tools
Old 12-16-2007, 10:43 AM
Bo Ørsted Andresen
Default gentoo-x86 commit in media-video/undvd: undvd-0.3.0.ebuild metadata.xml ChangeLog Manifest

On Sunday 16 December 2007 08:13:49 Donnie Berkholz wrote:
> On 17:46 Fri 14 Dec , Greg Kroah-Hartman (gregkh) wrote:
> > pkg_setup() {
> > einfo "Checking mplayer for USE flags we need..."
> > for f in "encode dvd x264 mp3"; do
> > if ! built_with_use media-video/mplayer $f; then
> > eerror "$f"
> > die "mplayer merged without $f USE flag"
> > fi
> > done
> Does this actually work as you want? I'd be surprised. Quoting the whole
> thing should treat it as a single flag with spaces and only run through
> the loop once.
> It should only coincidentally work because built_with_use() takes any
> number of flags and loops through them, but I doubt it prints the single
> missing flag as you intend.

Indeed it works because $f isn't quoted and built_with_use handles a list just
fine. Just the for loop is pointless. Fixing it to check only one use flag at
a time, however, is a horrible idea because it risks telling the user to
recompile mplayer four times each adding another use flag. There really is no
reason not to just show the full list of required flags if one of them is
missing but if you really want to at least move the die out of the loop.

Bo Andresen

Thread Tools

All times are GMT. The time now is 03:28 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org