Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
command line command to add flags to make.conf file
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
mikefot
l33t
l33t


Joined: 19 Nov 2014
Posts: 709

PostPosted: Mon Jun 08, 2020 4:04 pm    Post subject: command line command to add flags to make.conf file Reply with quote

Dear All,

Is there a command line command to add flags to the
Code:
make.conf
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.
Code:
autounmask-write
to do it for you along with
Code:
 etc-update
if you ignore it and then try to emerge the package anyway?

Comments appreciated

Regards

MIchael Fothergill
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30942
Location: here

PostPosted: Mon Jun 08, 2020 4:09 pm    Post subject: Reply with quote

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
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Mon Jun 08, 2020 7:04 pm    Post subject: Re: command line command to add flags to make.conf file Reply with quote

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.
Code:
autounmask-write

Using --autounmask followed by etc-update might give you better control than ...-write.
Back to top
View user's profile Send private message
Banana
Veteran
Veteran


Joined: 21 May 2004
Posts: 1400
Location: Germany

PostPosted: Mon Jun 08, 2020 9:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2723

PostPosted: Tue Jun 09, 2020 4:37 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum