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 Portage Developer

 
 
LinkBack Thread Tools
 
Old 12-30-2009, 01:45 PM
Amit Dor-Shifer
 
Default forcing a USE flag if another is on

Is there some method of specifing "if USE flag X is enabled, enable USE
flag y as-well"? Something like a "conditional" use.force file in profiles/.

Amit
 
Old 12-30-2009, 03:20 PM
Duncan
 
Default forcing a USE flag if another is on

Amit Dor-Shifer posted on Wed, 30 Dec 2009 16:45:40 +0200 as excerpted:

> Is there some method of specifing "if USE flag X is enabled, enable USE
> flag y as-well"? Something like a "conditional" use.force file in
> profiles/. Amit

That should be doable globally using /etc/portage/bashrc or the like (
/etc/portage/profile/bashrc). For specific packages, it's doable using
/etc/portage/env/cat-egory/<pkgname> files, altho that's not so well
documented.

In any of those cases, syntax is standard bash, so you get the full range
of bash conditionals and scripting available to setup your environment as
complicated as you wish. (However, it is my understanding that the
/etc/portage/env files only get sourced for the bash/ebuild.sh side of
portage, not for the python side, so stuff like depchecks and features
that are dealt with on the python side, won't necessarily work as
expected. Test it if in doubt... or put it in one of the bashrcs, with a
conditional so it's only applied to the package in question.)

--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
 
Old 12-31-2009, 01:09 AM
Brian Harring
 
Default forcing a USE flag if another is on

On Wed, Dec 30, 2009 at 04:20:45PM +0000, Duncan wrote:
> Amit Dor-Shifer posted on Wed, 30 Dec 2009 16:45:40 +0200 as excerpted:
>
> > Is there some method of specifing "if USE flag X is enabled, enable USE
> > flag y as-well"? Something like a "conditional" use.force file in
> > profiles/. Amit
>
> That should be doable globally using /etc/portage/bashrc or the like (
> /etc/portage/profile/bashrc).

It's not doable via bashrc (bashrc runs at build time)- intentionally
to block abuses of this sort I might add.

Reiterating- playing w/ USE in bash doesn't change the USE state
python/package manager side, meaning you'll not get the proper
depedencies pulled in...

~harring
 
Old 12-31-2009, 02:34 AM
Zac Medico
 
Default forcing a USE flag if another is on

On 12/30/2009 06:45 AM, Amit Dor-Shifer wrote:
> Is there some method of specifing "if USE flag X is enabled, enable USE
> flag y as-well"? Something like a "conditional" use.force file in
> profiles/.
> Amit

We plan to extend the IUSE syntax to support that in a future EAPI.
See this bug:

http://bugs.gentoo.org/show_bug.cgi?id=238887

--
Thanks,
Zac
 

Thread Tools




All times are GMT. The time now is 11:58 AM.

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