Portage (Funtoo)

From Funtoo Linux
Revision as of 05:23, 23 December 2010 by Drobbins (Talk)

Jump to: navigation, search

Contents

Introduction

Project Details
Hosting http://github.com/funtoo/portage-funtoo
Bug Reports funtoo-dev@googlegroups.com

Portage is the official package manager of Funtoo Linux. Daniel Robbins maintains a slightly different version from upstream Gentoo Linux, with support for mini-manifests.

Using Emerge

The recommended way to update your system

# emerge --sync
# emerge -auDN world --jobs=3

Emerge Options

--with-bdeps=y
This option tells Portage to consider DEPEND for already-installed packages (that are not required to be considered) when updating your system. So when used with -uDN @world, the --with-bdeps=y option will cause any updated packages listed in DEPEND @world set's ebuilds -- not just those packages being installed/updated -- to be upgraded. However, if any updates are made to a package's DEPEND, it will not cause the specific package(s) containing the DEPEND to be rebuilt, so that they were explicitly built against the packages that were just upgraded. To Daniel Robbins, this seems like a half-step rather than the full upgrade step. It would be preferable if there were an option to cause any parent packages to be rebuilt if anything in DEPEND were upgraded. The reason for this is that if there is a change in DEPEND, then there is the potential for the parent ebuild to also be affected by these changes in any number of ways. So rebuilding against the most recently-upgraded DEPEND is generally safest.

Portage Specifications

The latest progress and changes related to EAPI/PMS and Portage can often be found in the Gentoo Council meeting logs, which are listed on the Gentoo Council page.

The latest PMS specification to be approved by the Gentoo Council is available: eapi-3-approved-2010-01-18. The PMS specification is an attempt to codify the inner workings of Portage, and is authored by Ciaran McCreesh and Stephen Bennett as a Gentoo-hosted project.

Portage Variables

Portage's behavior can be controlled by a number of configuration settings other variables that can be defined within the ebuild itself. In addition, a number of these variables are defined for the ebuild automatically by Portage. These variables are now documented on their own page: Portage Variables.

Multiple ABI Support

Portage contains support for multiple ABIs (Application Binary Interfaces) co-existing on the same system. This functionality has been extensively documented and has been moved to its own page: Multiple ABI Support.

Ebuild Functions

An ebuild developer has the ability to define Ebuild Functions that define steps to perform during a particular part of the ebuild lifecycle. These steps are now documented on their own page: Ebuild Functions .

Funtoo Portage Development

The Funtoo Core Team is currently working on a general-purpose plug-in system so that the GNU info file regeneration, news update display, and scanning of files that need updating in /etc can be pulled out of the official Portage emerge code. In addition, this plug-in system will allow other types of things to be hooked into various phases of emerge. This will allow various new plug-ins to be developed and used on systems, such as periodic security checks, etc.

Funtoo Features/Changes

emerge --sync from git
If a git-based Portage tree is already in place, emerge --sync will run "git pull" to update the underlying Portage tree.
Sed Wrapper Symlink and PATH fix
The Funtoo version of Portage has replaced the BSD-only sed wrapper with a symlink. This will eventually be deprecated. The sed wrapper was a way to provide BSD systems with a "sed" command that could be used inside ebuilds that worked similarly to GNU sed. A PATH fix has been applied so that /bin/sed will be detected first anyway.
mini-manifest
Funtoo's Portage supports a special mode of operation where Manifests only contain digests for distfiles and not for files in the Portage tree. This is to eliminate redundant digests since git already provides SHA1 digests. This feature is currently enabled by adding "mini-manifest" to FEATURES in /etc/make.conf but the intention is to eventually move it to a repo-specific option. Funtoo provides a special "mini-manifest" tree that is smaller than the full-size Portage tree, and is intended to be used with the mini-manifest feature.
preserve bindist through USE filtering
Normally, anything not in an ebuild's IUSE is stripped from the USE passed to ebuild.sh. This patch allows "bindist" to not be stripped, so it can be used as a means to disable pre-merge sanity checks that may exist in pkg_setup() and pkg_pretend() but will not otherwise affect the resultant build. If "bindist" will affect some functionality in the package, then it should be added to an ebuild's IUSE. This patch allows pkg_setup() and pkg_pretend() to look for "bindist", which indicates that the ebuild is being built for release, typically in an automated fashion, and thus runtime sanity checks that might otherwise run can be optionally skipped. This check is used by the udev-160-r1.ebuild to see if we should fail if we are merging udev on a system where the kernel will not support it. In Metro, this is not a big deal, but on a real production system, merging the udev on an incompatible system will render the kernel inoperable.
safetydance FEATURE
A new FEATURE setting is used by Funtoo's udev ebuild called "safetydance" which can be used to manually bypass sanity checks. This is an alternative to the "bindist" approach above. udev-160 in Funtoo Linux supports both approaches and Metro sets "safetydance" by default.
GLEP 55 removal
Some code to support GLEP 55 has been removed.
new metadata format (experimental)
Some tweaks to ebuild.sh have been made so that it is easier to support new metadata formats in the future.
xz-utils auto-dependency
There are several ebuilds in the Gentoo Portage repository that use .xz files but do not explicitly depend on xz-utils. A workaround has been added to ebuild.sh to add this dependency to metadata automatically if a .xz file exists in SRC_URI. This change is not yet in the official Portage sources but is being used on the Funtoo side when generating our git-based Portage trees.

Commands

emerge
high-level dependency-based package merge/unmerge tool
ebuild
lower-level package build tool

<issues/>

Personal tools
Namespaces

Variants
Actions
Categories
Toolbox
Stuff