Difference between revisions of "Portage Profiles"

From Funtoo Linux
Jump to: navigation, search
(Classic Initialization)
(B. Initialize Cascading Profiles)
Line 12: Line 12:
 
=== B. Initialize Cascading Profiles ===
 
=== B. Initialize Cascading Profiles ===
  
# Starting from the main profile directory found using the steps above, look for
+
Using the main profile directory/symlink found above, the LocationsManager._addProfile() recursive function will be called that will create a list of all cascading profiles. This works by looking for a <tt>parent</tt> file in the profile directory. If this file exists, then each line is treated as a ''relative path'' and used to modify the path to the current profile, pointing to a "parent" profile that this particular profile modifies. There can be one than more parent, one per line. The first line in the <tt>parent</tt> file is the highest-priority parent.
 +
 
 +
Once this list is created, the code checks to see if <tt>/etc/portage/profile</tt> directory exists. If it does, it is tacked at the end of the cascading profile list, meaning that it is evaluated last and this user-defined profile has the ability to modify any of the cascading profile settings.

Revision as of 06:32, 28 December 2010

Classic Initialization

Classic profile initialization has been documented in this GitHub commit. The following is an overview of the code comments:

A. Find profile directory/symlink

  1. Look for a profile directory/symlink at /etc/make.profile, if one exists, use this as the main profile directory.
  2. If /etc/make.profile doesn't exist, use /etc/portage/make.profile as a back-up location if it also exists.
  3. If neither location exists, then a main profile directory doesn't exist.

B. Initialize Cascading Profiles

Using the main profile directory/symlink found above, the LocationsManager._addProfile() recursive function will be called that will create a list of all cascading profiles. This works by looking for a parent file in the profile directory. If this file exists, then each line is treated as a relative path and used to modify the path to the current profile, pointing to a "parent" profile that this particular profile modifies. There can be one than more parent, one per line. The first line in the parent file is the highest-priority parent.

Once this list is created, the code checks to see if /etc/portage/profile directory exists. If it does, it is tacked at the end of the cascading profile list, meaning that it is evaluated last and this user-defined profile has the ability to modify any of the cascading profile settings.

Personal tools
Namespaces

Variants
Actions
Categories
Toolbox
Stuff