Difference between revisions of "Emerge"

From Funtoo
Jump to: navigation, search
(Marked this version for translation)
 
(28 intermediate revisions by 9 users not shown)
Line 1: Line 1:
== Getting started with emerge ==
+
<languages/>
Emerge is the front-end for funtoo's portage package manager. With emerge its easy to install, update or remove packages.
+
<translate>
 +
<!--T:1-->
 +
Emerge is the front-end for funtoo's Portage package manager. With emerge it is easy to install, update or remove packages.
  
=== Update package database ===
+
== Update Package Database == <!--T:2-->
Sync local package database. This will update your local Portage tree with the latest Funtoo ebuilds.
+
'''Sync meta-repo. This will update your local Portage tree with the latest Funtoo ebuilds.'''
<console># emerge --sync</console>
+
{{console|body=
 +
###i## ego sync
 +
}}
 +
See {{package|app-admin/ego}} ([[Package:Ego|Wiki Page]]) for more information on ego. Also see the man pages: {{c|ego}}, {{c|ego-profile}}, {{c|ego-sync}} and [[Funtoo Profiles]] wiki page.
  
=== Search packages ===
+
== Search packages == <!--T:3-->
Search packages by name.
+
'''Search packages by name.'''
<console># emerge -s firefox
+
{{console|body=
# emerge --search firefox</console>
+
###i## emerge -s firefox
 +
###i## emerge --search firefox
 +
}}
  
Search packages by description.
+
<!--T:4-->
<console># emerge -S web browser
+
'''Search packages by description.'''
# emerge --searchdesc web browser</console>
+
{{console|body=
 +
###i## emerge -S web browser
 +
###i## emerge --searchdesc web browser
 +
}}
  
=== Install packages ===
+
== Install packages == <!--T:5-->
Install package.
+
'''Install package.'''
<console># emerge firefox</console>
+
{{console|body=
 +
###i## emerge firefox
 +
}}
  
Install multiple packages.
+
<!--T:6-->
<console># emerge firefox thunderbird</console>
+
'''Install multiple packages.'''
 +
{{console|body=
 +
###i## emerge firefox thunderbird
 +
}}
  
Install package. Ask for confirmation before performing any changes. Show verbose output.
+
<!--T:7-->
<console># emerge -av firefox</console>
+
'''Install package. Ask for confirmation before performing any changes. Show verbose output.'''
 +
{{console|body=
 +
###i## emerge -av firefox
 +
###i## emerge --ask firefox
 +
}}
  
=== Remove packages ===
+
== Remove packages == <!--T:8-->
Remove package.
+
'''Remove package.'''
<console># emerge -C firefox
+
{{console|body=
# emerge --unmerge firefox</console>
+
###i## emerge -C firefox
 +
###i## emerge --unmerge firefox
 +
}}
  
Remove package. Ask for confirmation before performing any changes.
+
<!--T:9-->
<console># emerge -aC firefox</console>
+
'''Remove package. Ask for confirmation before performing any changes.'''
 +
{{console|body=
 +
###i## emerge -aC firefox
 +
}}
  
Remove orphaned packages. Ask for confirmation before performing any changes.
+
<!--T:10-->
<console># emerge -a --depclean</console>
+
'''Remove orphaned packages. Ask for confirmation before performing any changes.'''
 +
{{console|body=
 +
###i## emerge -a --depclean
 +
}}
  
=== Update packages ===
+
== Update packages == <!--T:11-->
Update all packages.
+
'''Update all packages.'''
<console># emerge -uDN @world</console>
+
{{console|body=
 +
###i## emerge -uDN @world
 +
}}
  
Update all packages. Ask for confirmation before performing any changes. Show verbose output.
+
<!--T:12-->
<console># emerge -uavDN @world</console>
+
'''Update all packages. Ask for confirmation before performing any changes. Show verbose output.'''
 +
{{console|body=
 +
###i## emerge -uavDN @world
 +
}}
  
== Emerge options ==
+
<!--T:13-->
 +
'''When upgrading to a new version of perl, it is necessary to also run {{c|perl-cleaner}} afterwards:'''
 +
{{console|body=
 +
###i## emerge -auvDN @world
 +
###i## perl-cleaner --all
 +
}}
  
 +
