注意:

The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.

Install/pt-br/Portage

From Funtoo
Jump to navigation Jump to search

Introduzindo o Portage

Portage, o gerenciador de pacotes do Funtoo Linux possui um comando chamado emerge que é utilizado para construir e instalar pacotes a partir do código fonte. ele também cuida para instalar todas as dependências de pacotes. Você invoca o emerge assim:

(chroot) # emerge packagename

Quando você instala um pacote especificando seu nome na linha de comando, o Portage grava seu nome no arquivo /var/lib/portage/world. Ele faz assim por que ele assume que, desde que você tem instalado o pacote por nome, você quer considerá-lo parte do seu sistema e quer manter o pacote atualizado no futuro. Isso é recurso útil, desde quando pacotes estão sendo adicionados a configuração world, podemos atualizar nosso sistema inteiro ao digitar:

(chroot) # emerge --sync
(chroot) # emerge -auDN @world

This is the "official" way to update your Funtoo Linux system. Above, we first update our Portage tree using git to grab the latest ebuilds (scripts), and then run an emerge command to update the world set of packages. The options specified tell emerge to:

  • a - show us what will be emerged, and ask us if we want to proceed
  • u - update the packages we specify -- don't emerge them again if they are already emerged.
  • D - Consider the entire dependency tree of packages when looking for updates. In other words, do a deep update.
  • N - Update any packages that have changed (new) USE settings.

You should also consider passing --with-bdeps=y when emerging @world, at least once in a while. This will update build dependencies as well.

Of course, sometimes we want to install a package but not add it to the world file. This is often done because you only want the package installed temporarily or because you know the package in question is a dependnecy of another package. If this behavior is desired, you call emerge like this:

(chroot) # emerge -1 packagename

Advanced users may be interested in the Emerge wiki page.

Updating World

Now is actually a very good time to update the entire system and it can be a good idea to do so prior to first boot.

(chroot) # emerge --sync
(chroot) # emerge -auDN @world
   Important

Make sure you read any post emerge messages and follow their instructions. This is especially true if you have upgraded perl or python.