Note

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

Install/Introducing Portage/zh-cn

From Funtoo
Jump to navigation Jump to search
This page is a translated version of the page Install/Introducing Portage and the translation is 64% complete.
Other languages:
English • ‎español • ‎português do Brasil • ‎русский • ‎中文(中国大陆)‎

安装指南:介绍 Portage

Install Guide, Chapter 12 < Prev Next >

Portage,是 Funtoo Linux 的包管理器,其中包含了一个叫做 emerge 的命令,这个命令可以用来从源码构建并安装包。也能同时管理好所有的依赖关系。你可以按照下面的说明调用 emerge:

chroot # emerge packagename

When you install a package by specifying its name in the command-line, Portage records its name in the /var/lib/portage/world file. It does so because it assumes that, since you have installed it by name, you want to consider it part of your system and want to keep the package updated in the future. This is a handy feature, since when packages are being added to the world set, we can update our entire system by typing:

chroot # ego 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.

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 dependency of another package. If this behavior is desired, you call emerge like this:

chroot # emerge -1 packagename

高级用户可以看看 Emerge 的维基页面。

Install Guide, Chapter 12 < Prev Next >