In portage-2.2.0_alpha there’s experimental support for EAPI 4_pre1. Please feel free to test it in your local overlays, and file bugs if you find any issues (bug 273620 tracks EAPI 4 support).
Category: Gentoo
portage-2.1.9 released
What’s new in sys-apps/portage-2.1.9? Here is the portage-2.1.9 section of the release notes:
- 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.
portage-2.1.8 has new –rebuilt-binaries option
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.
EAPI 3_pre2 with support for installation prefix and xz unpack
In portage-2.1.7.14 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.
New overlay config files: metadata/layout.conf and /etc/portage/repos.conf
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:
[funtoo]
aliases = gentoo
Informative output for unresolved blockers
In portage-2.1.6.7, 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).
New @live-rebuild and @module-rebuild package sets
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
Given the new InheritSet and OwnerSet classes, it’s easy to define similar sets based on inherited eclasses and installed files, respectively.
EAPI=”2_pre1″ with USE dependencies
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] )
Portage now supports building multiple packages in parallel
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
Handling File Collisions Between Blocking Packages
If one package blocks another package, the two packages conflict such that they cannot be installed simultaneously. These conflicts are often due to file collisions. In some cases, packages that block each other can be temporarily installed simultaneously. In order to resolve file collisions that occur between two blocking packages that are installed simultaneously, the overlapping files must be removed from the contents list of the package which was installed first.
Some cases may exist such that temporary simultaneous installation of blocking packages will cause some sort of problem. However, this type of solution will only be chosen for blockers that can not be satisfied in any other way, such as by simple adjustment of merge order. In addition, this type of solution will not be chosen if a blocking package will overwrite files belonging to packages from the system set, or packages that are runtime dependencies of Portage itself. These constraints serve to limit the probability that a chosen solution will cause an unforeseen problem.
gtk-doc-am vs. gtk-doc-1.8-r2
These are the packages that would be merged, in reverse order: Calculating dependencies... done! [blocks b ] dev-util/gtk-doc-am (is blocking dev-util/gtk-doc-1.8-r2) [uninstall ] dev-util/gtk-doc-1.8-r2 USE="emacs -debug -doc" [nomerge ] x11-libs/gtk+-2.12.9-r2 USE="X cups jpeg tiff xinerama -debug -doc -vim-syntax" [ebuild N ] dev-util/gtk-doc-am-1.10-r1 0 kB Total: 1 package (1 new, 1 uninstall), Size of downloads: 0 kB Conflict: 1 block
coreutils vs. mktemp
These are the packages that would be merged, in reverse order: Calculating dependencies... done! [nomerge ] sys-apps/coreutils-6.11 [6.9-r1] USE="acl nls xattr (-selinux) -static -vanilla%" [blocks b ] sys-apps/mktemp (is blocking sys-apps/coreutils-6.11) [blocks b ] >=sys-apps/coreutils-6.10 (is blocking sys-apps/mktemp-1.5) [uninstall ] sys-apps/mktemp-1.5 [ebuild U ] sys-apps/coreutils-6.11 [6.9-r1] USE="acl nls xattr (-selinux) -static -vanilla%" 0 kB Total: 1 package (1 upgrade, 1 uninstall), Size of downloads: 0 kB Conflict: 2 blocks