Difference between pages "Virtual Packages" and "Emerge/pt-br"

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.
== Principiando com o emerge ==
Emerge é o front-end para o gerenciador de Portage do funtoo. With emerge it is easy to install, update or remove packages.


== Virtual packages, metapackages and package sets ==
=== Update Package Database ===
Virtual packages, metapackages and package sets are similar concepts. However, they have a few important differences that make them fit for different use cases.
'''Sync local package database. This will update your local Portage tree with the latest Funtoo ebuilds.'''
<console>
###i## emerge --sync
</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.
=== Search packages ===
'''Search packages by name.'''
<console>
###i## emerge -s firefox
###i## emerge --search firefox
</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.
'''Search packages by description.'''
<console>
###i## emerge -S web browser
###i## emerge --searchdesc web browser
</console>


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.
=== Install packages ===
'''Install package.'''
<console>
###i## emerge firefox
</console>


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.
'''Install multiple packages.'''
<console>
###i## emerge firefox thunderbird
</console>
 
'''Install package. Ask for confirmation before performing any changes. Show verbose output.'''
<console>
###i## emerge -av firefox
###i## emerge --ask firefox
</console>
 
=== Remove packages ===
'''Remove package.'''
<console>
###i## emerge -C firefox
###i## emerge --unmerge firefox
</console>
 
'''Remove package. Ask for confirmation before performing any changes.'''
<console>
###i## emerge -aC firefox
</console>
 
'''Remove orphaned packages. Ask for confirmation before performing any changes.'''
<console>
###i## emerge -a --depclean
</console>
 
=== Update packages ===
'''Update all packages.'''
<console>
###i## emerge -uDN @world
</console>
 
'''Update all packages. Ask for confirmation before performing any changes. Show verbose output.'''
<console>
###i## emerge -uavDN @world
</console>
 
'''When upgrading to a new version of perl, it is necessary to also run <code>perl-cleaner</code> afterwards:'''
<console>
###i## emerge -auvDN @world
###i## perl-cleaner --all
</console>
 
{{Note|This requirement of running <code>perl-cleaner</code> will eventually go away, once all perl-related ebuilds are updated to EAPI 5. EAPI 5 is a version of the Ebuild specification that supports smart updating of perl-related bits.}}

Revision as of 16:41, February 7, 2015

Principiando com o emerge

Emerge é o front-end para o gerenciador de Portage do funtoo. With emerge it is easy to install, update or remove packages.

Update Package Database

Sync local package database. This will update your local Portage tree with the latest Funtoo ebuilds.

root # emerge --sync

Search packages

Search packages by name.

root # emerge -s firefox
root # emerge --search firefox

Search packages by description.

root # emerge -S web browser
root # emerge --searchdesc web browser

Install packages

Install package.

root # emerge firefox

Install multiple packages.

root # emerge firefox thunderbird

Install package. Ask for confirmation before performing any changes. Show verbose output.

root # emerge -av firefox
root # emerge --ask firefox

Remove packages

Remove package.

root # emerge -C firefox
root # emerge --unmerge firefox

Remove package. Ask for confirmation before performing any changes.

root # emerge -aC firefox

Remove orphaned packages. Ask for confirmation before performing any changes.

root # emerge -a --depclean

Update packages

Update all packages.

root # emerge -uDN @world

Update all packages. Ask for confirmation before performing any changes. Show verbose output.

root # emerge -uavDN @world

When upgrading to a new version of perl, it is necessary to also run perl-cleaner afterwards:

root # emerge -auvDN @world
root # perl-cleaner --all
   Note

This requirement of running perl-cleaner will eventually go away, once all perl-related ebuilds are updated to EAPI 5. EAPI 5 is a version of the Ebuild specification that supports smart updating of perl-related bits.