GentooThis forum is for the discussion of Gentoo Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Gentoo is awesome, but I really have no idea if I am taking full advantage of the use flags. Normally I look at all the available use flags from the Gentoo website and stick every use flag I think I need into the /etc/make.conf file. The only problem with this is that a lot of packages have use flags enabled when they dont need to be. For instance, I don't want Amarok using mysql, but it does anyway because the mysql use flag is in make.conf. Basiscaly, I want few packages to use mysql and others not to. Of course a simple solution to this would be to remove mysql from the USE flags in /etc/make.conf and start using the package.use file to select which packages will use mysql. However this seems very tedious. I might have to add an entry into the package.use file for maybe over 100 packages.
I would like to know what is an appropriate list of USE flags I should put in my make.conf file. My system is a laptop that will be used for school, music, few games, and internet.
So what are some good use flags to put in my make.conf that all packages should use. Everything else ill just put into my package.use file.
as described in the Gentoo-handbook you can set the use-flags individually for every package. Therefor you'll have to create a file "/etc/portage/package.use". In your example of amarok and mysql you may insert a line
Code:
media-sound/amarok -mysql
May be that I wrong with the following suggestion since I'm new to Gentoo as well. I set only a few "systemwide" use-flags in /etc/make.conf. When emerging a package, I do a
Code:
emerge -pv package
and look at the use-flags which are enabled and which are disabled. And if I want to change this, I insert an entry in the package.use-file.
An easy method to change the useflags for a single emerge is to
Code:
USE="-mysql +anything" emerge anypackage
Note that you can both, add and remove use-flags with an entry in package.use.
I know how use flags works. I was just wondering if putting them all in the make.conf is even a good idea. If it's not, then what are some use flags that are good for the make.conf file?
You can continue to use global USE flags in /etc/make.conf. This is handy in general.
Use package.use to disable or enable flags for particular ebuilds.
If you disable flags you should have a huge package.use file.
Example ... I use KDE so I have added the kde USE flag globally.
I do not want celestia to use kde as KDE4 is currently not supported ... so I add this entry to package.use:
As have been already said, a "good flag" is different for every user and that's basically the point of using gentoo, every user can customize it based on personal needs.
and a lot of people would see that like a lot of USEs, others would say otherwise. I don't really care about gnome or kde so I don't want packages downloading dependencies of those environments just because such USE is in place, however I do care about vim so I really like every package capable of having a syntax file to be downloaded thus vim-syntax set in there is a very good choice for me.
Of course, my package.use had grow a lot over the time, however, I still prefer to have such a file in charge of any customization instead of dealing with many global USEs.
Try to keep focus on the packages more important to you, check the USEs of those packages individually and if you see a particular USE that affects many or all of those packages then you might have a candidate global USE.
No one can tell you what USE flags you will need. You will polish your config as you continue using Gentoo and learn how USEs affect each particular package.
Generally, people set the general case in make.conf, for example, if you want mysql support turned on for most packages, then you add "mysql" to your make.conf, on the contrary, if you want it disabled for most packages, then you use "-mysql" in your make.conf. Then you use package.use to add exceptions.
But this is entirely a matter of taste, after years of polishing and fine tuning I don't even have an USE definition in my make.conf, I use package.use exclusively to set all my use flags. It's quite big.
So basically, I don't need to set USE flags of a package in the make.conf file for installing just that package. I can specify the USE flags for that package at the command line or in etc/portage/package.use. Am I correct?
Let's I need to install a package like MPlayer. According to this guide, I need to setup framebuffer and alsa. Now let us assume that I never had them, would emerge download them as dependencies if I tried to install Mplayer?
Assume I already have installed framebuffer and alsa. While installing MPlayer, would I have to set the USE flags of framebuffer and alsa along with mplayer's USE flags?
So basically, I don't need to set USE flags of a package in the make.conf file for installing just that package. I can specify the USE flags for that package at the command line or in etc/portage/package.use. Am I correct?
USE flags in make.conf are global, they will be used for *all* the packages. If you set USE="alsa" in make.conf, then all packages that have the "alsa" USE flag will enable it.
USE flags in package.use affect only the package you specify.
USE flags that you supply in command line are not recorded, that means that the next time that package is re-emerged all your USE settings will be reverted to the default state. In short never ever do it this way unless you enjoy trouble. Setting USE in command line is only advised when you are doing some check, for example when using -pv:
Code:
USE="foo -bar moo -cow" emerge -pv <whatever>
Then look at the output, set the USE flags the real way (either in make.conf or package.use) and run the emerge command without -p.
Quote:
Let's I need to install a package like MPlayer. According to this guide, I need to setup framebuffer and alsa. Now let us assume that I never had them, would emerge download them as dependencies if I tried to install Mplayer?
You don't need alsa nor framebuffer for mplayer to work, but if you want to use them just set the right USE flags (again, either in make.conf or package.use) and then emerge mplayer. USE flags can (and will) push any needed package as a dependency, and will configure mplayer to compile and link against the required libraries. This doesn't mean that you don't need extra setup. If you have never used the framebuffer or alsa then you are going to need to set them up first. If they are not running mplayer can't use them of course.
There are guides for both. Both alsa and fb need kernel support, alsa will need at least a correct mixer setting (make sure vol is not zeroed nor muted, etc), fb will need that you set the right video mode on the kernel boot line (usually in grub.conf). How to write that parameter entirely depend on the fb driver that you use. Some fb drivers will also need special setup, like in the case of uvesafb.
For extra help with any of these open a new specific thread.
Quote:
Assume I already have installed framebuffer and alsa. While installing MPlayer, would I have to set the USE flags of framebuffer and alsa along with mplayer's USE flags?
If you want to take advantage of these capabilities in mplayer then you need to make sure that these flags are enabled for mplayer when emerging it (look at the -pv or -av output). USE flags will push dependencies, yes, but that's not the only thing they do. They can be used to control configure parameters which will ultimately determine the features that are compiled into a given package.
After I do an install of Gentoo, I have been just going through the list of global USE flags and adding the ones I think I would want and need for my system. Doing this, however, makes my make.conf file look massive with all the use flags in it. There are so many global use flags available, and I don't know which are important and which to leave out of the make.conf file.
I'll do what most of you said and experiment on my own to find the best configuration for my system.
Getting used to the USE flags system can take a long time, but don't worry too much about them. Eventually you will get the hang of it. There's nothing wrong with a big make.conf, but if you are patient enough you can always migrate all the flags to package.use, that can be time consuming and quite boring. I guess you could also put them into a separate file and then use the "source" shell statement from make.conf to read the secondary file, much like you do when using layman overlays. Never tested it.
In my experience so far the USE flags are great in Gentoo but can lead to a lot of dependency issues and tuning.
Your '/etc/make.profile' links to the default profile for your architecture. You can see the defaults for USE suggested in '/usr/portage/profiles/targets'.
For example a desktop:
/usr/portage/profiles/targets/desktop
This gives you an idea of what Gentoo thinks are the best flags for a desktop. The Gentoo blog articles I have seen stress that they realize a basic desktop should not include KDE and Gnome unless the user wants them and adds them later.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.