View previous topic :: View next topic |
Author |
Message |
exklusve Apprentice
Joined: 23 Aug 2002 Posts: 270 Location: currently ~/
|
Posted: Mon Nov 25, 2002 8:56 pm Post subject: Helpful Emerge commands. |
|
|
I found this pretty helpful. One of the guys here at work gave it to me, not sure if its already posted here. He said he didn't think it was from a doc on the website so here it is. Hope it helps!
Quote: | sync makes sure that you get the latest Portage tree.
# emerge rsync
delete any old ebuild scripts
# emerge --clean rsync
update Portage
# cd /usr/portage/sys-apps/portage
# emerge portage-x.y.z.ebuild
to see what dependencies (if any) will be installed
# emerge --pretend "package name"
The standard way to upgrade packages under Gentoo
Linux is to merge the new package, and then unmerge the old package.
# emerge "new app"
# emerge unmerge "old app"
Downloads the needed archive files for compiling the package to be
installed and any dependencies that need to be met.
# emerge --fetchonly "app name"
This option makes Portage pretend that none of the dependencies of
this package or the packages it depends upon are installed. This is
useful with --pretend to display a complete tree of dependencies for
any particular package. All dependencies except for glibc are displayed.
# emerge --emptytree "app name"
Portage attempts to merge only the specified packages and ignores any
dependencies. If you do not have the appropriate dependencies already
installed then compilation may fail.
# emerge --nodeps "app name"
Only dependencies for a given package are merged. The specified package
is not merged.
# emerge --onlydeps "app name"
The ebuild environment is instructed to become much more verbal. This
is useful for developers trying to track down syntax errors in bash
script based ebuild files.
# emerge --debug "app name"
Forces emerge to clean out package-specific temporary build directories
before it starts to build a package. Portage does this by default so this
option is only useful to developers who disabled this default behavior.
# emerge --autoclean "app name"
Tells emerge to run in verbose mode. Currently, this only causes GNU info
errors to be displayed. These errors can be safely ignored by users.
# emerge --verbose "app name"
upgrade installed packages automatically with a single command.
# emerge --update system
To See what upgrade packages there are with a single command.
# emerge --update --pretend system
install the base or "core" packages.
# emerge system
updates those base packages to the latest recommended versions.
# emerge --update system
upgrade selected non-essential packages "apps" with a single command.
emerge --update world
An interesting side effect of how world update works can be exploited
by users wishing to recompile all installed software on a system.
Since world update will try to update all packages mentioned in the
world file and their dependencies, the use of the argument --emptytree
is a way of forcing the recompile of these packages and every dependency
except for glibc.
# emerge --update world --emptytree
Clean unused portage files
# emerge clean
prune action is an unsafe form of the clean. It removes all versions
of all packages except for the last installed version.
# emerge prune
Searching The Portage Tree
# emerge search "app name"
|
_________________ eXklusve
You do know that no one gives a shit about your system spec's right? |
|
Back to top |
|
|
lx Veteran
Joined: 28 May 2002 Posts: 1012 Location: Netherlands
|
Posted: Mon Nov 25, 2002 11:29 pm Post subject: |
|
|
you might wanna try
besides I think you might wanna promote the short hand version of the commands, they are easier to use, (-u update) (-p pretend) (-c clean) etc.
Also I think you're using an old portage version / old portage tip, cause some things have changed.
emerge rsync cleans out old and new custom files (scripts) from portage tree.
portage can be updated by emerge -u portage. (or just emerge -u world)
portage cleans out old packages automatically. (default behaviour)
Cya lX. _________________ "Remember there's a big difference between kneeling down and bending over.", Frank Zappa |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Mon Nov 25, 2002 11:33 pm Post subject: |
|
|
Moved from Installing Gentoo.
When it comes to emerge, 'man emerge' is probably the most helpful. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
robertdb n00b
Joined: 28 Apr 2003 Posts: 13 Location: Utrecht, The Netherlands
|
Posted: Fri May 09, 2003 7:14 am Post subject: |
|
|
lx wrote: |
portage cleans out old packages automatically. (default behaviour)
Cya lX. |
Ok, that is nice, but is there a way to delete a package with all its dependencies. Say:
Code: |
# emerge unmerge gnome
|
But not only gnome, leaving for example, gdm installed, but not working. I know apt-get (debian of redhat) does that trick.
Tia. _________________ Robert de Bock
robert@dive.nl |
|
Back to top |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9530 Location: beyond the rim
|
Posted: Fri May 09, 2003 8:07 am Post subject: |
|
|
exclusive wrote: | Code: | update Portage
# cd /usr/portage/sys-apps/portage
# emerge portage-x.y.z.ebuild
|
|
This one can be dangerous because it will install the newest portage version even if it is masked in packages.mask. You don't want do that in most cases.
robertdb wrote: | Ok, that is nice, but is there a way to delete a package with all its dependencies. Say:
Code: | # emerge unmerge gnome |
But not only gnome, leaving for example, gdm installed, but not working. I know apt-get (debian of redhat) does that trick.
|
You could try Code: | emerge unmerge gnome
emerge -p deplean
emerge depclean |
to list all possibly unneeded dependencies. Be sure to check the list twice at least ! |
|
Back to top |
|
|
|