Difference between pages "Virtual Packages" and "Package:Layman"

From Funtoo
(Difference between pages)
Jump to navigation Jump to search
 
 
Line 1: Line 1:
Virtual packages are special packages that correspond to a feature that can be satisfied by one or more package(s). This Wiki page aims to describe when and how to use them correctly, and what are their implications.
{{Ebuild
|Summary=Tool to manage Gentoo overlays
|CatPkg=app-portage/layman
|Homepage=http://layman.sourceforge.net/
}}
Layman is an "overlay" external repository management tool.


== Virtual packages, metapackages and package sets ==
=== Installation ===
Virtual packages, metapackages and package sets are similar concepts. However, they have a few important differences that make them fit for different use cases.
<console>###i## emerge layman</console>
=== Using Layman ===
Fetch, and display a list of overlays:
<console>###i## layman -L</console>


Virtual packages and metapackages are regular Funtoo packages (ebuilds) that install no files. Instead, they cause other packages to be installed by specifying them in their runtime dependencies. They can both be used in any context valid for regular packages. They can have multiple versions, slots and USE flags. They have to be located in an active repository, and once there they can be installed and uninstalled like regular packages.
Add an overlay to your system:
<console>###i## layman -a <overlay name></console>
After adding first overlay(s) [[make.conf]] must source laymans overlays for emerge to pull in packages from external sources.  This line needs to be below everything else in make.conf.
<console>###i## echo "source /var/lib/layman/make.conf" >> /etc/portage/make.conf</console>
Delete an overlay from your system:
<console>###i## layman -d <overlay name></console>


Package sets are not packages but special atoms supported by Portage. Package sets can only specify other packages, either via a static list or dynamically (e.g. via running Python code that determines the package list). Package sets can't be versioned and don't have USE flags. Package sets can be used alongside packages in emerge commands and other package sets but they can't be referenced inside regular packages. Package sets can be installed into user's system, located in repositories or created by user in Portage configuration.
==== Masking Overlay Packages ====
Overlays have the power to override distro packages. To avoid conflicts, mask everything in the overlay, and unmask the packages that are necessary to your system.


Virtual packages represent a commonly used feature that can be provided by multiple different providers. Virtuals provide a convenient way of specifying all possible alternatives without having to update multiple ebuilds.
{{file|name=/etc/portage/package.mask|lang=|desc=mask all packages in an overlay|body=
*/*::overlay-name
}}


Metapackages and package sets are used to represent lists of packages that user may want to install together. They provide a convenience for users, e.g. providing a shortcut to install all packages comprising a desktop environment.
{{file|name=/etc/portage/package.unmask|lang=|desc=unmask packages to be used|body=
cat-egory/pack-age1
cat-egory/pack-age2
}}


== When virtual packages can be used? ==
==== Sync ====
For virtual package ebuild to work correctly, the two following requirements must be met:
 
# the virtual providers must be interchangeable at runtime with no consequences to the reverse dependencies. In other words, installing another provider and removing the currently used provider must not cause any breakage or require reverse dependencies to be rebuilt.
Sync a specific overlays ebuilds:
# Reverse dependencies need to have consistent, predictable requirements for the alternatives. In other words, the packages must not require a very specific versions of the alternatives.
<console>###i## layman -s <overlay name></console>
 
Sync all overlays:
<console>###i## layman -S</console>
 
Sync all overlays via eix:
<console>###i## eix-sync</console>
 
=== Troubleshooting ===
Problem:
Warning: an installed db file was not found at: ['/var/lib/layman/cache***.xml']
 
Solution:
<console>###i## layman -L</console>
 
{{EbuildFooter}}

Revision as of 08:20, February 13, 2015

Layman

   Tip

We welcome improvements to this page. To edit this page, Create a Funtoo account. Then log in and then click here to edit this page. See our editing guidelines to becoming a wiki-editing pro.

Layman is an "overlay" external repository management tool.

Installation

root # emerge layman

Using Layman

Fetch, and display a list of overlays:

root # layman -L

Add an overlay to your system:

root # layman -a <overlay name>

After adding first overlay(s) make.conf must source laymans overlays for emerge to pull in packages from external sources. This line needs to be below everything else in make.conf.

root # echo "source /var/lib/layman/make.conf" >> /etc/portage/make.conf

Delete an overlay from your system:

root # layman -d <overlay name>

Masking Overlay Packages

Overlays have the power to override distro packages. To avoid conflicts, mask everything in the overlay, and unmask the packages that are necessary to your system.

   /etc/portage/package.mask - mask all packages in an overlay
*/*::overlay-name
   /etc/portage/package.unmask - unmask packages to be used
cat-egory/pack-age1
cat-egory/pack-age2

Sync

Sync a specific overlays ebuilds:

root # layman -s <overlay name>

Sync all overlays:

root # layman -S

Sync all overlays via eix:

root # eix-sync

Troubleshooting

Problem: Warning: an installed db file was not found at: ['/var/lib/layman/cache***.xml']

Solution:

root # layman -L