From 9bfb802f54c1af7401efe974823ad2a670e1d908 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Sat, 7 Apr 2007 11:44:54 +0000 Subject: [PATCH] Merged from trunk 6345:6351 +------------------------------------------------------------------------+ | 6346 | remove references to DOCDESTTREE and INSDESTTREE | | SpankMan | | |----------+-------------------------------------------------------------| | 6347 | change "DOCDESTTREE" to "_E_DOCDESTTREE_" to try and | | SpankMan | prevent abuse from ebuild writers | |----------+-------------------------------------------------------------| | 6348 | tell people that the FILES section is not supposed to be | | SpankMan | complete (and sneak in a few style fixups) | |----------+-------------------------------------------------------------| | 6349 | document /var/cache/edb/, /var/db/pkg/, and | | SpankMan | /var/lib/portage/config | |----------+-------------------------------------------------------------| | 6350 | remove references to EXEDESTTREE | | SpankMan | | |----------+-------------------------------------------------------------| | 6351 | change "EXEDESTTREE" to "_E_EXEDESTTREE_" to try and | | SpankMan | prevent abuse from ebuild writers | +------------------------------------------------------------------------+ svn path=/main/branches/prefix/; revision=6352 --- bin/dobin | 6 ++++-- bin/dodoc | 2 +- bin/doexe | 6 +++--- bin/dohtml | 4 ++-- bin/doinitd | 4 ++-- bin/ebuild.sh | 18 +++++++++--------- man/ebuild.5 | 23 ++++++++++++----------- man/emerge.1 | 18 ++++++++++-------- man/portage.5 | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 9 files changed, 89 insertions(+), 38 deletions(-) diff --git a/bin/dobin b/bin/dobin index bb8639b3b..5d06d2ac7 100755 --- a/bin/dobin +++ b/bin/dobin @@ -3,8 +3,10 @@ # 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 @@ -18,7 +20,7 @@ for x in "$@" ; do 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+=$?)) diff --git a/bin/dodoc b/bin/dodoc index 06fbfc055..db2f7baaf 100755 --- a/bin/dodoc +++ b/bin/dodoc @@ -8,7 +8,7 @@ if [ $# -lt 1 ] ; then 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 diff --git a/bin/doexe b/bin/doexe index 8980b55e3..2bd840614 100755 --- a/bin/doexe +++ b/bin/doexe @@ -1,5 +1,5 @@ #!@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 $ @@ -9,7 +9,7 @@ if [[ $# -lt 1 ]] ; then fi if [[ ! -d ${ED}${EXEDESTTREE} ]] ; then - install -d "${ED}${EXEDESTTREE}" + install -d "${ED}${_E_EXEDESTTREE_}" fi for x in "$@" ; do @@ -22,5 +22,5 @@ for x in "$@" ; do else mysrc="${x}" fi - install ${EXEOPTIONS} "${mysrc}" "${ED}${EXEDESTTREE}" + install ${EXEOPTIONS} "${mysrc}" "${ED}${_E_EXEDESTTREE_}" done diff --git a/bin/dohtml b/bin/dohtml index e105dc4de..517683f71 100755 --- a/bin/dohtml +++ b/bin/dohtml @@ -77,8 +77,8 @@ class OptionsClass: 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 = [] diff --git a/bin/doinitd b/bin/doinitd index 3f579462d..dcfcf734a 100755 --- a/bin/doinitd +++ b/bin/doinitd @@ -1,5 +1,5 @@ #!@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 $ @@ -10,5 +10,5 @@ fi exec \ env \ -EXEDESTTREE="/etc/init.d/" \ +_E_EXEDESTTREE_="/etc/init.d/" \ doexe "$@" diff --git a/bin/ebuild.sh b/bin/ebuild.sh index f3f871b66..98d337929 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -1,5 +1,5 @@ #!@BASH@ -# Copyright 1999-2006 Gentoo Foundation +# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ @@ -422,8 +422,8 @@ register_die_hook() { 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" @@ -905,22 +905,22 @@ insinto() { 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 } diff --git a/man/ebuild.5 b/man/ebuild.5 index c4296d053..4d8c4aea9 100644 --- a/man/ebuild.5 +++ b/man/ebuild.5 @@ -800,37 +800,38 @@ Performs chown (\fBfowners\fR) or chmod (\fBfperms\fR), applying \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 [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 [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 [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\fR. +Documents are marked for compression. Creates all necessary dirs. .PD 0 .TP diff --git a/man/emerge.1 b/man/emerge.1 index 881ac5126..ded52273e 100644 --- a/man/emerge.1 +++ b/man/emerge.1 @@ -554,13 +554,15 @@ Mike Frysinger Marius Mauch .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. @@ -569,27 +571,27 @@ 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" diff --git a/man/portage.5 b/man/portage.5 index 9c3ae32cf..18db63344 100644 --- a/man/portage.5 +++ b/man/portage.5 @@ -66,8 +66,17 @@ use.desc 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 @@ -646,9 +655,46 @@ games\-emulation/xmess:net \- Adds network support .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 -- 2.26.2