注意:

The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.

Difference between revisions of "Emerge"

From Funtoo
Jump to navigation Jump to search
 
(8 intermediate revisions by the same user 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 its 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.
'''Sync local package database. This will update your local Portage tree with the latest Funtoo ebuilds.'''
<console># emerge --sync</console>
<console>
###i## emerge --sync
</console>


=== Search packages ===
=== Search packages ===
Search packages by name.
'''Search packages by name.'''
<console># emerge -s firefox
<console>
# emerge --search firefox</console>
###i## emerge -s firefox
###i## emerge --search firefox
</console>


Search packages by description.
'''Search packages by description.'''
<console># emerge -S web browser
<console>
# emerge --searchdesc web browser</console>
###i## emerge -S web browser
###i## emerge --searchdesc web browser
</console>


=== Install packages ===
=== Install packages ===
Install package.
'''Install package.'''
<console># emerge firefox</console>
<console>
###i## emerge firefox
</console>


Install multiple packages.
'''Install multiple packages.'''
<console># emerge firefox thunderbird</console>
<console>
###i## emerge firefox thunderbird
</console>


Install package. Ask for confirmation before performing any changes. Show verbose output.
'''Install package. Ask for confirmation before performing any changes. Show verbose output.'''
<console># emerge -av firefox</console>
<console>
###i## emerge -av firefox
###i## emerge --ask firefox
</console>


=== Remove packages ===
=== Remove packages ===
Remove package.
'''Remove package.'''
<console># emerge -C firefox
<console>
# emerge --unmerge firefox</console>
###i## emerge -C firefox
###i## emerge --unmerge firefox
</console>


Remove package. Ask for confirmation before performing any changes.
'''Remove package. Ask for confirmation before performing any changes.'''
<console># emerge -aC firefox</console>
<console>
###i## emerge -aC firefox
</console>


Remove orphaned packages. Ask for confirmation before performing any changes.
'''Remove orphaned packages. Ask for confirmation before performing any changes.'''
<console># emerge -a --depclean</console>
<console>
###i## emerge -a --depclean
</console>


=== Update packages ===
=== Update packages ===
Update all packages.
'''Update all packages.'''
<console># emerge -uDN @world</console>
<console>
###i## emerge -uDN @world
</console>


Update all packages. Ask for confirmation before performing any changes. Show verbose output.
'''Update all packages. Ask for confirmation before performing any changes. Show verbose output.'''
<console># emerge -uavDN @world</console>
<console>
###i## emerge -uavDN @world
</console>


== Emerge options ==
== Emerge options ==
Line 88: Line 111:


== Configuration ==
== Configuration ==
Emerge can be configured with /etc/portage/make.conf
=== make.conf ===
<pre>CFLAGS="-march=native -O2 -pipe"
Emerge can be configured with <code>/etc/portage/make.conf</code>
{{File
|/etc/portage/make.conf|<pre>
CFLAGS="-march=native -O2 -pipe"
CXXFLAGS="-march=native -O2 -pipe"
CXXFLAGS="-march=native -O2 -pipe"


Line 102: Line 128:
     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"
</pre>}}


Per-package use flags can be configured with /etc/portage/package.use
=== package.use ===
<pre>x11-wm/dwm savedconfig
Per-package use flags can be configured with <code>/etc/portage/package.use</code>
media-sound/ncmpcpp visualizer clock taglib</pre>
<console>
###i## nano /etc/portage/package.use
x11-wm/dwm savedconfig
media-sound/ncmpcpp visualizer clock taglib
</console>


If you want to install package that has not been tested on your architecture you need to edit /etc/portage/package.accept_keywords
=== package.accept_keywords ===
<pre>=app-misc/screenfetch-9999 **</pre>
If you want to install package that has not been tested on your architecture you need to edit <code>/etc/portage/package.accept_keywords</code>
<console>
###i## nano /etc/portage/package.accept_keywords
=app-misc/screenfetch-9999 **
</console>


== Further info ==
== Further info ==
For further info see emerge man page.
For further info see emerge man page.
<console>$ man emerge</console>
<console>$##i## man emerge</console>


[[Category:Portage]]
[[Category:Portage]]
Line 119: Line 154:
[[Category:HOWTO]]
[[Category:HOWTO]]
[[Category:Tutorial]]
[[Category:Tutorial]]
[[Category:System]]

Revision as of 17:13, January 28, 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.

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

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 with /etc/portage/make.conf

   
{{{body}}}

package.use

Per-package use flags can be configured with /etc/portage/package.use

root # nano /etc/portage/package.use
x11-wm/dwm savedconfig
media-sound/ncmpcpp visualizer clock taglib

package.accept_keywords

If you want to install package that has not been tested on your architecture you need to edit /etc/portage/package.accept_keywords

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

Further info

For further info see emerge man page.

user $ man emerge