Difference between revisions of "Emerge"

 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
== Getting started with emerge ==
 
== Getting started with emerge ==
Emerge is the front-end for funtoo's portage package manager. With emerge it is easy to install, update or remove packages.
+
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 ===
 
'''Sync local package database. This will update your local Portage tree with the latest Funtoo ebuilds.'''
 
'''Sync local package database. This will update your local Portage tree with the latest Funtoo ebuilds.'''
 
<console>
 
<console>
Line 65: Line 65:
 
###i## emerge -uavDN @world
 
###i## emerge -uavDN @world
 
</console>
 
</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.}}
  
 
== Emerge options ==
 
== Emerge options ==
Line 112: Line 120:
 
== Configuration ==
 
== Configuration ==
 
=== make.conf ===
 
=== make.conf ===
Emerge can be configured with <code>/etc/portage/make.conf</code>
+
Emerge can be configured by editing
  
 
+
{{file|name=/etc/portage/make.conf||desc=See [[Make.conf]]|body=
<pre>
+
 
CFLAGS="-march=native -O2 -pipe"
 
CFLAGS="-march=native -O2 -pipe"
 
CXXFLAGS="-march=native -O2 -pipe"
 
CXXFLAGS="-march=native -O2 -pipe"
Line 130: Line 137:
 
     -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"
 
     -mta -sendmail -kmod -tiff -live -quicktime -real -gpm -themes"
</pre>
+
}}
  
=== package.use ===
+
=== Package.use ===
Per-package use flags can be configured in <code>/etc/portage/package.use</code>:
+
Per-package use flags can be configured in
  
 
+
{{file|name=/etc/portage/package.use|body=
<pre>
+
 
x11-wm/dwm savedconfig
 
x11-wm/dwm savedconfig
 
x11-drivers/ati-drivers qt4
 
x11-drivers/ati-drivers qt4
 
media-sound/ncmpcpp visualizer clock taglib
 
media-sound/ncmpcpp visualizer clock taglib
</pre>
+
}}
  
 
=== package.accept_keywords ===
 
=== package.accept_keywords ===
If you want to install a package that has not been tested on your architecture you need to edit <code>/etc/portage/package.accept_keywords</code>:
+
If you want to install a package that has not been tested on your architecture you need to edit
 
+
{{file|name=/etc/portage/package.accept_keywords|body=
 
+
<pre>
+
 
=app-misc/screenfetch-9999 **
 
=app-misc/screenfetch-9999 **
</pre>
+
}}
  
 
== Other Resources ==
 
== Other Resources ==

Latest revision as of 04:19, October 15, 2014

Getting started with emerge

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 local package database. This will update your local Portage tree with the latest Funtoo ebuilds.

# emerge --sync

Search packages

Search packages by name.

# emerge -s firefox
# emerge --search firefox

Search packages by description.

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

Install packages

Install package.

# emerge firefox

Install multiple packages.

# emerge firefox thunderbird

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

# emerge -av firefox
# emerge --ask firefox

Remove packages

Remove package.

# emerge -C firefox
# emerge --unmerge firefox

Remove package. Ask for confirmation before performing any changes.

# emerge -aC firefox

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

# emerge -a --depclean

Update packages

Update all packages.

# emerge -uDN @world

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

# emerge -uavDN @world

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

# emerge -auvDN @world
# 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/portage/make.conf: See Make.conf
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="*"

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.

$ man emerge