- The emerge –autounmask option is now enabled by default. The –autounmask-write option can be used to have config changes automatically written to the appropriate files (respecting –ask and CONFIG_PROTECT). If –autounmask behavior is not desired as the default behavior, then it can be disabled by adding –autounmask=n to the EMERGE_DEFAULT_OPTS variable in make.conf. Refer to the emerge(1) man page for more information.
- Improve handling of repositories/overlays for cases in which the same ebuild is provided by multiple repositories but with different masking status, and support for repository constraints on atoms (atom::repo) in configuration files. Refer to the portage(5) man page for more information.
- Add emerge –rebuild-if-* options that trigger rebuilds of reverse dependencies when packages are rebuilt or updated. Related –rebuild-exclude and –rebuild-ignore options can be used to avoid rebuilds for specific packages.
- Add emerge –reinstall-atoms, –useoldpkg-atoms, and –usepkg-exclude options which can be used to alter selection rules for specific packages.
- Add FEATURES=parallel-install and ebuild-locks, allowing for greater parallelization when installing packages (by using finer-grained locks). Refer to the make.conf(5) man page for more information.
- The emerge “world” set now includes separate “selected” and “system” sets, where the “selected” set includes packages listed in /var/lib/portage/world.
- Package set names in emerge arguments have to be prefixed with @ (exceptions: ‘world’ and ‘system’ can be used without the prefix).
- Configuration files now support atoms with wildcards inside the category and package name parts of the atoms. See the portage(5) man page for details.
- The functionality of the autounmask program is emulated by the new emerge –autounmask option, which outputs required configuration changes for package.accept_keywords and package.use.
- The new emerge –exclude option allows packages to be excluded from the dependency resolution. Doing so might result in a fatal error. See the emerge(1) man page for details.
- Per-package environment variables can be set with the new package.env configuration file in /etc/portage/. See the portage(5) man page for details.
- Support for per-package bashrc files in /etc/portage/env. See the portage(5) man page for details.
- The package.keywords configuration file in /etc/portage/ is now deprecated. Instead use the package.accept_keywords file which has the same format and behavior. See the portage(5) man page for details.
- FEATURES=”fixlafiles” (enabled by default): Rewrites newly installed .la files in the same way dev-util/lafilefixer does. Note that this won’t fix your installed .la files.
In portage-2.1.8 there’s a new emerge –rebuilt-binaries option that is very useful for people who build binary packages and install them on multiple computers (using PORTAGE_BINHOST or shared PKGDIR). The option causes packages to be automatically reinstalled in cases when rebuilt binary packages are available (due to revdep-rebuild or similar cases). Rebuilds are detected by comparison of BUILD_TIME package metadata. This option is enabled automatically when using binary packages (–usepkgonly or –getbinpkgonly) together with –update and –deep.
In portage-22.214.171.124 and 2.2_rc59 there is support for EAPI 3_pre2, which adds support for installation prefix variables (ED, EPREFIX, and EROOT) and support for unpack of *.xz compressed files. Bug 296700 tracks EAPI 3 support in portage, and bug 273620 is for the EAPI 4 stuff that used to be in EAPI 3 but got delayed.
Since portage-2.2_rc29 there is support for a metadata/layout.conf file in an overlay which is used to specify names of repositories which satisfy dependencies on eclasses and/or ebuilds. See the QA Overlay Layout support thread on the gentoo-dev mailing list for information about why this is necessary, and refer to the portage(5) man page for details about the layout.conf format
If you want overlay eclasses to override eclasses from other repos then you’ll want to refer to the portage(5) man page for information about the /etc/portage/repos.conf file which can be used to specify site-specific repository configuration information. Note that configuration settings which are specified in repos.conf do not apply to tools such as repoman(1) and egencache(1), since operations performed by these tools are inherently not site-specific.
Since portage-2.2_rc31, repos.conf can be used to create repository aliases, in case you want to substitute one repo for another one that is specified in layout.conf. This is especially useful for funtoo users, who may want something like this in /etc/portage/repos.conf:
aliases = gentoo
In portage-126.96.36.199, emerge output for unresolved blockers now includes information about how conflicting packages got pulled into the dependency graph. This information helps users understand the reason why a particular blocker hasn’t been resolved automatically. Here is some sample output from bug 234907:
Calculating dependencies... done! [ebuild N ] sys-libs/e2fsprogs-libs-1.41.3-r1 USE="nls" [ebuild U ] sys-fs/e2fsprogs-1.41.3 [1.40.9] [blocks b ] <sys-fs/e2fsprogs-1.41 ("<sys-fs/e2fsprogs-1.41" is blocking sys-libs/e2fsprogs-libs-1.41.3-r1) [blocks B ] sys-libs/com_err ("sys-libs/com_err" is blocking sys-libs/e2fsprogs-libs-1.41.3-r1) [blocks B ] sys-libs/ss ("sys-libs/ss" is blocking sys-libs/e2fsprogs-libs-1.41.3-r1) [blocks B ] sys-libs/e2fsprogs-libs ("sys-libs/e2fsprogs-libs" is blocking sys-libs/com_err-1.40.9, sys-libs/ss-1.40.9) * Error: The above package list contains packages which cannot be * installed at the same time on the same system. ('installed', '/', 'sys-libs/com_err-1.40.9', 'nomerge') pulled in by ~sys-libs/com_err-1.40.9 required by ('installed', '/', 'sys-libs/ss-1.40.9', 'nomerge') ('installed', '/', 'sys-libs/ss-1.40.9', 'nomerge') pulled in by sys-libs/ss required by world ('ebuild', '/', 'sys-libs/e2fsprogs-libs-1.41.3-r1', 'merge') pulled in by >=sys-libs/e2fsprogs-libs-1.41 required by ('installed', '/', 'sys-apps/util-linux-2.14.1', 'nomerge') ~sys-libs/e2fsprogs-libs-1.41.3 required by ('ebuild', '/', 'sys-fs/e2fsprogs-1.41.3', 'merge')
The above output shows that the sys-libs/ss package got pulled into the dependency graph by the world set. This package is obsolete, so the user should remove it from /var/lib/portage/world. In the future, I plan to add support for emerge to ask the user if they’d like to have the obsolete package automatically removed from the world file (bug 257009).
I’ve implemented new @live-rebuild and @module-rebuild package sets, and added them to the default sets.conf file for the next sys-apps/portage release (that will be 2.2_rc6). Here are the relevant sections from sets.conf:
# Installed ebuilds that inherit from known live eclasses. [live-rebuild] class = portage.sets.dbapi.InheritSet world-candidate = False inherits = cvs darcs git mercurial subversion # Installed packages that own files inside /lib/modules. [module-rebuild] class = portage.sets.dbapi.OwnerSet world-candidate = False files = /lib/modules
Version 2.2_rc5 of sys-apps/portage adds support for EAPI=”2_pre1″ which has some changes in conditional USE dependency syntax. The previous experimental EAPI=”2_pre0″ value is no longer supported.
For more information about experimental EAPI features, refer to bug #233213 and also see the “Ebuild” chapter of the html documentation that is installed with portage when USE=doc is enabled. I’ve posted a copy of the EAPI=”2_pre1″ documentation here:
EAPI 2_pre1 Helpers doman Language codes in file names are now used for path translation. Table 6.1. Man Page Path Translation Source Destination foo.1 /usr/share/man/man1/foo.1 foo.lang.1 /usr/share/man/lang/man1/foo.1 USE Dependencies Unconditional USE Dependencies Table 6.2. Syntax Examples Example Meaning foo[bar] foo must have bar enabled foo[bar,baz] foo must have both bar and baz enabled foo[-bar,baz] foo must have bar disabled and baz enabled Conditional USE Dependencies Table 6.3. Syntax Examples Compact Form Equivalent Expanded Form foo[bar?] bar? ( foo[bar] ) !bar? ( foo ) foo[!bar?] bar? ( foo ) !bar? ( foo[-bar] ) foo[bar=] bar? ( foo[bar] ) !bar? ( foo[-bar] ) foo[!bar=] bar? ( foo[-bar] ) !bar? ( foo[bar] )
In >=portage-2.2_rc2 there are a few new emerge options that many Gentoo users will probably be interested in:
--jobs JOBS Specifies the number of packages to build simultaneously. Also see the related --load-average option. --keep-going Continue as much as possible after an error. When an error occurs, dependencies are recalculated for remaining packages and any with unsatisfied dependencies are automatically dropped. Also see the related --skipfirst option. --load-average LOAD Specifies that no new builds should be started if there are other builds running and the load average is at least LOAD (a floating-point number). This option is recommended for use in combination with --jobs in order to avoid excess load. See make(1) for information about analogous options that should be configured via MAKEOPTS in make.conf(5).
Here is some sample parallel build output from a catalyst stage2 build, with emerge’s new –jobs option enabled:
>>> Building (1 of 10) sys-devel/gettext-0.17 for / >>> Building (2 of 10) sys-libs/zlib-1.2.3-r1 for / >>> Building (3 of 10) virtual/libintl-0 for / >>> Building (4 of 10) dev-util/unifdef-1.20 for / >>> Installing virtual/libintl-0 to / >>> Installing dev-util/unifdef-1.20 to / >>> Building (5 of 10) sys-kernel/linux-headers-2.6.23-r3 for / >>> Installing sys-libs/zlib-1.2.3-r1 to / >>> Jobs: 3 of 10 complete, 2 running Load avg: 3.44, 1.46, 0.69