====== Packages OR Emerge ======
This page i am trying to cover what ever i have found during my setup and issue.
==== To add build time options ====
EXTRA_ECONF="--with-apxs=/home/apache/bin/apxs" emerge -O mod_security
Right now, users can replace the defaults:
prefix, host, mandir, infodir, datadir, sysconfdir, localstatedir and
datadir, infodir, localstatedir, mandir, sysconfir
add:
anything that doesn't collide with additional arguments in the ebuild.
==== List Use flags ====
emerge -pv apg
==== Uninstall Package ====
emerge -C postgresql-server
==== Update portage tree ====
emerge --sync
==== Update Full System to latest stable ====
To keep your system in perfect shape (and not to mention install the latest security updates) you need to update your system regularly. Since Portage only checks the ebuilds in your Portage tree you first have to update your Portage tree. When your Portage tree is updated, you can update your system with emerge --update world. In the next example, we'll also use the --ask switch which will tell Portage to display the list of packages it wants to upgrade and ask you if you want to continue:
**Updating your system**
emerge --update --ask world
Portage will then search for newer version of the applications you have installed. However, it will only verify the versions for the applications you have explicitly installed (the applications listed in /var/lib/portage/world) - it does not thoroughly check their dependencies. If you want to update every single package on your system, add the --deep argument:
**Updating your entire system**
emerge --update --deep world
Since security updates also happen in packages you have not explicitly installed on your system (but that are pulled in as dependencies of other programs), it is recommended to run this command once in a while.
If you have altered any of your USE flags lately you might want to add --newuse as well. Portage will then verify if the change requires the installation of new packages or recompilation of existing ones:
NOTE : //You should update GCC before doing so that should stop many package to break//
**Performing a full update**
emerge --update --deep --newuse world
**Metapackages**
Some packages in the Portage tree don't have any real content but are used to install a collection of packages. For instance, the kde-meta package will install a complete KDE environment on your system by pulling in various KDE-related packages as dependencies.
If you ever want to remove such a package from your system, running emerge --unmerge on the package won't have much effect as the dependencies remain on the system.
Portage has the functionality to remove orphaned dependencies as well, but since the availability of software is dynamically dependent you first need to update your entire system fully, including the new changes you applied when changing USE flags. After this you can run emerge --depclean to remove the orphaned dependencies. When this is done, you need to rebuild the applications that were dynamically linked to the now-removed software titles but don't require them anymore.
All this is handled with the following three commands:
**Removing orphaned dependencies**
emerge --update --deep --newuse world
emerge --depclean
revdep-rebuild
revdep-rebuild is provided by the gentoolkit package; don't forget to emerge it first:
**Installing the gentoolkit package**
emerge gentoolkit
==== How to install latest / Masked Portage ====
Masked is not always broken. But, make sure you are sure to use it.
First define your arch. i am using "amd64"\\
you can usually find following options \\
~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd
NOTE : "~" is not a seperator it is important element here.\\
Now i want to build "bash-4.0_p28" but it is masked.\\
i need to use it following way to build.
ACCEPT_KEYWORDS="~amd64" emerge bash
you see i have defined whole word "~amd64".\\
this will build the bash to the latest.