Gentoo Captain’s Journal III

Entry #3 Oct 5th 2016:

As promised, this one will be devoted to Gentoo’s package manager – Portage. Almost all distributions have streamlined package management nowadays. No need to fetch tarballs via “wget” or “curl”, inspect code and compile manually with “make”. Everything is handled by a set of utilities that do dependency resolution, sync repositories and register installed software.  Gentoo has all of this and more. Below, a quick roundup of common Portage query operands applicable to the “emerge” Python tool:

  • –ask (-a) – asks for user confirmation before beginning installation
  • –verbose (-v) – print additional useful (for instance, for debugging purposes) information
  • –update (-u) – update installed packages
  • –deep (-D) – check whole ports tree deeply during dependency resolution
  • –sync – synchronize the local ports tree with a mirror
  • –new-use (-N) – a new USE flag was added to one of the configuration files; include that when preparing the payload
  • –depclean – remove any lingering, unused dependencies
  • –unmerge (-c) – remove selected package(s)
  • –quiet (-q) – do not print the complete transaction details to stdout
  • –quiet-build – do not print compilation logs to stdout
  • –noreplace – do not re-emerge package if it was already installed
  • –oneshot – prepare transaction, but do not write details to configuration files

There are of course many more, all of which can be found in the manpage for “emerge”. Interestingly, operands may be used in combinations so that “emerge -auDN” or “emerge -auD” is the standard update command. In addition, performing “–depclean” together with the “–verbose” operand prompts Portage to do reverse dependency resolution also. Contrary to other GNU/Linux distributions, Gentoo’s Portage organizes software in sets (@). @system is the basic set of system utilities vital for package building and management. @world is a higher level set, encompassing also software specifically installed by the user. One can create additional sets locally to store information on favorite applications.

I think Portage is an amazing package manager that does so much that apt and dnf should be ashamed or at least envious. I wish other distributions would offer a similar level of flexibility.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s