Difference between revisions of "Package:Ego"

From Funtoo
Jump to navigation Jump to search
(Added epro show-json and epro get)
(moving epro usage to Funtoo Profiles page.)
(One intermediate revision by the same user not shown)
Line 5: Line 5:
}}
}}


{{c|ego}} (aka personality) is master program used to manipulate Funtoo system settings. It is present in base system, and in every stage3. It consist of various modules, which serve for view, change and control a basic system. Below we describe ego's module called <code>epro</code> which, one may guess, is a profile manager.
{{c|ego}} is Funtoo's official system personality management tool, designed to eventually replace the venerable {{c|eselect}} from Gentoo Linux. Daniel Robbins created a new meta-tool to replace eselect because eselect has a couple of design issues. It requires extensions to be written as shell scripts, which is a big limitation. With the advent of Funtoo's modular profile system, {{c|eselect profile}} was becoming cumbersome to use, and I needed to make the tool faster and more feature-rich. Ultimately, shell scripts are too slow and too hard to use to implement advanced functionality.


=== Usage ===
{{c|ego}} is a meta-tool that works similarly to eselect. Typing {{c|ego}} will show a list of available commands. Some of the benefits of ego over eselect are that ego modules can be implemented in any language. In addition, the ego architecture is designed so that the modules are themselves stand-alone commands, which allows you to access these sub-commands using shortcuts. For example, {{c|epro}} is a shortcut for {{c|ego profile}}.
[[Funtoo 1.0 Profile|Funtoo profiles]] are used to define defaults for Portage specific to your needs. There are five basic profile types: arch, build, subarch, [[Flavors and Mix-ins|flavor, and mix-ins]]:


;arch: typically <code>x86-32bit</code> or <code>x86-64bit</code>, this defines the processor type and support of your system. This is defined when your stage was built and should not be changed.
=== Ego Modules ===
;build: defines whether your system is a <code>current</code>, <code>stable</code> or <code>experimental</code> build. <code>current</code> systems will have newer packages unmasked than <code>stable</code> systems. This is defined when your stage is built and is typically not changed.
;subarch: Defines optimizations for your CPU. The subarch is set at the time the stage3 is built, but can be changed later to better settings if necessary. Be sure to pick a setting that is compatible with your CPU.
;flavor: defines the general type of system, such as <code>server</code> or <code>desktop</code>, and will set default USE flags appropriate for your needs.
;mix-ins: define various optional settings that you may be interested in enabling.


One arch, build and flavor must be set for each Funtoo Linux system, while mix-ins are optional and you can enable more than one if desired.
{{TableStart}}
 
{{3Col|'''type'''|'''sub-command'''|'''description'''}}
Remember that profiles can often be inherited. For example, the <code>desktop</code> flavor inherits the <code>workstation</code> flavor settings, which in turn inherits the <code>X</code> and <code>audio</code> mix-ins. You can view this by using {{c|epro}}:
{{3Col|profile|{{c|epro}}|Profile management -- see [[Funtoo Profiles]] for usage information}}
 
{{TableEnd}}
{{console|body=
# ##i## epro show
 
=== ##g##Enabled Profiles##!g##: ===
 
        arch: ##c## x86-64bit
      build: ##c## current
    subarch: ##c## intel64-haswell
      flavor: ##c## desktop
    mix-ins: ##c## gnome
 
 
=== ##g##All inherited flavors from desktop flavor##!g##: ===
 
                    ##c##workstation (from desktop flavor)
                            ##c##core (from workstation flavor)
                        ##c##minimal (from core flavor)
 
=== ##g##All inherited mix-ins from desktop flavor##!g##: ===
 
                              ##c##X##!c## (from workstation flavor)
                          ##c##audio##!c## (from workstation flavor)
                            ##c##dvd##!c## (from workstation flavor)
                          ##c##media##!c## (from workstation flavor)
      ##c##mediadevice-audio-consumer##!c## (from media mix-in)
                ##c##mediadevice-base##!c## (from mediadevice-audio-consumer mix-in)
      ##c##mediadevice-video-consumer##!c## (from media mix-in)
                ##c##mediadevice-base##!c## (from mediadevice-video-consumer mix-in)
        ##c##mediaformat-audio-common##!c## (from media mix-in)
          ##c##mediaformat-gfx-common##!c## (from media mix-in)
        ##c##mediaformat-video-common##!c## (from media mix-in)
                  ##c##console-extras##!c## (from workstation flavor)
                          ##c##print##!c## (from desktop flavor)
}}
 
To view available profiles:
{{console|body=
# ##i## epro list
}}
 
Enabled profiles will be highlighted in cyan. Directly enabled profiles will be in bold and have an asterisc {{c|*}} appended.
 
To change the profile arch to x86-64:
{{console|body=###i## epro arch x86-64bit}}
 
To change the build to current:
{{console|body=###i## epro build current}}
 
To change the subarch to generic_64:
{{console|body=###i## epro subarch generic_64}}
 
To change the profile flavor:
{{console|body=
# ##i## epro flavor desktop
}}
 
To add a mix-in:
 
{{console|body=
# ##i## epro mix-ins +gnome
}}
 
To remove a mix-in:
{{console|body=
# ##i## epro mix-ins -gnome
}}
 
To get a JSON output of your profiles:
{{console|body=
# ##i## epro show-json
}}
 
To get the current value of a given profile:
{{console|body=
# ##i## epro get <build|flavor|arch|subarch|mix-ins>
}}


{{EbuildFooter}}
{{EbuildFooter}}

Revision as of 19:07, July 16, 2015

Ego

   Tip

We welcome improvements to this page. To edit this page, Create a Funtoo account. Then log in and then click here to edit this page. See our editing guidelines to becoming a wiki-editing pro.


ego is Funtoo's official system personality management tool, designed to eventually replace the venerable eselect from Gentoo Linux. Daniel Robbins created a new meta-tool to replace eselect because eselect has a couple of design issues. It requires extensions to be written as shell scripts, which is a big limitation. With the advent of Funtoo's modular profile system, eselect profile was becoming cumbersome to use, and I needed to make the tool faster and more feature-rich. Ultimately, shell scripts are too slow and too hard to use to implement advanced functionality.

ego is a meta-tool that works similarly to eselect. Typing ego will show a list of available commands. Some of the benefits of ego over eselect are that ego modules can be implemented in any language. In addition, the ego architecture is designed so that the modules are themselves stand-alone commands, which allows you to access these sub-commands using shortcuts. For example, epro is a shortcut for ego profile.

Ego Modules

typesub-commanddescription
profileeproProfile management -- see Funtoo Profiles for usage information