View previous topic :: View next topic |
Author |
Message |
mikefot l33t
Joined: 19 Nov 2014 Posts: 709
|
Posted: Mon Jun 08, 2020 4:04 pm Post subject: command line command to add flags to make.conf file |
|
|
Dear All,
Is there a command line command to add flags to the file for a given package?
So if a package like cups needed 8 flags listed on the package wiki page is there a command I can use that will add the recommended set of standard flags to the make.conf file (or maybe package.use instead) for that package?
Or do they all need to be added by hand to the make.conf file unless emerge decides to recruite e.g. to do it for you along with if you ignore it and then try to emerge the package anyway?
Comments appreciated
Regards
MIchael Fothergill |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30942 Location: here
|
Posted: Mon Jun 08, 2020 4:09 pm Post subject: |
|
|
If you set use flags in make.conf these are applied to all packages.
For add use flags per package you should use /etc/portage/package.use.
For add these flag in make.conf or in package.use you can use euse command.
Code: | $ euse
euse (0.4.8)
Syntax: euse <option> [suboptions] [useflaglist]
Options: -h, --help - show this message
-V, --version - show version information
-i, --info - show descriptions for the given useflags
-I, --info-installed - show descriptions for the given useflags and
their current impact on the installed system
-g, --global - show only global use flags (suboption)
-l, --local - show only local use flags (suboption)
-a, --active - show currently active useflags and their origin
-E, --enable - enable the given useflags
-D, --disable - disable the given useflags
-R, --remove - remove all references to the given flags from
make.conf and package.use to revert to default
settings
-P, --prune - alias for --remove
-p, --package - used with -E, -D, and -R to apply to a
specific package only
Notes: euse currently works for global flags defined
in make.globals, make.defaults, make.conf, use.force, and use.mask
and local flags defined in package.use and individual package ebuilds.
It might have issues with cascaded profiles. If multiple options are
specified only the last one will be used |
_________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
charles17 Advocate
Joined: 02 Mar 2008 Posts: 3664
|
Posted: Mon Jun 08, 2020 7:04 pm Post subject: Re: command line command to add flags to make.conf file |
|
|
mikefot wrote: | So if a package like cups needed 8 flags listed on the package wiki page is there a command I can use that will add the recommended set of standard flags to the make.conf file (or maybe package.use instead) for that package? |
What wiki page is telling you to enable 8 USE flags for cups?
Especially for Gentoo newbs it seems very confusing to find out which flags are really needed for a package.
You'd better start with those flags portage sets by default. That way you need not add or minus any USE flag.
And once you for certain know you need (or want) one more USE flag set or disabled, then do it manually in package.use
mikefot wrote: | Or do they all need to be added by hand to the make.conf file unless emerge decides to recruite e.g. |
Using --autounmask followed by etc-update might give you better control than ...-write. |
|
Back to top |
|
|
Banana Veteran
Joined: 21 May 2004 Posts: 1400 Location: Germany
|
Posted: Mon Jun 08, 2020 9:31 pm Post subject: |
|
|
It might be more work but writing and setting use flags by hand for each package and some global ones in make.conf will save you some trouble. You know what you have written in those files and then have a better choice by tracking down some use flag hell, which can happen _________________ My personal space
My delta-labs.org snippets do expire
PFL - Portage file list - find which package a file or command belongs to.
Last edited by Banana on Tue Jun 09, 2020 9:07 am; edited 1 time in total |
|
Back to top |
|
|
Ionen Developer
Joined: 06 Dec 2018 Posts: 2723
|
Posted: Tue Jun 09, 2020 4:37 am Post subject: |
|
|
Quick reminder that you can set global flags in package.use as well, much the same way it's suggested for python targets. Code: | */* X flag2 -unwanted
*/* CPU_FLAGS_X86: avx sse VIDEO_CARDS: -* nvidia
media-fonts/* -X | I personally prefer to have all USE flags in one place for a more global view of it and don't use make.conf for that.
That aside, I do generally recommend to set any of those by hand as well. Gives more awareness of what is set and why. Also, autounmask causing issues when changes it did are no longer needed (or never were) and user didn't realize that wouldn't be anything new (using it can be fine, but suggested changes should be reviewed or done manually). |
|
Back to top |
|
|
|