<!--T:14-->
 +
{{Note|This requirement of running {{c|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.}}
 +
 +
== Emerge options == <!--T:15-->
 +
 +
<!--T:16-->
 
; --sync
 
; --sync
 
: Updates the portage tree that is located in /usr/portage by default.
 
: Updates the portage tree that is located in /usr/portage by default.
  
 +
<!--T:17-->
 
; --search -s
 
; --search -s
 
: Searches  for  matches  of  the  supplied  string in the portage tree.
 
: Searches  for  matches  of  the  supplied  string in the portage tree.
  
 +
<!--T:18-->
 
; --searchdesc -S
 
; --searchdesc -S
 
: Matches the search string against the description field as well as the package name.
 
: Matches the search string against the description field as well as the package name.
  
 +
<!--T:19-->
 
; --ask -a
 
; --ask -a
 
: Ask for confirmation before performing any changes.
 
: Ask for confirmation before performing any changes.
  
 +
<!--T:20-->
 
; --pretend -p
 
; --pretend -p
 
: Instead of actually performing the merge, simply display what *would* have been installed if --pretend weren't used.
 
: Instead of actually performing the merge, simply display what *would* have been installed if --pretend weren't used.
  
 +
<!--T:21-->
 
; --unmerge -C
 
; --unmerge -C
 
: Removes all matching packages.
 
: Removes all matching packages.
  
 +
<!--T:22-->
 
; --update -u
 
; --update -u
 
: Updates  packages to the best version available, which may not always be the  highest version number due to masking for testing and development.
 
: Updates  packages to the best version available, which may not always be the  highest version number due to masking for testing and development.
  
 +
<!--T:23-->
 
; --deep [DEPTH] -D
 
; --deep [DEPTH] -D
 
: force  emerge  to  consider  the  entire  dependency tree of packages, instead of checking only the immediate dependencies of the packages.
 
: force  emerge  to  consider  the  entire  dependency tree of packages, instead of checking only the immediate dependencies of the packages.
  
 +
<!--T:24-->
 
; --newuse -N
 
; --newuse -N
 
: Tells emerge to include installed packages where USE flags have changed since compilation.
 
: Tells emerge to include installed packages where USE flags have changed since compilation.
  
 +
<!--T:25-->
 
; --depclean -c
 
; --depclean -c
 
: Remove orphaned packages. Cleans the system by removing packages that are not associated with explicitly merged packages.
 
: Remove orphaned packages. Cleans the system by removing packages that are not associated with explicitly merged packages.
  
 +
<!--T:26-->
 
; --autounmask-write
 
; --autounmask-write
 
: Automatically write package.use settings as necessary to satisfy dependencies.
 
: Automatically write package.use settings as necessary to satisfy dependencies.
  
 +
<!--T:27-->
 
; --resume -r
 
; --resume -r
 
: Resumes  the  most recent merge list that has been aborted due to an error.
 
: Resumes  the  most recent merge list that has been aborted due to an error.
  
 +
<!--T:28-->
 
; --jobs[=JOBS] -j [JOBS]
 
; --jobs[=JOBS] -j [JOBS]
 
: Specifies the number of packages to build simultaneously.
 
: Specifies the number of packages to build simultaneously.
  
 +
<!--T:29-->
 
; --load-average [LOAD]
 
; --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).
 
: 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).
  
== Configuration ==
+
== Configuration == <!--T:30-->
Emerge can be configured with /etc/portage/make.conf
+
=== make.conf ===
<pre>CFLAGS="-march=native -O2 -pipe"
+
Emerge can be configured by editing {{c|/etc/make.conf}} to customize settings that are set in profiles. However, it's recommended to try to use [[Funtoo Profiles]] as much as possible to avoid having to clutter up {{c|/etc/make.conf}}. Also note that {{c|/etc/portage/make.conf}} is the same as {{c|/etc/make.conf}} -- they are symlinked.
 +
 
 +
<!--T:31-->
 +
{{file|name=/etc/portage/make.conf||desc=See [[Make.conf]]|body=
 +
# override subarch profile
 +
CFLAGS="-march=native -O2 -pipe"
 
CXXFLAGS="-march=native -O2 -pipe"
 
CXXFLAGS="-march=native -O2 -pipe"
  
 +
<!--T:32-->
 
MAKEOPTS="-j2"
 
MAKEOPTS="-j2"
 
EMERGE_DEFAULT_OPTS="--jobs 2 --load-average 2"
 
EMERGE_DEFAULT_OPTS="--jobs 2 --load-average 2"
Line 99: Line 161:
 
ACCEPT_LICENSE="*"
 
ACCEPT_LICENSE="*"
  
 +
<!--T:33-->
 +
# Generally, your subarch profile and flavor/mix-ins will set these for you:
 
USE="mmx mmxext sse sse2 sse3 ssse3 threads alsa X gtk xcb dri opengl vaapi udev \
 
USE="mmx mmxext sse sse2 sse3 ssse3 threads alsa X gtk xcb dri opengl vaapi udev \
 
     svg x264 xvid gstreamer webm vpx icu bash-completion vim-pager \
 
     svg x264 xvid gstreamer webm vpx icu bash-completion vim-pager \
 
     -gnome -xscreensaver -cups -fortran -deprecated -iptables -ipv6 -geoloc \
 
     -gnome -xscreensaver -cups -fortran -deprecated -iptables -ipv6 -geoloc \
     -mta -sendmail -kmod -tiff -live -quicktime -real -gpm -themes"</pre>
+
     -mta -sendmail -kmod -tiff -live -quicktime -real -gpm -themes"
 +
}}
  
