Article Title: teaches you how to effectively manage your GentooUSE tags. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Before you manage your USE tag, let's take a look at where you can define the USE tag.
All places where the USE tag can be configured:
/Usr/portage/profile/base/make. defaults /Usr/portage/profile/default-linux/make. defaults /Usr/portage/profile/default-linux/x86/make. defaults /Usr/portage/profile/default-linux/x86/2007.0/make. defaults /Etc/make. conf /Etc/portage/package. use |
USE set as Environment Variable
After learning about the location of the tag, what is the reading sequence of the tags?
The order of the USE mark is read from low to high, and only the first encounter is used for reading. For example, if-ssl is defined in package. use, the definition of ssl in make. conf will be ignored.
Make. the default USE setting in ults is in/etc/make. the USE setting in conf is in/etc/portage/package. use settings in USE are used as environment variables.
All the above configuration files except make. defaults are not recommended to be modified (after emerge -- sync, your modifications will be overwritten). Other configuration files can be freely added and modified.
Management:
Before management, make sure that you have installed Gentoolkit, which saves you a lot of time.
Before managing the USE tag, we must first distinguish global and local concepts. Global tag, as the name implies, is the tag that system software packages or most software packages depend on. The local tag can be customized for different installed software packages.
However, when a local tag is placed by default, it also plays a global role. Because this local tag may be activated every time a software package is installed.
In Gentoo portage, many default tags are officially provided, which are distributed across multiple make. ults files (see the list of prerequisite files ). These labels are global and local. From this point, we can see that although the official website complies with the COC principle (convention over configuration ). However, for a user who prefers to customize the local tag, it is a little hard to set the local tag to the default value.
In this case, we recommend that you disable all default local tags and only retain the global tag. Then, add the required features when installing the software package. (Add the package name and the tag to which the package depends to package. use)
In the preceding method, some people may ask why to block it first and then add it when installing it. Instead of adding it by default, it is unnecessary to delete it during installation. The reason is that you need to delete more packages than you need to add (for example, ipv6, which means all packages should be deleted. In fact, you should follow the idea that local and global separation is preferred for using many local packages, ).
To disable the local default flag, follow these steps:
1. euse-a can view all activated tags.
2. Use euse-I xx to check which ones are local.
3. Cancel all these tags from euse-D xx.
After the mark is cleared, you need to perform a system update emerge-avtuDN world. Through the system update, you can see the impact of the modification on the mark. (Most of the software packages used to delete the mark just now need to be re-compiled. You want to add the software package to your local computer, and the software will not be compiled after it is not needed)
Now and in the future, you can manually activate your favorite features for each software package.