Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Gentoo Portage Developer (http://www.linux-archive.org/gentoo-portage-developer/)
-   -   forcing a USE flag if another is on (http://www.linux-archive.org/gentoo-portage-developer/302298-forcing-use-flag-if-another.html)

Amit Dor-Shifer 12-30-2009 01:45 PM

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

Duncan 12-30-2009 03:20 PM

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

Brian Harring 12-31-2009 01:09 AM

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

Zac Medico 12-31-2009 02:34 AM

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


All times are GMT. The time now is 08:11 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.