Per-package use flags can be configured with /etc/portage/package.use
+
=== Package.use === <!--T:34-->
<pre>x11-wm/dwm savedconfig
+
Per-package use flags can be configured in
media-sound/ncmpcpp visualizer clock taglib</pre>
 
  
If you want to install package that has not been tested on your architecture you need to edit /etc/portage/package.accept_keywords
+
<!--T:35-->
<pre>=app-misc/screenfetch-9999 **</pre>
+
{{file|name=/etc/portage/package.use|body=
 +
x11-wm/dwm savedconfig
 +
x11-drivers/ati-drivers qt4
 +
media-sound/ncmpcpp visualizer clock taglib
 +
}}
  
== Further info ==
+
=== package.accept_keywords === <!--T:36-->
For further info see emerge man page.
+
If you want to install a package that has not been tested on your architecture you need to edit
<console>$ man emerge</console>
+
{{file|name=/etc/portage/package.accept_keywords|body=
 +
=app-misc/screenfetch-9999 **
 +
}}
  
 +
== Other Resources == <!--T:37-->
 +
For more info see the emerge man page.
 +
{{console|body=
 +
$##i## man emerge
 +
}}
 +
</translate>
 
[[Category:Portage]]
 
[[Category:Portage]]
 
 
[[Category:HOWTO]]
 
[[Category:HOWTO]]
 
[[Category:Tutorial]]
 
[[Category:Tutorial]]
 +
[[Category:System]]
 
[[Category:First Steps]]
 
[[Category:First Steps]]

Latest revision as of 04:55, April 14, 2019

Other languages:
English • ‎português do Brasil • ‎Türkçe

Emerge is the front-end for funtoo's Portage package manager. With emerge it is easy to install, update or remove packages.

Update Package Database

Sync meta-repo. This will update your local Portage tree with the latest Funtoo ebuilds.

root # ego sync

See app-admin/ego (Wiki Page) for more information on ego. Also see the man pages: ego, ego-profile, ego-sync and Funtoo Profiles wiki page.

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.

Emerge options

--sync
Updates the portage tree that is located in /usr/portage by default.
--search -s
Searches for matches of the supplied string in the portage tree.
--searchdesc -S
Matches the search string against the description field as well as the package name.
--ask -a
Ask for confirmation before performing any changes.
--pretend -p
Instead of actually performing the merge, simply display what *would* have been installed if --pretend weren't used.
--unmerge -C
Removes all matching packages.
--update -u
Updates packages to the best version available, which may not always be the highest version number due to masking for testing and development.
--deep [DEPTH] -D
force emerge to consider the entire dependency tree of packages, instead of checking only the immediate dependencies of the packages.
--newuse -N
Tells emerge to include installed packages where USE flags have changed since compilation.
--depclean -c
Remove orphaned packages. Cleans the system by removing packages that are not associated with explicitly merged packages.
--autounmask-write
Automatically write package.use settings as necessary to satisfy dependencies.
--resume -r
Resumes the most recent merge list that has been aborted due to an error.
--jobs[=JOBS] -j [JOBS]
Specifies the number of packages to build simultaneously.
--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).

Configuration

make.conf

Emerge can be configured by editing /etc/make.conf to customize settings that are set in profiles. However, it's recommended to try to use Funtoo Profiles as much as possible to avoid having to clutter up /etc/make.conf. Also note that /etc/portage/make.conf is the same as /etc/make.conf -- they are symlinked.

   /etc/portage/make.conf - See Make.conf
# override subarch profile
CFLAGS="-march=native -O2 -pipe"
CXXFLAGS="-march=native -O2 -pipe"

MAKEOPTS="-j2"
EMERGE_DEFAULT_OPTS="--jobs 2 --load-average 2"
INPUT_DEVICES="evdev synaptics"
VIDEO_CARDS="intel i965"
LINGUAS="en en_US en_GB"
ACCEPT_LICENSE="*"

# Generally, your subarch profile and flavor/mix-ins will set these for you:
USE="mmx mmxext sse sse2 sse3 ssse3 threads alsa X gtk xcb dri opengl vaapi udev \
     svg x264 xvid gstreamer webm vpx icu bash-completion vim-pager \
     -gnome -xscreensaver -cups -fortran -deprecated -iptables -ipv6 -geoloc \
     -mta -sendmail -kmod -tiff -live -quicktime -real -gpm -themes"

Package.use

Per-package use flags can be configured in

   /etc/portage/package.use
x11-wm/dwm savedconfig
x11-drivers/ati-drivers qt4
media-sound/ncmpcpp visualizer clock taglib

package.accept_keywords

If you want to install a package that has not been tested on your architecture you need to edit

   /etc/portage/package.accept_keywords
=app-misc/screenfetch-9999 **

Other Resources

For more info see the emerge man page.

user $ man emerge