# Distributed under the terms of the GNU General Public License v2
# $Id: /var/cvsroot/gentoo-src/portage/bin/dobin,v 1.13 2004/10/04 13:56:50 vapier Exp $
+source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
+
if [[ $# -lt 1 ]] ; then
- echo "$0: at least one argument needed" 1>&2
+ vecho "$0: at least one argument needed" 1>&2
exit 1
fi
if [[ -e ${x} ]] ; then
install -m 0755 -o ${PORTAGE_INST_UID:-0} -g ${PORTAGE_INST_GID:-0} "${x}" "${ED}${DESTTREE}/bin"
else
- echo "!!! ${0##*/}: ${x} does not exist" 1>&2
+ vecho "!!! ${0##*/}: ${x} does not exist" 1>&2
false
fi
((ret+=$?))
exit 1
fi
-dir="${ED}/usr/share/doc/${PF}/${DOCDESTTREE}"
+dir="${ED}/usr/share/doc/${PF}/${_E_DOCDESTTREE_}"
if [ ! -d "${dir}" ] ; then
install -d "${dir}"
fi
#!@BASH@
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id: /var/cvsroot/gentoo-src/portage/bin/doexe,v 1.10.2.1 2004/12/06 03:01:43 carpaski Exp $
fi
if [[ ! -d ${ED}${EXEDESTTREE} ]] ; then
- install -d "${ED}${EXEDESTTREE}"
+ install -d "${ED}${_E_EXEDESTTREE_}"
fi
for x in "$@" ; do
else
mysrc="${x}"
fi
- install ${EXEOPTIONS} "${mysrc}" "${ED}${EXEDESTTREE}"
+ install ${EXEOPTIONS} "${mysrc}" "${ED}${_E_EXEDESTTREE_}"
done
self.PF = os.environ["PF"]
if os.environ.has_key("ED"):
self.ED = os.environ["ED"]
- if os.environ.has_key("DOCDESTTREE"):
- self.DOCDESTTREE = os.environ["DOCDESTTREE"]
+ if os.environ.has_key("_E_DOCDESTTREE_"):
+ self.DOCDESTTREE = os.environ["_E_DOCDESTTREE_"]
self.allowed_exts = [ 'png', 'gif', 'html', 'htm', 'jpg', 'css', 'js' ]
self.allowed_files = []
#!@BASH@
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id: /var/cvsroot/gentoo-src/portage/bin/doinitd,v 1.2.2.1 2005/01/13 04:51:56 vapier Exp $
exec \
env \
-EXEDESTTREE="/etc/init.d/" \
+_E_EXEDESTTREE_="/etc/init.d/" \
doexe "$@"
#!@BASH@
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
umask 022
export DESTTREE=/usr
export INSDESTTREE=""
-export EXEDESTTREE=""
-export DOCDESTTREE=""
+export _E_EXEDESTTREE_=""
+export _E_DOCDESTTREE_=""
export INSOPTIONS="-m0644"
export EXEOPTIONS="-m0755"
export LIBOPTIONS="-m0644"
exeinto() {
if [ "$1" == "/" ]; then
- export EXEDESTTREE=""
+ export _E_EXEDESTTREE_=""
else
export EXEDESTTREE="$1"
- if [ ! -d "${ED}${EXEDESTTREE}" ]; then
- install -d "${ED}${EXEDESTTREE}"
+ if [ ! -d "${ED}${_E_EXEDESTTREE_}" ]; then
+ install -d "${ED}${_E_EXEDESTTREE_}"
fi
fi
}
docinto() {
if [ "$1" == "/" ]; then
- export DOCDESTTREE=""
+ export _E_DOCDESTTREE_=""
else
export DOCDESTTREE="$1"
- if [ ! -d "${ED}usr/share/doc/${PF}/${DOCDESTTREE}" ]; then
- install -d "${ED}usr/share/doc/${PF}/${DOCDESTTREE}"
+ if [ ! -d "${ED}usr/share/doc/${PF}/${_E_DOCDESTTREE_}" ]; then
+ install -d "${ED}usr/share/doc/${PF}/${_E_DOCDESTTREE_}"
fi
fi
}
\fIpermissions\fR to \fIfiles\fR.
.TP
\fBinsinto\fR \fI[path]\fR
-Sets the root (\fIINSDESTTREE\fR) for the \fBdoins\fR function.
+Sets the destination path for the \fBdoins\fR function.
.br
-The default root is /.
+The default path is /.
.TP
\fBinsopts\fR \fI[options for install(1)]\fR
Can be used to define options for the install function used in
\fBdoins\fR. The default is \fI\-m0644\fR.
.TP
\fBdoins\fR \fI<file> [list of more files]\fR
-Installs files into \fIINSDESTTREE\fR. This function uses \fBinstall\fR(1).
-Creates all necessary dirs.
+Installs files into the path controlled by \fBinsinto\fR. This function
+uses \fBinstall\fR(1). Creates all necessary dirs.
.TP
\fBexeinto\fR \fI[path]\fR
-Sets the root (\fIEXEDESTTREE\fR) for the \fBdoexe\fR function.
+Sets the destination path for the \fBdoexe\fR function.
.br
-The default root is /.
+The default path is /.
.TP
\fBexeopts\fR \fI[options for install(1)]\fR
Can be used to define options for the install function used in \fBdoexe\fR.
The default is \fI\-m0755\fR.
.TP
\fBdoexe\fR \fI<executable> [list of more executables]\fR
-Installs a executable or a list of executable into \fIEXEDESTTREE\fR.
-This function uses \fBinstall\fR(1). Creates all necessary dirs.
+Installs executables into the path controlled by \fBexecinto\fR. This function
+uses \fBinstall\fR(1). Creates all necessary dirs.
.TP
\fBdocinto\fR \fI[path]\fR
-Sets the relative subdir (\fIDOCDESTTREE\fR) used by \fBdodoc\fR.
+Sets the subdir used by \fBdodoc\fR when installing into the document tree
+(based in /usr/share/doc/${PF}/). Default is no subdir, or just "".
.TP
\fBdodoc\fR \fI<document> [list of more documents]\fR
-Installs a document or a list of document into /usr/share/doc/${PF}/\fIDOCDESTTREE\fR.
-Files are automatically gzipped. Creates all necessary dirs.
+Installs a document or a list of documents into /usr/share/doc/${PF}/\fI<docinto path>\fR.
+Documents are marked for compression. Creates all necessary dirs.
.PD 0
.TP
Marius Mauch <genone@gentoo.org>
.fi
.SH "FILES"
+Here is a common list of files you will probably be interested in. For a
+complete listing, please refer to the \fBportage\fR(5) man page.
.TP
-\fB/var/lib/portage/world\fR
+.B /var/lib/portage/world
Contains a list of all user\-specified packages. You can safely edit
this file, adding packages that you want to be considered in \fBworld\fR
set updates and removing those that you do not want to be considered.
.TP
-\fB/etc/make.conf\fR
+.B /etc/make.conf
Contains variables for the build process, overriding those in
\fBmake.globals\fR. \fBYou should edit this file instead of the ones
listed below\fR.
Contains settings to handle automatic updates/backups of configuration
files.
.TP
-\fB/etc/make.profile/make.defaults\fR
+.B /etc/make.profile/make.defaults
Contains profile\-specific variables for the build process. \fBDo not
edit this file\fR.
.TP
-\fB/etc/make.profile/use.defaults\fR
+.B /etc/make.profile/use.defaults
Contains a list of packages which, if installed, cause the respective USE
flag to be enabled by default. \fBDo not edit this file\fR.
.TP
-\fB/usr/portage/profiles/use.desc\fR
+.B /usr/portage/profiles/use.desc
Contains the master list of USE flags with descriptions of their
functions. \fBDo not edit this file\fR.
.TP
-\fB/etc/make.profile/virtuals\fR
+.B /etc/make.profile/virtuals
Contains a list of default packages used to resolve virtual dependencies.
\fBDo not edit this file\fR.
.TP
-\fB/etc/make.profile/packages\fR
+.B /etc/make.profile/packages
Contains a list of packages used for the base system. The \fBsystem\fR
and \fBworld\fR sets consult this file. \fBDo not edit this file\fR.
.TP
-\fB/etc/make.globals\fR
+.B /etc/make.globals
Contains the default variables for the build process. \fBDo not edit
this file\fR.
.SH "SEE ALSO"
use.local.desc
.fi
.TP
+.BR /var/cache/edb/
+misc internal cache files
+.TP
+.BR /var/db/pkg/
+database to track installed packages
+.TP
.BR /var/lib/portage/
+.nf
+config
world
+.fi
.SH "GLOSSARY"
In the following sections, some terminology may be foreign to you or used
with meaning specific to Portage. Please see the referenced manpages for
.fi
.RE
.TP
+.BR /var/cache/edb/
+.RS
+This directory is used to store internal portage cache files. The names and
+purpose of these files are not documented on purpose so as to keep down bitrot
+as internals change. If you aren't working on portage internally, then the
+details most likely do not matter to you.
+
+This entire directory can be safely deleted. It is highly recommended you do
+not do this however as it can be a time consuming process to generate them all
+again.
+.RE
+.TP
+.BR /var/db/pkg/
+.RS
+All installed package information is recorded here. If portage thinks you have
+a package installed, it is usually because it is listed here.
+
+The format follows somewhat closely that of the portage tree. There is a
+directory for each category and a package-version subdirectory for each package
+you have installed.
+
+Inside each package directory are misc files that describe the installed
+contents of the package as well as build time information (so that the package
+can be unmerged without needing the portage tree).
+
+The exact file contents and format are not described here again so that things
+can be changed quickly. Generally though there is one file per environment
+variable that "matters" (like CFLAGS) with the contents stored inside of it.
+Another common file is the CONTENTS file which lists the path and hashes of
+all objects that the package installed onto your system.
+.RE
+.TP
.BR /var/lib/portage/
.RS
.TP
+.BR config
+Hashes which are used to determine whether files in config protected
+directories have been modified since being installed. Files which have not
+been modified will automatically be unmerged.
+.TP
.BR world
Every time you emerge a package, the package that you requested is
recorded here. Then when you run `emerge world \-up`, the list of