Funtoo Basic concepts

From Funtoo
Jump to: navigation, search

The following article is about several concepts which are very important to clearly understand how Funtoo works.

Funtoo branches

Keywording and USE flags

An analogy

This is most probably the most fundamental and central point to understand as it covers how the package management in Funtoo works "coast-to-coast". Basically this is extremely simple and pretty easy understand with a little analogy in your daily life: you are due to go the the grocery and several places around and to not forget what you have to do, you put on the list several items like:

  • Grocery:
    • Bread
    • Eggs
    • Butter
  • Bank $40
  • Photos

When you will follow your list, every item will trigger an action like making you go in a particular section in the grocery to put a bag of bread in your basket or going to the bank outlet to withdraw $40. Those list items are a bit like switches: if you write (define) the item you turn a switch on making you take the appropriate action, if you don't write an item on the list you leave the switch turned off and you won't do something special.

Items on the list are, by convention, related to what they denote: the good sense makes you write "beer" to make you remember to buy some beer. Technically, you can achieve the exact same thing by writing "cookies" or "butter" (unless some very good reason like hiding some evil intentions to the eyes of your house overlord ;-)). If you give your list to someone else and because, by convention, items on your list denote what they are related to.

Portage will follow a similar behaviour, although more subtle: depending on the "grocery list items" you define at various places in the system you can govern how Portage acts (what features present on the system it is allowed to use, which are the packages it can consider or forget about, and so on. Those switches are split among several categories like:

  • Features for those that control the features portage can use or can't use (like "you can use distcc if present" or "you can fetch the source code archive in the background" or "keep aside a binary archive of a package once compiled" or "Use ccache if present")
  • USE flags for those that governs what features are activated in the different packages you install on a machine. USE flags are a bit more subtle in practise because they can also express extra action to take care of like "download and copy the package official documentation in /usr/share/doc" or "automatically add a symlink /usr/bin/blahblah which points to /usr/bin/mypackage". It is not easy to give a general case here due to the lack of a rigid rule telling what USE flag should do what (exact care given by portage varies from package to package depending on what orders are written in the ebuild file), those are only a convention.
  • Keywords

Portage and Portage tree