Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 87877 | Differences between
and this patch

Collapse All | Expand All

(-)portage-cvs/ChangeLog (+47 lines)
Lines 7-12 Link Here
7
    2. /var/cache/edb/world is now /var/lib/portage/world.
7
    2. /var/cache/edb/world is now /var/lib/portage/world.
8
    3. /etc/portage/profile/virtuals is _USER_ configs only.
8
    3. /etc/portage/profile/virtuals is _USER_ configs only.
9
9
10
  15 Apr 2005; <michael.haubenwallner@salomon.at> configure.in:
11
  fixed the CFLAGS setting if CFLAGS has more than one entry.
12
13
  15 Apr 2005; <michael.haubenwallner@salomon.at>
14
  bin/ebuild-default-functions.sh:
15
  not using hardcoded 'portage' user/group, use env or build setting,
16
  and only search for portage-owned files if installed into prefix /usr
17
  in dyn_install().
18
19
  15 Apr 2005; <michael.haubenwallner@salomon.at> cnf/Makefile.in,
20
  cnf/dispatch-conf.conf, cnf/make.conf.sparc:
21
  install dispatc-conf.conf and etc-update.conf too,
22
  substitute CHOST in make.conf.sparc from configure-value.
23
24
  15 Apr 2005; <michael.haubenwallner@salomon.at> pym/portage_dep.py:
25
  import portage_util.writemsg
26
10
  12 Apr 2005; Mike Frysinger <vapier@gentoo.org> bin/quickpkg pym/ebuild.py 
27
  12 Apr 2005; Mike Frysinger <vapier@gentoo.org> bin/quickpkg pym/ebuild.py 
11
  pym/portage.py:
28
  pym/portage.py:
12
  Rename 'portage-pkg' to 'binpkgs' so tab completion for 'portage' works.
29
  Rename 'portage-pkg' to 'binpkgs' so tab completion for 'portage' works.
Lines 14-24 Link Here
14
  08 Apr 2005; Marius Mauch <genone@gentoo.org> bin/emerge:
31
  08 Apr 2005; Marius Mauch <genone@gentoo.org> bin/emerge:
15
  Add a list of active user config files to emerge --info.
32
  Add a list of active user config files to emerge --info.
16
  
33
  
34
  07 Apr 2005; <michael.haubenwallner@salomon.at> Makefile.am, acinclude.m4,
35
  bin/ebuild, cnf/Makefile.in, configure.in, pym/config.py,
36
  pym/portage_data.py, src/filter-env/Makefile.am, -src/filter-env/getopt.c,
37
  -src/filter-env/getopt.h, src/filter-env/posix.c:
38
  creation of subst-install.vars works with non-bash too now.
39
  check for existance of getopt.h instead of providing myself.
40
  use portage_const.MYROOT in bin/ebuild too.
41
  added PORTAGE_USER,PORTAGE_GROUP,PORTAGE_ROOTUSER,PORTAGE_WHEELGROUP to
42
  environment variables, to upgrade with portage.ebuild keeping these names.
43
17
  06 Apr 2005; Marius Mauch <genone@gentoo.org> pym/set_modules/*.py:
44
  06 Apr 2005; Marius Mauch <genone@gentoo.org> pym/set_modules/*.py:
18
  Added a basic framework for package sets including modules for "system",
45
  Added a basic framework for package sets including modules for "system",
19
  general filelists (including "world") and "security", the latter currently
46
  general filelists (including "world") and "security", the latter currently
20
  depending on glsa.py from gentoolkit.
47
  depending on glsa.py from gentoolkit.
21
48
49
  04 Apr 2005; Michael Haubenwallner <michael.haubenwallner@salomon.at>
50
  generally:
51
  added ability to work with prefix other than /usr, including installing
52
  of packages into a different prefix using PREFIX=/usr/local, much like
53
  using ROOT=/tmp/test/; PREFIX can be set with or without setting ROOT.
54
  This adds two ebuild-env-variables (samples are for
55
  ./configure --prefix={/usr,/usr/local} ):
56
  PREFIX={/usr,/usr/local}
57
  AFFIX={,usr/local/}
58
  Look at bin/ebuild-functions.sh (econf and einstall) for how to use them.
59
60
  04 Apr 2005; Michael Haubenwallner <michael.haubenwallner@salomon.at>
61
  cnf/Makefile.in Makefile.am:
62
  also install /etc/make.conf.example and /etc/make.globals
63
64
  04 Apr 2005; Michael Haubenwallner <michael.haubenwallner@salomon.at>
65
  src/filter-env/getopt.c src/filter-env/getopt.h src/filter-env/posix.c
66
  src/filter-env/Makefile.am:
67
  provide own getopt in cases where libc doesnt.
68
22
  03 Apr 2005; Jason Stubbs <jstubbs@gentoo.org> pym/portage_dep.py:
69
  03 Apr 2005; Jason Stubbs <jstubbs@gentoo.org> pym/portage_dep.py:
23
  Added shortcut to circular dep "resolution" as per bug 85130. Removed
70
  Added shortcut to circular dep "resolution" as per bug 85130. Removed
24
  the traversed cache dict from __traverse_nodes and made the original
71
  the traversed cache dict from __traverse_nodes and made the original
(-)portage-cvs/Makefile.am (-1 / +39 lines)
Lines 1-3 Link Here
1
SUBDIRS = src man bin pym
1
SUBDIRS = src man bin pym cnf
2
2
3
AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip
3
AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip
4
5
BUILT_SOURCES = subst-install.vars
6
7
subst-install: subst-install.vars
8
9
#
10
# shells vary interpreting backslash within single quote: echo '\\'
11
# bourne shell: \
12
#         bash: \\
13
#
14
subst-install.vars: subst-install.vars.in
15
	@rm -f $@ \
16
	; case `echo '\'\\\''` in \
17
	  \\) bss='\\\\\\\\';; \
18
	  \\\\) bss='\\\\';; \
19
	  *) echo "unknown shell escape behaviour"; exit 1 ;; \
20
	  esac \
21
	; { echo; sed -e "s,"'\\'"\",\",g" \
22
			-e "s,\\\\,$${bss},g" \
23
			-e "s,#,\\\\\\#,g" \
24
			-e "s,\","'\\'"\",g" \
25
		< subst-install.vars.in \
26
	  ; echo "$@:" \
27
	  ; echo "	@echo 'creating \$$@'" \
28
	  ; echo "	@{ \\" \
29
	  ; eval `grep '^all_configurevars=' $@.in` \
30
	  ; for v in `echo $${all_configurevars}` all_configurevars \
31
	  ; do echo "	echo $${v}='\"\$$($${v})\"' ; \\" \
32
	  ; done \
33
	  ; echo "	} > \$$@" \
34
	; } \
35
	| ${MAKE} -f - $@
36
37
distclean-local:
38
	rm -f subst-install.vars
39
40
MAINTAINERCLEANFILES = subst-install.vars.in.in \
41
	Makefile.in config.guess config.sub configure ltmain.sh aclocal.m4
(-)portage-cvs/acinclude.m4 (+199 lines)
Line 0 Link Here
1
dnl acinclude.m4 generated automatically by ac-archive's acinclude 0.5.63
2
3
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
4
dnl This file is free software; the Free Software Foundation
5
dnl gives unlimited permission to copy and/or distribute it,
6
dnl with or without modifications, as long as this notice is preserved.
7
8
dnl This program is distributed in the hope that it will be useful,
9
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11
dnl PARTICULAR PURPOSE.
12
13
dnl ______  ______
14
15
dnl ______ /usr/share/aclocal/djmitche/ax_with_python.m4 ______
16
dnl @synopsis AX_WITH_PYTHON([minimum-version], [value-if-not-found], [path])
17
dnl 
18
dnl Locates an installed Python binary, placing the result in the precious
19
dnl variable $PYTHON.  Accepts a present $PYTHON, then --with-python, and failing
20
dnl that searches for python in the given path (which defaults to the system
21
dnl path).  If python is found, $PYTHON is set to the full path of the binary; if
22
dnl it is not found, $PYTHON is set to VALUE-IF-NOT-FOUND, which defaults to
23
dnl 'python'.
24
dnl 
25
dnl Example:
26
dnl
27
dnl   AX_WITH_PYTHON(2.2, missing)
28
dnl
29
dnl @author Dustin Mitchell <dustin@cs.uchicago.edu>
30
dnl @version %Id: %
31
32
AC_DEFUN([AX_WITH_PYTHON],
33
[
34
  AC_ARG_VAR([PYTHON])
35
 
36
  dnl unless PYTHON was supplied to us (as a precious variable)
37
  if test -z "$PYTHON"
38
  then
39
    AC_MSG_CHECKING(for --with-python)
40
    AC_ARG_WITH(python,
41
                AC_HELP_STRING([--with-python=PYTHON],
42
                               [absolute path name of Python executable]),
43
                [ if test "$withval" != "yes"
44
                  then
45
                    PYTHON="$withval"
46
                    AC_MSG_RESULT($withval)
47
                  else
48
                    AC_MSG_RESULT(no)
49
                  fi
50
                ],
51
                [ AC_MSG_RESULT(no)
52
                ])
53
  fi
54
55
  dnl if it's still not found, check the paths, or use the fallback
56
  if test -z "$PYTHON" 
57
  then
58
    AC_PATH_PROG([PYTHON], python, m4_ifval([$2],[$2],[python]), $3)
59
  fi
60
61
  dnl check version if required
62
  m4_ifvaln([$1], [
63
    dnl do this only if we didn't fall back
64
    if test "$PYTHON" != "m4_ifval([$2],[$2],[python])"
65
    then
66
      AC_MSG_CHECKING($PYTHON version >= $1)
67
      if test `$PYTHON -c ["import sys; print sys.version[:3] >= \"$1\" and \"OK\" or \"OLD\""]` = "OK"
68
      then
69
        AC_MSG_RESULT(ok)
70
      else
71
        AC_MSG_RESULT(no)
72
        PYTHON="$2"
73
      fi
74
    fi])
75
])
76
77
dnl ______ /usr/share/aclocal/Installed_Packages/ac_prog_perl_version.m4 ______
78
dnl @synopsis AC_PROG_PERL_VERSION(VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
79
dnl
80
dnl Makes sure that perl supports the version indicated. If true the shell
81
dnl commands in ACTION-IF-TRUE are executed.  If not the shell commands in
82
dnl ACTION-IF-FALSE are run.   Note if $PERL is not set (for example by
83
dnl running AC_CHECK_PROG or AC_PATH_PROG), AC_CHECK_PROG(PERL, perl, perl) will
84
dnl be run.
85
dnl
86
dnl Example:
87
dnl
88
dnl   AC_PROG_PERL_VERSION(5.6.0)
89
dnl
90
dnl This will check to make sure that the perl you have supports at least
91
dnl version 5.6.0.
92
dnl
93
dnl @version %Id: ac_prog_perl_version.m4,v 1.1 2002/12/12 23:14:52 guidod Exp %
94
dnl @author Dean Povey <povey@wedgetail.com>
95
dnl
96
AC_DEFUN([AC_PROG_PERL_VERSION],[dnl
97
# Make sure we have perl
98
if test -z "$PERL"; then
99
AC_CHECK_PROG(PERL,perl,perl)
100
fi
101
102
# Check if version of Perl is sufficient
103
ac_perl_version="$1"
104
105
if test "x$PERL" != "x"; then
106
  AC_MSG_CHECKING(for perl version greater than or equal to $ac_perl_version)
107
  # NB: It would be nice to log the error if there is one, but we cannot rely
108
  # on autoconf internals
109
  $PERL -e "use $ac_perl_version;" > /dev/null 2>&1
110
  if test $? -ne 0; then
111
    AC_MSG_RESULT(no);
112
    $3
113
  else
114
    AC_MSG_RESULT(ok);
115
    $2
116
  fi
117
else
118
  AC_MSG_WARN(could not find perl)
119
fi
120
])dnl
121
122
123
dnl ______ acpackage.m4 ______
124
dnl @synopsis AX_PATH_XCU_ID
125
dnl
126
dnl Find the correct 'id' programm which accepts the arguments specified
127
dnl in http://www.opengroup.org/onlinepubs/007908799/xcu/id.html
128
dnl SunOS for example has this one in /usr/xpg4/bin, not /usr/bin
129
dnl
130
dnl This does AC_SUBST(XCU_ID) and accepts an absolute path
131
dnl to be preset in XCU_ID variable.
132
dnl If no id program is found, XCU_ID is left empty, not the word 'no'.
133
dnl
134
dnl Q: Why is it called 'XCU_ID' ?
135
dnl A: The name 'ID' might be misunderstood, so i decided 'XCU_ID'.
136
dnl    XCU is the section where the specification of 'id' resides in at
137
dnl    opengroup.org, whereof 'CU' is synonym for "commandline utilities".
138
dnl
139
dnl @version $Id$
140
dnl
141
dnl @author Michael Haubenwallner <mhaubi at users dot sourceforge dot net>
142
dnl
143
AC_DEFUN([AX_PATH_XCU_ID],[dnl
144
  AC_CACHE_CHECK([for a SUSv2-compatible xcu id], [ax_cv_path_XCU_ID],
145
  [case $XCU_ID in
146
  [[\\/]]* | ?:[[\\/]]*)
147
    # Let the user override the test with a path.
148
    ax_cv_path_XCU_ID="$XCU_ID"
149
    ;;
150
  *)
151
    save_IFS=${IFS}
152
    ax_cv_path_XCU_ID=no
153
    IFS=':'
154
    for p in /usr/bin:/usr/xpg4/bin:${PATH}
155
    do
156
      IFS=${save_IFS}
157
      test -x "${p}/id" || continue
158
      ax_cv_path_XCU_ID="${p}/id"
159
      for a in '' '-G' '-Gn' '-g' '-gn' '-gr' '-gnr' '-u' '-un' '-ur' '-unr'
160
      do
161
        "${ax_cv_path_XCU_ID}" ${a} >/dev/null 2>&1 \
162
        || { ax_cv_path_XCU_ID=no ; break ; }
163
      done
164
      test "x${ax_cv_path_XCU_ID}" = "xno" || break
165
    done
166
    IFS=${save_IFS}
167
    ;;
168
  esac])
169
  XCU_ID="${ax_cv_path_XCU_ID}"
170
  test "x${XCU_ID}" != "xno" || XCU_ID=
171
  test "$1:${XCU_ID}" != "required:"dnl
172
  || AC_MSG_ERROR([SUSv2-compatible id not found (use XCU_ID=/path/to/id).])
173
  AC_SUBST(XCU_ID)dnl
174
])dnl
175
176
dnl @synopsis AX_PATH_EGREP
177
dnl
178
dnl Much like AC_PROG_EGREP, but set output variable EGREP to an absolute path.
179
dnl
180
dnl Example:
181
dnl
182
dnl   AX_PATH_EGREP
183
dnl
184
dnl This let EGREP be the absolute path for egrep
185
dnl
186
dnl @version %Id:%
187
dnl @author Michael Haubenwallner <mhaubi at users dot sf dot net>
188
dnl
189
AC_DEFUN([AX_PATH_EGREP],[dnl
190
  AC_REQUIRE([AC_PROG_EGREP])dnl
191
  set dummy ${EGREP}
192
  egrep=[$]2 ; shift ; shift
193
  egrep_args=[$]*
194
  EGREP=
195
  AC_PATH_PROG(EGREP, [${egrep}])
196
  EGREP="${EGREP} ${egrep_args}"
197
])dnl
198
199
(-)portage-cvs/aclocal.m4 (-908 lines)
Lines 1-908 Link Here
1
# generated automatically by aclocal 1.8.5 -*- Autoconf -*-
2
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
4
# Free Software Foundation, Inc.
5
# This file is free software; the Free Software Foundation
6
# gives unlimited permission to copy and/or distribute it,
7
# with or without modifications, as long as this notice is preserved.
8
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
# PARTICULAR PURPOSE.
13
14
#                                                        -*- Autoconf -*-
15
# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
16
# Generated from amversion.in; do not edit by hand.
17
18
# This program is free software; you can redistribute it and/or modify
19
# it under the terms of the GNU General Public License as published by
20
# the Free Software Foundation; either version 2, or (at your option)
21
# any later version.
22
23
# This program is distributed in the hope that it will be useful,
24
# but WITHOUT ANY WARRANTY; without even the implied warranty of
25
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26
# GNU General Public License for more details.
27
28
# You should have received a copy of the GNU General Public License
29
# along with this program; if not, write to the Free Software
30
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
31
32
# AM_AUTOMAKE_VERSION(VERSION)
33
# ----------------------------
34
# Automake X.Y traces this macro to ensure aclocal.m4 has been
35
# generated from the m4 files accompanying Automake X.Y.
36
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"])
37
38
# AM_SET_CURRENT_AUTOMAKE_VERSION
39
# -------------------------------
40
# Call AM_AUTOMAKE_VERSION so it can be traced.
41
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
42
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
43
	 [AM_AUTOMAKE_VERSION([1.8.5])])
44
45
# AM_AUX_DIR_EXPAND
46
47
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
48
49
# This program is free software; you can redistribute it and/or modify
50
# it under the terms of the GNU General Public License as published by
51
# the Free Software Foundation; either version 2, or (at your option)
52
# any later version.
53
54
# This program is distributed in the hope that it will be useful,
55
# but WITHOUT ANY WARRANTY; without even the implied warranty of
56
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
57
# GNU General Public License for more details.
58
59
# You should have received a copy of the GNU General Public License
60
# along with this program; if not, write to the Free Software
61
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
62
# 02111-1307, USA.
63
64
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
65
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
66
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
67
#
68
# Of course, Automake must honor this variable whenever it calls a
69
# tool from the auxiliary directory.  The problem is that $srcdir (and
70
# therefore $ac_aux_dir as well) can be either absolute or relative,
71
# depending on how configure is run.  This is pretty annoying, since
72
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
73
# source directory, any form will work fine, but in subdirectories a
74
# relative path needs to be adjusted first.
75
#
76
# $ac_aux_dir/missing
77
#    fails when called from a subdirectory if $ac_aux_dir is relative
78
# $top_srcdir/$ac_aux_dir/missing
79
#    fails if $ac_aux_dir is absolute,
80
#    fails when called from a subdirectory in a VPATH build with
81
#          a relative $ac_aux_dir
82
#
83
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
84
# are both prefixed by $srcdir.  In an in-source build this is usually
85
# harmless because $srcdir is `.', but things will broke when you
86
# start a VPATH build or use an absolute $srcdir.
87
#
88
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
89
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
90
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
91
# and then we would define $MISSING as
92
#   MISSING="\${SHELL} $am_aux_dir/missing"
93
# This will work as long as MISSING is not called from configure, because
94
# unfortunately $(top_srcdir) has no meaning in configure.
95
# However there are other variables, like CC, which are often used in
96
# configure, and could therefore not use this "fixed" $ac_aux_dir.
97
#
98
# Another solution, used here, is to always expand $ac_aux_dir to an
99
# absolute PATH.  The drawback is that using absolute paths prevent a
100
# configured tree to be moved without reconfiguration.
101
102
AC_DEFUN([AM_AUX_DIR_EXPAND],
103
[dnl Rely on autoconf to set up CDPATH properly.
104
AC_PREREQ([2.50])dnl
105
# expand $ac_aux_dir to an absolute path
106
am_aux_dir=`cd $ac_aux_dir && pwd`
107
])
108
109
# AM_CONDITIONAL                                              -*- Autoconf -*-
110
111
# Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
112
113
# This program is free software; you can redistribute it and/or modify
114
# it under the terms of the GNU General Public License as published by
115
# the Free Software Foundation; either version 2, or (at your option)
116
# any later version.
117
118
# This program is distributed in the hope that it will be useful,
119
# but WITHOUT ANY WARRANTY; without even the implied warranty of
120
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
121
# GNU General Public License for more details.
122
123
# You should have received a copy of the GNU General Public License
124
# along with this program; if not, write to the Free Software
125
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
126
# 02111-1307, USA.
127
128
# serial 6
129
130
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
131
# -------------------------------------
132
# Define a conditional.
133
AC_DEFUN([AM_CONDITIONAL],
134
[AC_PREREQ(2.52)dnl
135
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
136
	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
137
AC_SUBST([$1_TRUE])
138
AC_SUBST([$1_FALSE])
139
if $2; then
140
  $1_TRUE=
141
  $1_FALSE='#'
142
else
143
  $1_TRUE='#'
144
  $1_FALSE=
145
fi
146
AC_CONFIG_COMMANDS_PRE(
147
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
148
  AC_MSG_ERROR([conditional "$1" was never defined.
149
Usually this means the macro was only invoked conditionally.])
150
fi])])
151
152
# serial 7						-*- Autoconf -*-
153
154
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
155
# Free Software Foundation, Inc.
156
157
# This program is free software; you can redistribute it and/or modify
158
# it under the terms of the GNU General Public License as published by
159
# the Free Software Foundation; either version 2, or (at your option)
160
# any later version.
161
162
# This program is distributed in the hope that it will be useful,
163
# but WITHOUT ANY WARRANTY; without even the implied warranty of
164
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
165
# GNU General Public License for more details.
166
167
# You should have received a copy of the GNU General Public License
168
# along with this program; if not, write to the Free Software
169
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
170
# 02111-1307, USA.
171
172
173
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
174
# written in clear, in which case automake, when reading aclocal.m4,
175
# will think it sees a *use*, and therefore will trigger all it's
176
# C support machinery.  Also note that it means that autoscan, seeing
177
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
178
179
180
181
# _AM_DEPENDENCIES(NAME)
182
# ----------------------
183
# See how the compiler implements dependency checking.
184
# NAME is "CC", "CXX", "GCJ", or "OBJC".
185
# We try a few techniques and use that to set a single cache variable.
186
#
187
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
188
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
189
# dependency, and given that the user is not expected to run this macro,
190
# just rely on AC_PROG_CC.
191
AC_DEFUN([_AM_DEPENDENCIES],
192
[AC_REQUIRE([AM_SET_DEPDIR])dnl
193
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
194
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
195
AC_REQUIRE([AM_DEP_TRACK])dnl
196
197
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
198
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
199
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
200
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
201
                   [depcc="$$1"   am_compiler_list=])
202
203
AC_CACHE_CHECK([dependency style of $depcc],
204
               [am_cv_$1_dependencies_compiler_type],
205
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
206
  # We make a subdir and do the tests there.  Otherwise we can end up
207
  # making bogus files that we don't know about and never remove.  For
208
  # instance it was reported that on HP-UX the gcc test will end up
209
  # making a dummy file named `D' -- because `-MD' means `put the output
210
  # in D'.
211
  mkdir conftest.dir
212
  # Copy depcomp to subdir because otherwise we won't find it if we're
213
  # using a relative directory.
214
  cp "$am_depcomp" conftest.dir
215
  cd conftest.dir
216
  # We will build objects and dependencies in a subdirectory because
217
  # it helps to detect inapplicable dependency modes.  For instance
218
  # both Tru64's cc and ICC support -MD to output dependencies as a
219
  # side effect of compilation, but ICC will put the dependencies in
220
  # the current directory while Tru64 will put them in the object
221
  # directory.
222
  mkdir sub
223
224
  am_cv_$1_dependencies_compiler_type=none
225
  if test "$am_compiler_list" = ""; then
226
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
227
  fi
228
  for depmode in $am_compiler_list; do
229
    # Setup a source with many dependencies, because some compilers
230
    # like to wrap large dependency lists on column 80 (with \), and
231
    # we should not choose a depcomp mode which is confused by this.
232
    #
233
    # We need to recreate these files for each test, as the compiler may
234
    # overwrite some of them when testing with obscure command lines.
235
    # This happens at least with the AIX C compiler.
236
    : > sub/conftest.c
237
    for i in 1 2 3 4 5 6; do
238
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
239
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
240
      # Solaris 8's {/usr,}/bin/sh.
241
      touch sub/conftst$i.h
242
    done
243
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
244
245
    case $depmode in
246
    nosideeffect)
247
      # after this tag, mechanisms are not by side-effect, so they'll
248
      # only be used when explicitly requested
249
      if test "x$enable_dependency_tracking" = xyes; then
250
	continue
251
      else
252
	break
253
      fi
254
      ;;
255
    none) break ;;
256
    esac
257
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
258
    # mode.  It turns out that the SunPro C++ compiler does not properly
259
    # handle `-M -o', and we need to detect this.
260
    if depmode=$depmode \
261
       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
262
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
263
       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
264
         >/dev/null 2>conftest.err &&
265
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
266
       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
267
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
268
      # icc doesn't choke on unknown options, it will just issue warnings
269
      # or remarks (even with -Werror).  So we grep stderr for any message
270
      # that says an option was ignored or not supported.
271
      # When given -MP, icc 7.0 and 7.1 complain thusly:
272
      #   icc: Command line warning: ignoring option '-M'; no argument required
273
      # The diagnosis changed in icc 8.0:
274
      #   icc: Command line remark: option '-MP' not supported
275
      if (grep 'ignoring option' conftest.err ||
276
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
277
        am_cv_$1_dependencies_compiler_type=$depmode
278
        break
279
      fi
280
    fi
281
  done
282
283
  cd ..
284
  rm -rf conftest.dir
285
else
286
  am_cv_$1_dependencies_compiler_type=none
287
fi
288
])
289
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
290
AM_CONDITIONAL([am__fastdep$1], [
291
  test "x$enable_dependency_tracking" != xno \
292
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
293
])
294
295
296
# AM_SET_DEPDIR
297
# -------------
298
# Choose a directory name for dependency files.
299
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
300
AC_DEFUN([AM_SET_DEPDIR],
301
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
302
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
303
])
304
305
306
# AM_DEP_TRACK
307
# ------------
308
AC_DEFUN([AM_DEP_TRACK],
309
[AC_ARG_ENABLE(dependency-tracking,
310
[  --disable-dependency-tracking  speeds up one-time build
311
  --enable-dependency-tracking   do not reject slow dependency extractors])
312
if test "x$enable_dependency_tracking" != xno; then
313
  am_depcomp="$ac_aux_dir/depcomp"
314
  AMDEPBACKSLASH='\'
315
fi
316
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
317
AC_SUBST([AMDEPBACKSLASH])
318
])
319
320
# Generate code to set up dependency tracking.   -*- Autoconf -*-
321
322
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
323
324
# This program is free software; you can redistribute it and/or modify
325
# it under the terms of the GNU General Public License as published by
326
# the Free Software Foundation; either version 2, or (at your option)
327
# any later version.
328
329
# This program is distributed in the hope that it will be useful,
330
# but WITHOUT ANY WARRANTY; without even the implied warranty of
331
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
332
# GNU General Public License for more details.
333
334
# You should have received a copy of the GNU General Public License
335
# along with this program; if not, write to the Free Software
336
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
337
# 02111-1307, USA.
338
339
#serial 2
340
341
# _AM_OUTPUT_DEPENDENCY_COMMANDS
342
# ------------------------------
343
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
344
[for mf in $CONFIG_FILES; do
345
  # Strip MF so we end up with the name of the file.
346
  mf=`echo "$mf" | sed -e 's/:.*$//'`
347
  # Check whether this is an Automake generated Makefile or not.
348
  # We used to match only the files named `Makefile.in', but
349
  # some people rename them; so instead we look at the file content.
350
  # Grep'ing the first line is not enough: some people post-process
351
  # each Makefile.in and add a new line on top of each file to say so.
352
  # So let's grep whole file.
353
  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
354
    dirpart=`AS_DIRNAME("$mf")`
355
  else
356
    continue
357
  fi
358
  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
359
  # Extract the definition of DEP_FILES from the Makefile without
360
  # running `make'.
361
  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
362
  test -z "$DEPDIR" && continue
363
  # When using ansi2knr, U may be empty or an underscore; expand it
364
  U=`sed -n 's/^U = //p' < "$mf"`
365
  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
366
  # We invoke sed twice because it is the simplest approach to
367
  # changing $(DEPDIR) to its actual value in the expansion.
368
  for file in `sed -n '
369
    /^DEP_FILES = .*\\\\$/ {
370
      s/^DEP_FILES = //
371
      :loop
372
	s/\\\\$//
373
	p
374
	n
375
	/\\\\$/ b loop
376
      p
377
    }
378
    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
379
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
380
    # Make sure the directory exists.
381
    test -f "$dirpart/$file" && continue
382
    fdir=`AS_DIRNAME(["$file"])`
383
    AS_MKDIR_P([$dirpart/$fdir])
384
    # echo "creating $dirpart/$file"
385
    echo '# dummy' > "$dirpart/$file"
386
  done
387
done
388
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
389
390
391
# AM_OUTPUT_DEPENDENCY_COMMANDS
392
# -----------------------------
393
# This macro should only be invoked once -- use via AC_REQUIRE.
394
#
395
# This code is only required when automatic dependency tracking
396
# is enabled.  FIXME.  This creates each `.P' file that we will
397
# need in order to bootstrap the dependency handling code.
398
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
399
[AC_CONFIG_COMMANDS([depfiles],
400
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
401
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
402
])
403
404
# Do all the work for Automake.                            -*- Autoconf -*-
405
406
# This macro actually does too much some checks are only needed if
407
# your package does certain things.  But this isn't really a big deal.
408
409
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
410
# Free Software Foundation, Inc.
411
412
# This program is free software; you can redistribute it and/or modify
413
# it under the terms of the GNU General Public License as published by
414
# the Free Software Foundation; either version 2, or (at your option)
415
# any later version.
416
417
# This program is distributed in the hope that it will be useful,
418
# but WITHOUT ANY WARRANTY; without even the implied warranty of
419
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
420
# GNU General Public License for more details.
421
422
# You should have received a copy of the GNU General Public License
423
# along with this program; if not, write to the Free Software
424
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
425
# 02111-1307, USA.
426
427
# serial 11
428
429
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
430
# AM_INIT_AUTOMAKE([OPTIONS])
431
# -----------------------------------------------
432
# The call with PACKAGE and VERSION arguments is the old style
433
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
434
# and VERSION should now be passed to AC_INIT and removed from
435
# the call to AM_INIT_AUTOMAKE.
436
# We support both call styles for the transition.  After
437
# the next Automake release, Autoconf can make the AC_INIT
438
# arguments mandatory, and then we can depend on a new Autoconf
439
# release and drop the old call support.
440
AC_DEFUN([AM_INIT_AUTOMAKE],
441
[AC_PREREQ([2.58])dnl
442
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
443
dnl the ones we care about.
444
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
445
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
446
AC_REQUIRE([AC_PROG_INSTALL])dnl
447
# test to see if srcdir already configured
448
if test "`cd $srcdir && pwd`" != "`pwd`" &&
449
   test -f $srcdir/config.status; then
450
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
451
fi
452
453
# test whether we have cygpath
454
if test -z "$CYGPATH_W"; then
455
  if (cygpath --version) >/dev/null 2>/dev/null; then
456
    CYGPATH_W='cygpath -w'
457
  else
458
    CYGPATH_W=echo
459
  fi
460
fi
461
AC_SUBST([CYGPATH_W])
462
463
# Define the identity of the package.
464
dnl Distinguish between old-style and new-style calls.
465
m4_ifval([$2],
466
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
467
 AC_SUBST([PACKAGE], [$1])dnl
468
 AC_SUBST([VERSION], [$2])],
469
[_AM_SET_OPTIONS([$1])dnl
470
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
471
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
472
473
_AM_IF_OPTION([no-define],,
474
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
475
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
476
477
# Some tools Automake needs.
478
AC_REQUIRE([AM_SANITY_CHECK])dnl
479
AC_REQUIRE([AC_ARG_PROGRAM])dnl
480
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
481
AM_MISSING_PROG(AUTOCONF, autoconf)
482
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
483
AM_MISSING_PROG(AUTOHEADER, autoheader)
484
AM_MISSING_PROG(MAKEINFO, makeinfo)
485
AM_MISSING_PROG(AMTAR, tar)
486
AM_PROG_INSTALL_SH
487
AM_PROG_INSTALL_STRIP
488
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
489
# We need awk for the "check" target.  The system "awk" is bad on
490
# some platforms.
491
AC_REQUIRE([AC_PROG_AWK])dnl
492
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
493
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
494
495
_AM_IF_OPTION([no-dependencies],,
496
[AC_PROVIDE_IFELSE([AC_PROG_CC],
497
                  [_AM_DEPENDENCIES(CC)],
498
                  [define([AC_PROG_CC],
499
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
500
AC_PROVIDE_IFELSE([AC_PROG_CXX],
501
                  [_AM_DEPENDENCIES(CXX)],
502
                  [define([AC_PROG_CXX],
503
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
504
])
505
])
506
507
508
# When config.status generates a header, we must update the stamp-h file.
509
# This file resides in the same directory as the config header
510
# that is generated.  The stamp files are numbered to have different names.
511
512
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
513
# loop where config.status creates the headers, so we can generate
514
# our stamp files there.
515
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
516
[# Compute $1's index in $config_headers.
517
_am_stamp_count=1
518
for _am_header in $config_headers :; do
519
  case $_am_header in
520
    $1 | $1:* )
521
      break ;;
522
    * )
523
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
524
  esac
525
done
526
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
527
528
# AM_PROG_INSTALL_SH
529
# ------------------
530
# Define $install_sh.
531
532
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
533
534
# This program is free software; you can redistribute it and/or modify
535
# it under the terms of the GNU General Public License as published by
536
# the Free Software Foundation; either version 2, or (at your option)
537
# any later version.
538
539
# This program is distributed in the hope that it will be useful,
540
# but WITHOUT ANY WARRANTY; without even the implied warranty of
541
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
542
# GNU General Public License for more details.
543
544
# You should have received a copy of the GNU General Public License
545
# along with this program; if not, write to the Free Software
546
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
547
# 02111-1307, USA.
548
549
AC_DEFUN([AM_PROG_INSTALL_SH],
550
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
551
install_sh=${install_sh-"$am_aux_dir/install-sh"}
552
AC_SUBST(install_sh)])
553
554
#                                                          -*- Autoconf -*-
555
# Copyright (C) 2003  Free Software Foundation, Inc.
556
557
# This program is free software; you can redistribute it and/or modify
558
# it under the terms of the GNU General Public License as published by
559
# the Free Software Foundation; either version 2, or (at your option)
560
# any later version.
561
562
# This program is distributed in the hope that it will be useful,
563
# but WITHOUT ANY WARRANTY; without even the implied warranty of
564
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
565
# GNU General Public License for more details.
566
567
# You should have received a copy of the GNU General Public License
568
# along with this program; if not, write to the Free Software
569
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
570
# 02111-1307, USA.
571
572
# serial 1
573
574
# Check whether the underlying file-system supports filenames
575
# with a leading dot.  For instance MS-DOS doesn't.
576
AC_DEFUN([AM_SET_LEADING_DOT],
577
[rm -rf .tst 2>/dev/null
578
mkdir .tst 2>/dev/null
579
if test -d .tst; then
580
  am__leading_dot=.
581
else
582
  am__leading_dot=_
583
fi
584
rmdir .tst 2>/dev/null
585
AC_SUBST([am__leading_dot])])
586
587
# Check to see how 'make' treats includes.	-*- Autoconf -*-
588
589
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
590
591
# This program is free software; you can redistribute it and/or modify
592
# it under the terms of the GNU General Public License as published by
593
# the Free Software Foundation; either version 2, or (at your option)
594
# any later version.
595
596
# This program is distributed in the hope that it will be useful,
597
# but WITHOUT ANY WARRANTY; without even the implied warranty of
598
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
599
# GNU General Public License for more details.
600
601
# You should have received a copy of the GNU General Public License
602
# along with this program; if not, write to the Free Software
603
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
604
# 02111-1307, USA.
605
606
# serial 2
607
608
# AM_MAKE_INCLUDE()
609
# -----------------
610
# Check to see how make treats includes.
611
AC_DEFUN([AM_MAKE_INCLUDE],
612
[am_make=${MAKE-make}
613
cat > confinc << 'END'
614
am__doit:
615
	@echo done
616
.PHONY: am__doit
617
END
618
# If we don't find an include directive, just comment out the code.
619
AC_MSG_CHECKING([for style of include used by $am_make])
620
am__include="#"
621
am__quote=
622
_am_result=none
623
# First try GNU make style include.
624
echo "include confinc" > confmf
625
# We grep out `Entering directory' and `Leaving directory'
626
# messages which can occur if `w' ends up in MAKEFLAGS.
627
# In particular we don't look at `^make:' because GNU make might
628
# be invoked under some other name (usually "gmake"), in which
629
# case it prints its new name instead of `make'.
630
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
631
   am__include=include
632
   am__quote=
633
   _am_result=GNU
634
fi
635
# Now try BSD make style include.
636
if test "$am__include" = "#"; then
637
   echo '.include "confinc"' > confmf
638
   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
639
      am__include=.include
640
      am__quote="\""
641
      _am_result=BSD
642
   fi
643
fi
644
AC_SUBST([am__include])
645
AC_SUBST([am__quote])
646
AC_MSG_RESULT([$_am_result])
647
rm -f confinc confmf
648
])
649
650
#  -*- Autoconf -*-
651
652
653
# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
654
655
# This program is free software; you can redistribute it and/or modify
656
# it under the terms of the GNU General Public License as published by
657
# the Free Software Foundation; either version 2, or (at your option)
658
# any later version.
659
660
# This program is distributed in the hope that it will be useful,
661
# but WITHOUT ANY WARRANTY; without even the implied warranty of
662
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
663
# GNU General Public License for more details.
664
665
# You should have received a copy of the GNU General Public License
666
# along with this program; if not, write to the Free Software
667
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
668
# 02111-1307, USA.
669
670
# serial 3
671
672
# AM_MISSING_PROG(NAME, PROGRAM)
673
# ------------------------------
674
AC_DEFUN([AM_MISSING_PROG],
675
[AC_REQUIRE([AM_MISSING_HAS_RUN])
676
$1=${$1-"${am_missing_run}$2"}
677
AC_SUBST($1)])
678
679
680
# AM_MISSING_HAS_RUN
681
# ------------------
682
# Define MISSING if not defined so far and test if it supports --run.
683
# If it does, set am_missing_run to use it, otherwise, to nothing.
684
AC_DEFUN([AM_MISSING_HAS_RUN],
685
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
686
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
687
# Use eval to expand $SHELL
688
if eval "$MISSING --run true"; then
689
  am_missing_run="$MISSING --run "
690
else
691
  am_missing_run=
692
  AC_MSG_WARN([`missing' script is too old or missing])
693
fi
694
])
695
696
# AM_PROG_MKDIR_P
697
# ---------------
698
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
699
700
# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
701
702
# This program is free software; you can redistribute it and/or modify
703
# it under the terms of the GNU General Public License as published by
704
# the Free Software Foundation; either version 2, or (at your option)
705
# any later version.
706
707
# This program is distributed in the hope that it will be useful,
708
# but WITHOUT ANY WARRANTY; without even the implied warranty of
709
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
710
# GNU General Public License for more details.
711
712
# You should have received a copy of the GNU General Public License
713
# along with this program; if not, write to the Free Software
714
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
715
# 02111-1307, USA.
716
717
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
718
# created by `make install' are always world readable, even if the
719
# installer happens to have an overly restrictive umask (e.g. 077).
720
# This was a mistake.  There are at least two reasons why we must not
721
# use `-m 0755':
722
#   - it causes special bits like SGID to be ignored,
723
#   - it may be too restrictive (some setups expect 775 directories).
724
#
725
# Do not use -m 0755 and let people choose whatever they expect by
726
# setting umask.
727
#
728
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
729
# Some implementations (such as Solaris 8's) are not thread-safe: if a
730
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
731
# concurrently, both version can detect that a/ is missing, but only
732
# one can create it and the other will error out.  Consequently we
733
# restrict ourselves to GNU make (using the --version option ensures
734
# this.)
735
AC_DEFUN([AM_PROG_MKDIR_P],
736
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
737
  # Keeping the `.' argument allows $(mkdir_p) to be used without
738
  # argument.  Indeed, we sometimes output rules like
739
  #   $(mkdir_p) $(somedir)
740
  # where $(somedir) is conditionally defined.
741
  # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
742
  # expensive solution, as it forces Make to start a sub-shell.)
743
  mkdir_p='mkdir -p -- .'
744
else
745
  # On NextStep and OpenStep, the `mkdir' command does not
746
  # recognize any option.  It will interpret all options as
747
  # directories to create, and then abort because `.' already
748
  # exists.
749
  for d in ./-p ./--version;
750
  do
751
    test -d $d && rmdir $d
752
  done
753
  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
754
  if test -f "$ac_aux_dir/mkinstalldirs"; then
755
    mkdir_p='$(mkinstalldirs)'
756
  else
757
    mkdir_p='$(install_sh) -d'
758
  fi
759
fi
760
AC_SUBST([mkdir_p])])
761
762
# Helper functions for option handling.                    -*- Autoconf -*-
763
764
# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
765
766
# This program is free software; you can redistribute it and/or modify
767
# it under the terms of the GNU General Public License as published by
768
# the Free Software Foundation; either version 2, or (at your option)
769
# any later version.
770
771
# This program is distributed in the hope that it will be useful,
772
# but WITHOUT ANY WARRANTY; without even the implied warranty of
773
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
774
# GNU General Public License for more details.
775
776
# You should have received a copy of the GNU General Public License
777
# along with this program; if not, write to the Free Software
778
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
779
# 02111-1307, USA.
780
781
# serial 2
782
783
# _AM_MANGLE_OPTION(NAME)
784
# -----------------------
785
AC_DEFUN([_AM_MANGLE_OPTION],
786
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
787
788
# _AM_SET_OPTION(NAME)
789
# ------------------------------
790
# Set option NAME.  Presently that only means defining a flag for this option.
791
AC_DEFUN([_AM_SET_OPTION],
792
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
793
794
# _AM_SET_OPTIONS(OPTIONS)
795
# ----------------------------------
796
# OPTIONS is a space-separated list of Automake options.
797
AC_DEFUN([_AM_SET_OPTIONS],
798
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
799
800
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
801
# -------------------------------------------
802
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
803
AC_DEFUN([_AM_IF_OPTION],
804
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
805
806
#
807
# Check to make sure that the build environment is sane.
808
#
809
810
# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
811
812
# This program is free software; you can redistribute it and/or modify
813
# it under the terms of the GNU General Public License as published by
814
# the Free Software Foundation; either version 2, or (at your option)
815
# any later version.
816
817
# This program is distributed in the hope that it will be useful,
818
# but WITHOUT ANY WARRANTY; without even the implied warranty of
819
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
820
# GNU General Public License for more details.
821
822
# You should have received a copy of the GNU General Public License
823
# along with this program; if not, write to the Free Software
824
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
825
# 02111-1307, USA.
826
827
# serial 3
828
829
# AM_SANITY_CHECK
830
# ---------------
831
AC_DEFUN([AM_SANITY_CHECK],
832
[AC_MSG_CHECKING([whether build environment is sane])
833
# Just in case
834
sleep 1
835
echo timestamp > conftest.file
836
# Do `set' in a subshell so we don't clobber the current shell's
837
# arguments.  Must try -L first in case configure is actually a
838
# symlink; some systems play weird games with the mod time of symlinks
839
# (eg FreeBSD returns the mod time of the symlink's containing
840
# directory).
841
if (
842
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
843
   if test "$[*]" = "X"; then
844
      # -L didn't work.
845
      set X `ls -t $srcdir/configure conftest.file`
846
   fi
847
   rm -f conftest.file
848
   if test "$[*]" != "X $srcdir/configure conftest.file" \
849
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
850
851
      # If neither matched, then we have a broken ls.  This can happen
852
      # if, for instance, CONFIG_SHELL is bash and it inherits a
853
      # broken ls alias from the environment.  This has actually
854
      # happened.  Such a system could not be considered "sane".
855
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
856
alias in your environment])
857
   fi
858
859
   test "$[2]" = conftest.file
860
   )
861
then
862
   # Ok.
863
   :
864
else
865
   AC_MSG_ERROR([newly created file is older than distributed files!
866
Check your system clock])
867
fi
868
AC_MSG_RESULT(yes)])
869
870
# AM_PROG_INSTALL_STRIP
871
872
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
873
874
# This program is free software; you can redistribute it and/or modify
875
# it under the terms of the GNU General Public License as published by
876
# the Free Software Foundation; either version 2, or (at your option)
877
# any later version.
878
879
# This program is distributed in the hope that it will be useful,
880
# but WITHOUT ANY WARRANTY; without even the implied warranty of
881
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
882
# GNU General Public License for more details.
883
884
# You should have received a copy of the GNU General Public License
885
# along with this program; if not, write to the Free Software
886
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
887
# 02111-1307, USA.
888
889
# One issue with vendor `install' (even GNU) is that you can't
890
# specify the program used to strip binaries.  This is especially
891
# annoying in cross-compiling environments, where the build's strip
892
# is unlikely to handle the host's binaries.
893
# Fortunately install-sh will honor a STRIPPROG variable, so we
894
# always use install-sh in `make install-strip', and initialize
895
# STRIPPROG with the value of the STRIP variable (set by the user).
896
AC_DEFUN([AM_PROG_INSTALL_STRIP],
897
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
898
# Installed binaries are usually stripped using `strip' when the user
899
# run `make install-strip'.  However `strip' might not be the right
900
# tool to use in cross-compilation environments, therefore Automake
901
# will honor the `STRIP' environment variable to overrule this program.
902
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
903
if test "$cross_compiling" != no; then
904
  AC_CHECK_TOOL([STRIP], [strip], :)
905
fi
906
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
907
AC_SUBST([INSTALL_STRIP_PROGRAM])])
908
(-)portage-cvs/acpackage.m4 (+75 lines)
Line 0 Link Here
1
dnl @synopsis AX_PATH_XCU_ID
2
dnl
3
dnl Find the correct 'id' programm which accepts the arguments specified
4
dnl in http://www.opengroup.org/onlinepubs/007908799/xcu/id.html
5
dnl SunOS for example has this one in /usr/xpg4/bin, not /usr/bin
6
dnl
7
dnl This does AC_SUBST(XCU_ID) and accepts an absolute path
8
dnl to be preset in XCU_ID variable.
9
dnl If no id program is found, XCU_ID is left empty, not the word 'no'.
10
dnl
11
dnl Q: Why is it called 'XCU_ID' ?
12
dnl A: The name 'ID' might be misunderstood, so i decided 'XCU_ID'.
13
dnl    XCU is the section where the specification of 'id' resides in at
14
dnl    opengroup.org, whereof 'CU' is synonym for "commandline utilities".
15
dnl
16
dnl @version $Id$
17
dnl
18
dnl @author Michael Haubenwallner <mhaubi at users dot sourceforge dot net>
19
dnl
20
AC_DEFUN([AX_PATH_XCU_ID],[dnl
21
  AC_CACHE_CHECK([for a SUSv2-compatible xcu id], [ax_cv_path_XCU_ID],
22
  [case $XCU_ID in
23
  [[\\/]]* | ?:[[\\/]]*)
24
    # Let the user override the test with a path.
25
    ax_cv_path_XCU_ID="$XCU_ID"
26
    ;;
27
  *)
28
    save_IFS=${IFS}
29
    ax_cv_path_XCU_ID=no
30
    IFS=':'
31
    for p in /usr/bin:/usr/xpg4/bin:${PATH}
32
    do
33
      IFS=${save_IFS}
34
      test -x "${p}/id" || continue
35
      ax_cv_path_XCU_ID="${p}/id"
36
      for a in '' '-G' '-Gn' '-g' '-gn' '-gr' '-gnr' '-u' '-un' '-ur' '-unr'
37
      do
38
        "${ax_cv_path_XCU_ID}" ${a} >/dev/null 2>&1 \
39
        || { ax_cv_path_XCU_ID=no ; break ; }
40
      done
41
      test "x${ax_cv_path_XCU_ID}" = "xno" || break
42
    done
43
    IFS=${save_IFS}
44
    ;;
45
  esac])
46
  XCU_ID="${ax_cv_path_XCU_ID}"
47
  test "x${XCU_ID}" != "xno" || XCU_ID=
48
  test "$1:${XCU_ID}" != "required:"dnl
49
  || AC_MSG_ERROR([SUSv2-compatible id not found (use XCU_ID=/path/to/id).])
50
  AC_SUBST(XCU_ID)dnl
51
])dnl
52
53
dnl @synopsis AX_PATH_EGREP
54
dnl
55
dnl Much like AC_PROG_EGREP, but set output variable EGREP to an absolute path.
56
dnl
57
dnl Example:
58
dnl
59
dnl   AX_PATH_EGREP
60
dnl
61
dnl This let EGREP be the absolute path for egrep
62
dnl
63
dnl @version %Id:%
64
dnl @author Michael Haubenwallner <mhaubi at users dot sf dot net>
65
dnl
66
AC_DEFUN([AX_PATH_EGREP],[dnl
67
  AC_REQUIRE([AC_PROG_EGREP])dnl
68
  set dummy ${EGREP}
69
  egrep=[$]2 ; shift ; shift
70
  egrep_args=[$]*
71
  EGREP=
72
  AC_PATH_PROG(EGREP, [${egrep}])
73
  EGREP="${EGREP} ${egrep_args}"
74
])dnl
75
(-)portage-cvs/autogen.sh (-2 / +17 lines)
Lines 1-7 Link Here
1
#!/bin/sh
1
#! /bin/bash
2
2
3
autoheader || exit 1
3
set -e
4
5
cd `dirname $0`
6
7
test -f subst-install.vars.in.in || touch subst-install.vars.in.in
8
rm -rf autom4te.cache
9
if type -p acinclude >/dev/null 2>&1 ; then
10
	acinclude
11
elif [ acpackage.m4 -nt acinclude.m4 ]; then
12
	echo "NOTE: missing acinclude: have you sys-devel/ac-archive installed ?"
13
	echo "NOTE: acinclude.m4 might is out of date"
14
	sleep 2
15
fi
4
aclocal-1.8 || exit 1
16
aclocal-1.8 || exit 1
17
if grep '^[ \t]*A[CM]_CONFIG_HEADER' configure.in ; then
18
	autoheader
19
fi
5
libtoolize --automake -c -f || exit 1
20
libtoolize --automake -c -f || exit 1
6
autoconf || exit 1
21
autoconf || exit 1
7
automake-1.8 -a -c || exit 1
22
automake-1.8 -a -c || exit 1
(-)portage-cvs/bin/Makefile.in (-9 / +94 lines)
Lines 1-15 Link Here
1
PORTAGE_BASEDIR = @PORTAGE_BASE@
1
prefix = @prefix@
2
INSTALL		= @INSTALL@
2
exec_prefix = @exec_prefix@
3
INSTALL_script 	= @INSTALL_PROGRAM@ -D -o 0 -g portage -m 755
3
libdir = @libdir@
4
5
srcdir=@srcdir@
6
top_builddir=@top_builddir@
7
8
portageuser = @portageuser@
9
portagegroup = @portagegroup@
10
11
PORTAGE_BIN = @PORTAGE_BASE@/bin
12
LN_S = @LN_S@
13
INSTALL = @INSTALL@
14
INSTALL_script = @INSTALL_PROGRAM@ -o $(portageuser) -g $(portagegroup) -m 755
15
INSTALL_scriptsubst = $(SHELL) ${top_builddir}/subst-install --installcmd='${INSTALL_script}'
16
17
user_binprogs = \
18
	ebuild \
19
	emerge \
20
	g-cpan.pl \
21
	portageq \
22
	quickpkg \
23
	repoman \
24
	tbz2tool \
25
	xpak
26
27
user_sbinprogs = \
28
	archive-conf \
29
	dispatch-conf \
30
	ebuild \
31
	ebuild.sh \
32
	env-update \
33
	etc-update \
34
	fixpackages \
35
	pkgmerge \
36
	regenworld
37
38
list_sourcedir = \
39
	  ( cd ${srcdir} \
40
	&& find . -name 'CVS' -prune \
41
		   -o -name '.\#*' -prune \
42
		   -o -name 'Makefile*' -prune \
43
		   -o -type f -print \
44
	 )
4
45
5
all:
46
all:
47
6
install:
48
install:
7
	$(INSTALL) -d -m 755 -o 0-g portage $(DESTDIR)/$(PORTAGE_BASEDIR)/bin || exit 1
49
	$(INSTALL) -d -m 755 -o $(portageuser) -g $(portagegroup) $(DESTDIR)$(PORTAGE_BIN)
8
	find . -type f -maxdepth 1 -exec $(INSTALL_script) {} $(DESTDIR)/$(PORTAGE_BASEDIR)/bin/{} \; || exit 1
50
	$(list_sourcedir) | while read f \
9
	rm $(DESTDIR)/$(PORTAGE_BASEDIR)/bin/Makefile* || exit 1
51
	; do echo "$(INSTALL_scriptsubst) ${srcdir}/$${f} $(DESTDIR)$(PORTAGE_BIN)/$${f}" \
52
	   ; $(INSTALL_scriptsubst) ${srcdir}/$${f} $(DESTDIR)$(PORTAGE_BIN)/$${f} \
53
	; done
54
	$(INSTALL) -d -m 755 -o $(portageuser) -g $(portagegroup) $(DESTDIR)$(prefix)/bin
55
	cd $(DESTDIR)$(prefix)/bin \
56
	; for p in $(user_binprogs) \
57
	; do test -f $(DESTDIR)$(PORTAGE_BIN)/$${p} \
58
		 || { echo "$(DESTDIR)$(PORTAGE_BIN)/$${p} does not exist" ; exit 1 ; } \
59
	   ; echo "rm -f $(DESTDIR)$(prefix)/bin/$${p}" \
60
	   ; rm -f $(DESTDIR)$(prefix)/bin/$${p} \
61
	   ; echo "$(LN_S) ../lib/portage/bin/$${p} $${p}" \
62
	   ; $(LN_S) ../lib/portage/bin/$${p} $${p} || exit 1 \
63
	; done
64
	$(INSTALL) -d -m 755 -o $(portageuser) -g $(portagegroup) $(DESTDIR)$(prefix)/sbin
65
	cd $(DESTDIR)$(prefix)/sbin \
66
	; for p in $(user_sbinprogs) \
67
	; do test -f $(DESTDIR)$(PORTAGE_BIN)/$${p} \
68
		 || { echo "$(DESTDIR)$(PORTAGE_BIN)/$${p} does not exist" ; exit 1 ; } \
69
	   ; echo "rm -f $(DESTDIR)$(prefix)/sbin/$${p}" \
70
	   ; rm -f $(DESTDIR)$(prefix)/sbin/$${p} \
71
	   ; echo "$(LN_S) ../lib/portage/bin/$${p} $${p}" \
72
	   ; $(LN_S) ../lib/portage/bin/$${p} $${p} || exit 1 \
73
	; done
74
75
uninstall:
76
	$(list_sourcedir) | while read f \
77
	; do echo "rm -f $(DESTDIR)$(PORTAGE_BIN)/$${f}" \
78
	   ; rm -f $(DESTDIR)$(PORTAGE_BIN)/$${f} \
79
	; done
80
	for p in $(user_binprogs) \
81
	; do echo "rm -f $(DESTDIR)$(prefix)/bin/$${p}" \
82
	   ; rm -f $(DESTDIR)$(prefix)/bin/$${p} \
83
	; done
84
	for p in $(user_sbinprogs) \
85
	; do echo "rm -f $(DESTDIR)$(prefix)/sbin/$${p}" \
86
	   ; rm -f $(DESTDIR)$(prefix)/sbin/$${p} \
87
	; done
10
88
11
distdir:
89
distdir:
12
	find . -type f -maxdepth 1 -exec $(INSTALL_script) {} $(distdir)/{} \;
90
	$(list_sourcedir) | while read f \
13
clean:
91
	; do echo "$(INSTALL_script) ${srcdir}/$${f} $(distdir)/$${f}" \
92
	   ; $(INSTALL_script) ${srcdir}/$${f} $(distdir)/$${f} \
93
	; done
94
95
all dvi check installcheck:
96
clean distclean maintainer-clean:
14
97
15
.PHONY:	distdir	install	clean
98
.PHONY: all install distdir uninstall
99
.PHONY: dvi check installcheck
100
.PHONY: clean distclean maintainer-clean
(-)portage-cvs/bin/affect-fakeroot-perms.sh (-1 / +1 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# affect-fakeroot-perms.sh; Make claimed fakeroot permissions, a reality.
2
# affect-fakeroot-perms.sh; Make claimed fakeroot permissions, a reality.
3
# Copyright 2004 Gentoo Foundation
3
# Copyright 2004 Gentoo Foundation
4
# Distributed under the terms of the GNU General Public License v2
4
# Distributed under the terms of the GNU General Public License v2
(-)portage-cvs/bin/archive-conf (-3 / +4 lines)
Lines 1-4 Link Here
1
#!/usr/bin/python
1
#! @PYTHON@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
Lines 11-19 Link Here
11
#
11
#
12
12
13
import os, sys, string
13
import os, sys, string
14
sys.path = ["/usr/lib/portage/pym"]+sys.path
14
sys.path = ["@PORTAGE_BASE@/pym"]+sys.path
15
15
16
import portage, dispatch_conf
16
import portage, dispatch_conf
17
from portage import ROOT, VDB_PATH
17
18
18
FIND_EXTANT_CONTENTS  = "find %s -name CONTENTS"
19
FIND_EXTANT_CONTENTS  = "find %s -name CONTENTS"
19
20
Lines 56-62 Link Here
56
        md5_match_hash[conf] = ''
57
        md5_match_hash[conf] = ''
57
58
58
    # Find all the CONTENT files in VDB_PATH.
59
    # Find all the CONTENT files in VDB_PATH.
59
    content_files += os.popen(FIND_EXTANT_CONTENTS % (portage.root+portage.VDB_PATH)).readlines()
60
    content_files += os.popen(FIND_EXTANT_CONTENTS % (ROOT(VDB_PATH))).readlines()
60
61
61
    # Search for the saved md5 checksum of all the specified config files
62
    # Search for the saved md5 checksum of all the specified config files
62
    # and see if the current file is unmodified or not.
63
    # and see if the current file is unmodified or not.
(-)portage-cvs/bin/chkcontents (-2 / +2 lines)
Lines 1-4 Link Here
1
#!/usr/bin/python
1
#! @PYTHON@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
Lines 9-15 Link Here
9
# the right files).
9
# the right files).
10
10
11
import string, os.path, os, sys
11
import string, os.path, os, sys
12
sys.path = ["/usr/lib/portage/pym"]+sys.path
12
sys.path = ["@PORTAGE_BASE@/pym"]+sys.path
13
import portage
13
import portage
14
14
15
def CONTENTScheck(path):
15
def CONTENTScheck(path):
(-)portage-cvs/bin/clean_locks (-5 / +5 lines)
Lines 1-10 Link Here
1
#!/usr/bin/python -O
1
#! @PYTHON@ -O
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
5
5
6
import os,sys
6
import os,sys
7
sys.path = ["/usr/lib/portage/pym"]+sys.path
7
sys.path = ["@PORTAGE_BASE@/pym"]+sys.path
8
8
9
import portage_locks
9
import portage_locks
10
10
Lines 15-22 Link Here
15
	print "of the locks, even if we can't establish if they are in use."
15
	print "of the locks, even if we can't establish if they are in use."
16
	print "Please attempt cleaning without force first."
16
	print "Please attempt cleaning without force first."
17
	print
17
	print
18
	print sys.argv[0]+" /usr/portage/distfiles/.locks"
18
	print sys.argv[0]+" @prefix@/portage/distfiles/.locks"
19
	print sys.argv[0]+" --force /usr/portage/distfiles/.locks"
19
	print sys.argv[0]+" --force @prefix@/portage/distfiles/.locks"
20
	print
20
	print
21
	sys.exit(1)
21
	sys.exit(1)
22
	
22
	
Lines 33-36 Link Here
33
33
34
34
35
35
36
	
36
	
(-)portage-cvs/bin/db-update.py (-10 / +11 lines)
Lines 1-15 Link Here
1
#!/usr/bin/python -O
1
#! @PYTHON@ -O
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
5
5
6
import os,sys,string
6
import os,sys,string
7
sys.path = ["/usr/lib/portage/pym"]+sys.path
7
sys.path = ["@PORTAGE_BASE@/pym"]+sys.path
8
8
9
import portage
9
import portage
10
from portage import MYROOT,ROOT,VDB_PATH,CACHE_PATH
10
11
11
os.chdir(portage.root+portage.VDB_PATH)
12
os.chdir(ROOT(VDB_PATH))
12
myvirts=portage.grabdict(portage.root+"var/cache/edb/virtuals")
13
myvirts=portage.grabdict(ROOT(CACHE_PATH+"/virtuals"))
13
mypvirts={}
14
mypvirts={}
14
if portage.profiledir:
15
if portage.profiledir:
15
	mypvirts=portage.grabdict(portage.profiledir+"/virtuals")
16
	mypvirts=portage.grabdict(portage.profiledir+"/virtuals")
Lines 50-60 Link Here
50
		myvirts[x]=[mydict[x]]
51
		myvirts[x]=[mydict[x]]
51
print ">>> Database upgrade..."
52
print ">>> Database upgrade..."
52
print ">>> Writing out new virtuals file..."
53
print ">>> Writing out new virtuals file..."
53
portage.writedict(myvirts,portage.root+"var/cache/edb/virtuals")
54
portage.writedict(myvirts,ROOT(CACHE_PATH+"/virtuals"))
54
if not os.path.exists("/tmp/db-upgrade-bak"):
55
if not os.path.exists(MYROOT("tmp/db-upgrade-bak")):
55
	os.mkdir("/tmp/db-upgrade-bak")
56
	os.mkdir(MYROOT("tmp/db-upgrade-bak"))
56
print ">>> Backing up to /tmp/db-upgrade-bak..."
57
print ">>> Backing up to "+MYROOT("tmp/db-upgrade-bak")+"..."
57
for myarg in myvalidargs:
58
for myarg in myvalidargs:
58
	print ">>> Backing up",portage.root+portage.VDB_PATH+"/"+origkey[myarg]
59
	print ">>> Backing up",ROOT(VDB_PATH+"/"+origkey[myarg])
59
	os.system("mv "+portage.root+portage.VDB_PATH+"/"+origkey[myarg]+" /tmp/db-upgrade-bak")
60
	os.system("mv "+ROOT(VDB_PATH+"/"+origkey[myarg])+" "+MYROOT("tmp/db-upgrade-bak"))
60
print ">>> Done."
61
print ">>> Done."
(-)portage-cvs/bin/dispatch-conf (-4 / +5 lines)
Lines 1-4 Link Here
1
#!/usr/bin/python -O
1
#! @PYTHON@ -O
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
Lines 15-23 Link Here
15
from stat import *
15
from stat import *
16
from random import *
16
from random import *
17
import os, shutil, sys, string, re, commands, atexit
17
import os, shutil, sys, string, re, commands, atexit
18
sys.path = ["/usr/lib/portage/pym"]+sys.path
18
sys.path = ["@PORTAGE_BASE@/pym"]+sys.path
19
19
20
import portage, dispatch_conf
20
import portage, dispatch_conf
21
from portage import MYROOT
21
22
22
FIND_EXTANT_CONFIGS  = "find %s/ -iname '._cfg????_*' | sed -e 's://:/:g'"
23
FIND_EXTANT_CONFIGS  = "find %s/ -iname '._cfg????_*' | sed -e 's://:/:g'"
23
DIFF_CONTENTS        = 'diff -Nu %s %s'
24
DIFF_CONTENTS        = 'diff -Nu %s %s'
Lines 237-244 Link Here
237
    def massage (self, newconfigs):
238
    def massage (self, newconfigs):
238
        """Sort, rstrip, remove old versions, break into triad hash.
239
        """Sort, rstrip, remove old versions, break into triad hash.
239
240
240
        Triad is dictionary of current (/etc/make.conf), new (/etc/._cfg0003_make.conf)
241
        Triad is dictionary of current ("""+MYROOT("etc/make.conf")+"""), new ("""+MYROOT("etc/._cfg0003_make.conf")+""")
241
        and dir (/etc).
242
        and dir ("""+MYROOT("etc")+""").
242
243
243
        We keep ._cfg0002_conf over ._cfg0001_conf and ._cfg0000_conf.
244
        We keep ._cfg0002_conf over ._cfg0001_conf and ._cfg0000_conf.
244
        """
245
        """
(-)portage-cvs/bin/dispatch-conf-dialog (-4 / +5 lines)
Lines 1-4 Link Here
1
#!/usr/bin/python -O
1
#! @PYTHON@ -O
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
Lines 13-22 Link Here
13
#  dialog menus
13
#  dialog menus
14
#
14
#
15
import os, shutil, sys, string, re, commands
15
import os, shutil, sys, string, re, commands
16
sys.path = ["/usr/lib/portage/pym"]+sys.path
16
sys.path = ["@PORTAGE_BASE@/pym"]+sys.path
17
17
18
from stat import *
18
from stat import *
19
import portage, dispatch_conf
19
import portage, dispatch_conf
20
from portage import MYROOT
20
21
21
from dcdialog import *
22
from dcdialog import *
22
23
Lines 216-223 Link Here
216
    def massage (self, newconfigs):
217
    def massage (self, newconfigs):
217
        """Sort, rstrip, remove old versions, break into triad hash.
218
        """Sort, rstrip, remove old versions, break into triad hash.
218
219
219
        Triad is dictionary of current (/etc/make.conf), new (/etc/._cfg0003_make.conf)
220
        Triad is dictionary of current ("""+MYROOT("etc/make.conf")+"""), new ("""+MYROOT("etc/._cfg0003_make.conf")+""")
220
        and dir (/etc).
221
        and dir ("""+MYROOT("etc")+""").
221
222
222
        We keep ._cfg0002_conf over ._cfg0001_conf and ._cfg0000_conf.
223
        We keep ._cfg0002_conf over ._cfg0001_conf and ._cfg0000_conf.
223
        """
224
        """
(-)portage-cvs/bin/dobin (-2 / +6 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
Lines 19-26 Link Here
19
	else
19
	else
20
		#otherwise, use reasonable defaults
20
		#otherwise, use reasonable defaults
21
		echo ">>> dobin: making ${x} executable..."
21
		echo ">>> dobin: making ${x} executable..."
22
		if [ "$USERLAND" == "GNU" ]; then
22
		if [ "/@affix@" != "/" ]; then
23
			install -m0755 -o @rootuser@ -g @wheelgroup@  "${x}" "${D}${DESTTREE}/bin" || exit 4
24
		elif [ "$USERLAND" == "GNU" ]; then
23
			install -m0755 -o root -g root  "${x}" "${D}${DESTTREE}/bin" || exit 4
25
			install -m0755 -o root -g root  "${x}" "${D}${DESTTREE}/bin" || exit 4
26
		elif [ "$USERLAND" == "UNIX" ]; then
27
			install -m0755 -o root -g bin  "${x}" "${D}${DESTTREE}/bin" || exit 4
24
		else
28
		else
25
			install -m0755 -o root -g wheel "${x}" "${D}${DESTTREE}/bin" || exit 4
29
			install -m0755 -o root -g wheel "${x}" "${D}${DESTTREE}/bin" || exit 4
26
		fi
30
		fi
(-)portage-cvs/bin/doconfd (-2 / +2 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
Lines 9-15 Link Here
9
fi
9
fi
10
10
11
tmp_INSDESTTREE="${INSDESTTREE}"
11
tmp_INSDESTTREE="${INSDESTTREE}"
12
INSDESTTREE=/etc/conf.d/
12
INSDESTTREE=/${AFFIX}etc/conf.d/
13
doins "$@"
13
doins "$@"
14
INSDESTTREE="${tmp_INSDESTTREE}"
14
INSDESTTREE="${tmp_INSDESTTREE}"
15
unset tmp_INSDESTTREE
15
unset tmp_INSDESTTREE
(-)portage-cvs/bin/dodir (-1 / +1 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
(-)portage-cvs/bin/dodoc (-7 / +7 lines)
Lines 1-19 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
5
5
6
for x in "$@" ; do
6
for x in "$@" ; do
7
	if [ -s "${x}" ] ; then
7
	if [ -s "${x}" ] ; then
8
		if [ ! -d "${D}usr/share/doc/${PF}" ] ; then
8
		if [ ! -d "${D}${PREFIX}/share/doc/${PF}" ] ; then
9
			install -d "${D}usr/share/doc/${PF}"
9
			install -d "${D}${PREFIX}/share/doc/${PF}"
10
		fi
10
		fi
11
		if [ -z "${DOCDESTTREE}" ] ; then
11
		if [ -z "${DOCDESTTREE}" ] ; then
12
			install -m0644 "${x}" "${D}usr/share/doc/${PF}"
12
			install -m0644 "${x}" "${D}${PREFIX}/share/doc/${PF}"
13
			gzip -f -9 "${D}usr/share/doc/${PF}/${x##*/}"
13
			gzip -f -9 "${D}${PREFIX}/share/doc/${PF}/${x##*/}"
14
		else
14
		else
15
			install -m0644 "${x}" "${D}usr/share/doc/${PF}/${DOCDESTTREE}"
15
			install -m0644 "${x}" "${D}${PREFIX}/share/doc/${PF}/${DOCDESTTREE}"
16
			gzip -f -9 "${D}usr/share/doc/${PF}/${DOCDESTTREE}/${x##*/}"
16
			gzip -f -9 "${D}${PREFIX}/share/doc/${PF}/${DOCDESTTREE}/${x##*/}"
17
		fi
17
		fi
18
	else
18
	else
19
		echo "${0}: ${x} does not exist."
19
		echo "${0}: ${x} does not exist."
(-)portage-cvs/bin/doenvd (-2 / +2 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
Lines 9-15 Link Here
9
fi
9
fi
10
10
11
tmp_INSDESTTREE="${INSDESTTREE}"
11
tmp_INSDESTTREE="${INSDESTTREE}"
12
INSDESTTREE=/etc/env.d/
12
INSDESTTREE=/${AFFIX}etc/env.d/
13
doins "$@"
13
doins "$@"
14
INSDESTTREE="${tmp_INSDESTTREE}"
14
INSDESTTREE="${tmp_INSDESTTREE}"
15
unset tmp_INSDESTTREE
15
unset tmp_INSDESTTREE
(-)portage-cvs/bin/doexe (-2 / +2 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
Lines 15-21 Link Here
15
for x in "$@" ; do
15
for x in "$@" ; do
16
	if [ -L "${x}" ] ; then
16
	if [ -L "${x}" ] ; then
17
		cp "${x}" "${T}"
17
		cp "${x}" "${T}"
18
		mysrc="${T}"/`/usr/bin/basename "${x}"`
18
		mysrc="${T}"/`@BASENAME@ "${x}"`
19
	elif [ -d "${x}" ] ; then
19
	elif [ -d "${x}" ] ; then
20
		echo "doexe: warning, skipping directory ${x}"
20
		echo "doexe: warning, skipping directory ${x}"
21
		continue
21
		continue
(-)portage-cvs/bin/dohard (-1 / +1 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
(-)portage-cvs/bin/dohtml (-3 / +7 lines)
Lines 1-4 Link Here
1
#!/usr/bin/python
1
#! @PYTHON@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
Lines 48-56 Link Here
48
	if dirname: fullpath = dirname + "/" + fullpath
48
	if dirname: fullpath = dirname + "/" + fullpath
49
49
50
	if options.DOCDESTTREE:
50
	if options.DOCDESTTREE:
51
		destdir = options.D + "usr/share/doc/" + options.PF + "/" + options.DOCDESTTREE + "/" + options.doc_prefix + "/" + prefix
51
		destdir = options.D + options.PREFIX + "/share/doc/" + options.PF + "/" + options.DOCDESTTREE + "/" + options.doc_prefix + "/" + prefix
52
	else:
52
	else:
53
		destdir = options.D + "usr/share/doc/" + options.PF + "/html/" + options.doc_prefix + "/" + prefix
53
		destdir = options.D + options.PREFIX + "/share/doc/" + options.PF + "/html/" + options.doc_prefix + "/" + prefix
54
54
55
	if os.path.isfile(fullpath):
55
	if os.path.isfile(fullpath):
56
		ext = os.path.splitext(basename)[1]
56
		ext = os.path.splitext(basename)[1]
Lines 74-79 Link Here
74
			self.PF = os.environ["PF"]
74
			self.PF = os.environ["PF"]
75
		if os.environ.has_key("D"):
75
		if os.environ.has_key("D"):
76
			self.D = os.environ["D"]
76
			self.D = os.environ["D"]
77
		if os.environ.has_key("AFFIX"):
78
			self.AFFIX = os.environ["AFFIX"]
79
		if os.environ.has_key("PREFIX"):
80
			self.PREFIX = os.environ["PREFIX"]
77
		if os.environ.has_key("DOCDESTTREE"):
81
		if os.environ.has_key("DOCDESTTREE"):
78
			self.DOCDESTTREE = os.environ["DOCDESTTREE"]
82
			self.DOCDESTTREE = os.environ["DOCDESTTREE"]
79
		
83
		
(-)portage-cvs/bin/doinfo (-5 / +5 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
Lines 7-20 Link Here
7
	echo "doinfo: at least one argument needed"
7
	echo "doinfo: at least one argument needed"
8
	exit 1 	
8
	exit 1 	
9
fi
9
fi
10
if [ ! -d "${D}usr/share/info" ] ; then
10
if [ ! -d "${D}${PREFIX}/share/info" ] ; then
11
	install -d "${D}usr/share/info"
11
	install -d "${D}${PREFIX}/share/info"
12
fi
12
fi
13
13
14
for x in "$@" ; do
14
for x in "$@" ; do
15
	if [ -e "${x}" ] ; then
15
	if [ -e "${x}" ] ; then
16
		install -m0644 "${x}" "${D}usr/share/info"
16
		install -m0644 "${x}" "${D}${PREFIX}/share/info"
17
		gzip -f -9 "${D}usr/share/info/${x##*/}"
17
		gzip -f -9 "${D}${PREFIX}/share/info/${x##*/}"
18
	else
18
	else
19
		echo "doinfo: ${x} does not exist"
19
		echo "doinfo: ${x} does not exist"
20
	fi
20
	fi
(-)portage-cvs/bin/doinitd (-2 / +2 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
Lines 9-15 Link Here
9
fi
9
fi
10
10
11
tmp_EXEDESTTREE="${EXEDESTTREE}"
11
tmp_EXEDESTTREE="${EXEDESTTREE}"
12
EXEDESTTREE=/etc/init.d/
12
EXEDESTTREE=/${AFFIX}etc/init.d/
13
doexe "$@"
13
doexe "$@"
14
EXEDESTTREE="${tmp_EXEDESTTREE}"
14
EXEDESTTREE="${tmp_EXEDESTTREE}"
15
unset tmp_EXEDESTTREE
15
unset tmp_EXEDESTTREE
(-)portage-cvs/bin/doins (-2 / +2 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
Lines 25-31 Link Here
25
for x in "$@" ; do
25
for x in "$@" ; do
26
	if [ -L "$x" ] ; then
26
	if [ -L "$x" ] ; then
27
		cp "$x" "${T}"
27
		cp "$x" "${T}"
28
		mysrc="${T}/$(/usr/bin/basename "${x}")"
28
		mysrc="${T}/$(@BASENAME@ "${x}")"
29
	elif [ -d "$x" ] ; then
29
	elif [ -d "$x" ] ; then
30
		if [ "${DOINSRECUR}" == "n" ] ; then
30
		if [ "${DOINSRECUR}" == "n" ] ; then
31
			continue
31
			continue
(-)portage-cvs/bin/dojar (-1 / +1 lines)
Lines 1-4 Link Here
1
#!/bin/sh
1
#! /bin/sh
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
(-)portage-cvs/bin/dolib (-1 / +1 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
(-)portage-cvs/bin/dolib.a (-1 / +1 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
(-)portage-cvs/bin/dolib.so (-1 / +1 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
(-)portage-cvs/bin/doman (-8 / +8 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
Lines 13-27 Link Here
13
# /opt/gnome/man
13
# /opt/gnome/man
14
# /opt/kde/man
14
# /opt/kde/man
15
15
16
BASE="/usr/share"
16
BASE="${PREFIX}/share"
17
OLDBASE="$BASE"
17
OLDBASE="$BASE"
18
i18n=""
18
i18n=""
19
19
20
for x in "$@" ; do
20
for x in "$@" ; do
21
	[ "$x" == "--"     ] && BASE="/usr/share"
21
	[ "$x" == "--"     ] && BASE="${PREFIX}/share"
22
	[ "$x" == "-kde"   ] && BASE="/opt/kde"
22
	[ "$x" == "-kde"   ] && BASE="/${AFFIX}opt/kde"
23
	[ "$x" == "-gnome" ] && BASE="/opt/gnome"
23
	[ "$x" == "-gnome" ] && BASE="/${AFFIX}opt/gnome"
24
	[ "$x" == "-x11"   ] && BASE="/usr/X11R6"
24
	[ "$x" == "-x11"   ] && BASE="${PREFIX}/X11R6"
25
	if [ "${x:0:6}" == "-i18n=" ] ; then
25
	if [ "${x:0:6}" == "-i18n=" ] ; then
26
		i18n="${x:6}/"
26
		i18n="${x:6}/"
27
	fi
27
	fi
Lines 48-59 Link Here
48
48
49
	if [ "x" == "${suffix:1:1}" ] ; then
49
	if [ "x" == "${suffix:1:1}" ] ; then
50
		OLDBASE="$BASE"
50
		OLDBASE="$BASE"
51
		BASE="/usr/X11R6"
51
		BASE="${PREFIX}/X11R6"
52
	fi
52
	fi
53
53
54
	mandir=${i18n}man${suffix:0:1}
54
	mandir=${i18n}man${suffix:0:1}
55
55
56
	if echo ${mandir} | egrep -q 'man[1-8n]$' -; then
56
	if echo ${mandir} | @EGREP@ -q 'man[1-8n]$' -; then
57
		if [ -e "${x}" ] ; then
57
		if [ -e "${x}" ] ; then
58
			if [ ! -d "${D}${BASE}/man/${mandir}" ] ; then
58
			if [ ! -d "${D}${BASE}/man/${mandir}" ] ; then
59
				install -d "${D}${BASE}/man/${mandir}"
59
				install -d "${D}${BASE}/man/${mandir}"
(-)portage-cvs/bin/domo (-1 / +1 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
(-)portage-cvs/bin/dopython (-2 / +2 lines)
Lines 1-10 Link Here
1
#!/usr/bin/python
1
#! @PYTHON@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
5
5
6
import sys
6
import sys
7
sys.path = ["/usr/lib/portage/pym"]+sys.path
7
sys.path = ["@PORTAGE_BASE@/pym"]+sys.path
8
8
9
from sys import *
9
from sys import *
10
import portage
10
import portage
(-)portage-cvs/bin/dosbin (-2 / +6 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
Lines 18-25 Link Here
18
	else
18
	else
19
		#otherwise, use reasonable defaults
19
		#otherwise, use reasonable defaults
20
		echo ">>> dosbin: making ${x} executable..."
20
		echo ">>> dosbin: making ${x} executable..."
21
    if [ "$USERLAND" == "GNU" ]; then
21
	if [ "/@affix@" != "/" ]; then
22
      install -m0755 -o @rootuser@ -g @wheelgroup@  "${x}" "${D}${DESTTREE}/sbin" || exit 4
23
    elif [ "$USERLAND" == "GNU" ]; then
22
      install -m0755 -o root -g root  "${x}" "${D}${DESTTREE}/sbin" || exit 4
24
      install -m0755 -o root -g root  "${x}" "${D}${DESTTREE}/sbin" || exit 4
25
	elif [ "$USERLAND" == "UNIX" ]; then
26
      install -m0755 -o root -g bin  "${x}" "${D}${DESTTREE}/sbin" || exit 4
23
    else
27
    else
24
      install -m0755 -o root -g wheel "${x}" "${D}${DESTTREE}/sbin" || exit 4
28
      install -m0755 -o root -g wheel "${x}" "${D}${DESTTREE}/sbin" || exit 4
25
    fi
29
    fi
(-)portage-cvs/bin/dosed (-1 / +1 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
(-)portage-cvs/bin/dosym (-1 / +1 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
(-)portage-cvs/bin/ebuild (-15 / +6 lines)
Lines 1-21 Link Here
1
#!/usr/bin/python -O
1
#! @PYTHON@ -O
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
5
5
6
import os,sys,portage_util
6
import os,sys
7
sys.path = ["/usr/lib/portage/pym"]+sys.path
7
sys.path = ["@PORTAGE_BASE@/pym"]+sys.path
8
8
import portage_util
9
def getroot():
9
from portage_const import ROOT
10
	try:
11
		a=os.environ["ROOT"]
12
		if a == '/':
13
			return '/'
14
	except SystemExit, e:
15
		raise # Needed else we can't exit.
16
	except:
17
		return '/'
18
	return os.path.normpath(a)+'/'
19
10
20
os.environ["PORTAGE_CALLER"]="ebuild"
11
os.environ["PORTAGE_CALLER"]="ebuild"
21
		
12
		
Lines 46-52 Link Here
46
			cleanup=1
37
			cleanup=1
47
		else:
38
		else:
48
			cleanup=0
39
			cleanup=0
49
		a=portage.doebuild(pargs[0],x,getroot(),tmpsettings,debug=debug,cleanup=cleanup)
40
		a=portage.doebuild(pargs[0],x,ROOT,tmpsettings,debug=debug,cleanup=cleanup)
50
	except KeyboardInterrupt:
41
	except KeyboardInterrupt:
51
		print "(interrupted by user -- ctrl-C?)"
42
		print "(interrupted by user -- ctrl-C?)"
52
		a=1
43
		a=1
(-)portage-cvs/bin/ebuild-daemon.sh (-7 / +7 lines)
Lines 1-10 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# ebuild-daemon.sh; core ebuild processor handling code
2
# ebuild-daemon.sh; core ebuild processor handling code
3
# Copyright 2004 Gentoo Foundation
3
# Copyright 2004 Gentoo Foundation
4
# Distributed under the terms of the GNU General Public License v2
4
# Distributed under the terms of the GNU General Public License v2
5
$Header$
5
# $Header$
6
 
6
 
7
source /usr/lib/portage/bin/ebuild.sh daemonize
7
source ${PORTAGE_BASE}/bin/ebuild.sh daemonize
8
8
9
alias die='diefunc "$FUNCNAME" "$LINENO" "$?"'
9
alias die='diefunc "$FUNCNAME" "$LINENO" "$?"'
10
#alias listen='read -u 3 -t 10'
10
#alias listen='read -u 3 -t 10'
Lines 13-26 Link Here
13
# use listen/speak for talking to the running portage instance instead of echo'ing to the fd yourself.
13
# use listen/speak for talking to the running portage instance instead of echo'ing to the fd yourself.
14
# this allows us to move the open fd's w/out issues down the line.
14
# this allows us to move the open fd's w/out issues down the line.
15
listen() {
15
listen() {
16
	if ! read -u 3 $1; then
16
	if ! read -u 5 $1; then
17
		echo "coms error, read failed: backing out of daemon."
17
		echo "coms error, read failed: backing out of daemon."
18
		exit 1
18
		exit 1
19
	fi
19
	fi
20
}
20
}
21
21
22
speak() {
22
speak() {
23
	echo "$*" >&4
23
	echo "$*" >&6
24
}
24
}
25
declare -rf speak
25
declare -rf speak
26
26
Lines 154-166 Link Here
154
export QA_CONTROLLED_EXTERNALLY="yes"
154
export QA_CONTROLLED_EXTERNALLY="yes"
155
enable_qa_interceptors
155
enable_qa_interceptors
156
156
157
source "/usr/lib/portage/bin/ebuild-functions.sh" || die "failed sourcing ebuild-functions.sh"
157
source "@PORTAGE_BASE@/bin/ebuild-functions.sh" || die "failed sourcing ebuild-functions.sh"
158
158
159
export PORTAGE_PRELOADED_ECLASSES=''
159
export PORTAGE_PRELOADED_ECLASSES=''
160
unset_colors
160
unset_colors
161
161
162
162
163
PATH='/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/lib/portage/bin'
163
PATH='/@affix@bin:/@affix@sbin:@prefix@/bin:@prefix@/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:@PORTAGE_BASE@/bin'
164
while [ "$alive" == "1" ]; do
164
while [ "$alive" == "1" ]; do
165
	com=''
165
	com=''
166
	listen com
166
	listen com
(-)portage-cvs/bin/ebuild-default-functions.sh (-32 / +38 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# ebuild-default-functions.sh; default functions for ebuild env that aren't saved- specific to the portage instance.
2
# ebuild-default-functions.sh; default functions for ebuild env that aren't saved- specific to the portage instance.
3
# Copyright 2004 Gentoo Foundation
3
# Copyright 2004 Gentoo Foundation
4
# Distributed under the terms of the GNU General Public License v2
4
# Distributed under the terms of the GNU General Public License v2
Lines 16-25 Link Here
16
	# Takes single depend-type atoms.
16
	# Takes single depend-type atoms.
17
17
18
	if declare -F portageq &> /dev/null; then
18
	if declare -F portageq &> /dev/null; then
19
		portageq 'has_version' "${ROOT}" "$1"
19
		portageq 'has_version' "${ROOT}${AFFIX}" "$1"
20
		e=$?
20
		e=$?
21
	else
21
	else
22
		/usr/lib/portage/bin/portageq 'has_version' "${ROOT}" "$1"
22
		@PORTAGE_BASE@/bin/portageq 'has_version' "${ROOT}${AFFIX}" "$1"
23
		e=$?
23
		e=$?
24
	fi
24
	fi
25
	return $e
25
	return $e
Lines 28-37 Link Here
28
best_version() {
28
best_version() {
29
	local -i e
29
	local -i e
30
	if declare -F portageq &> /dev/null; then
30
	if declare -F portageq &> /dev/null; then
31
		portageq 'best_version' "${ROOT}" "$1"
31
		portageq 'best_version' "${ROOT}${AFFIX}" "$1"
32
		e=$?
32
		e=$?
33
	else
33
	else
34
		/usr/lib/portage/bin/portageq 'best_version' "${ROOT}" "$1"
34
		@PORTAGE_BASE@/bin/portageq 'best_version' "${ROOT}${AFFIX}" "$1"
35
		e=$?
35
		e=$?
36
	fi
36
	fi
37
	return $e
37
	return $e
Lines 97-102 Link Here
97
	if [ "$USERLAND" == "BSD" ]; then
97
	if [ "$USERLAND" == "BSD" ]; then
98
		tarvars=""
98
		tarvars=""
99
	else
99
	else
100
		# GNU or UNIX (where GNU tar is required)
100
		tarvars="--no-same-owner"	
101
		tarvars="--no-same-owner"	
101
	fi	
102
	fi	
102
103
Lines 158-171 Link Here
158
		# Make sure we can have it disabled somehow ....
159
		# Make sure we can have it disabled somehow ....
159
		if [ "${DISABLE_GEN_GCC_WRAPPERS}" != "yes" ]; then
160
		if [ "${DISABLE_GEN_GCC_WRAPPERS}" != "yes" ]; then
160
			# Create /lib/cpp if missing or a symlink
161
			# Create /lib/cpp if missing or a symlink
161
			if [ -L /lib/cpp -o ! -e /lib/cpp ]; then
162
			if [ -L /@affix@lib/cpp -o ! -e /@affix@lib/cpp ]; then
162
				[ -L /lib/cpp ] && rm -f /lib/cpp
163
				[ -L /@affix@lib/cpp ] && rm -f /@affix@lib/cpp
163
				gen_wrapper /lib/cpp cpp
164
				gen_wrapper /@affix@lib/cpp cpp
164
			fi
165
			fi
165
			# Create /usr/bin/cc if missing for a symlink
166
			# Create /usr/bin/cc if missing for a symlink
166
			if [ -L /usr/bin/cc -o ! -e /usr/bin/cc ]; then
167
			if [ -L @prefix@/bin/cc -o ! -e @prefix@/bin/cc ]; then
167
				[ -L /usr/bin/cc ] && rm -f /usr/bin/cc
168
				[ -L @prefix@/bin/cc ] && rm -f @prefix@/bin/cc
168
				gen_wrapper /usr/bin/cc gcc
169
				gen_wrapper @prefix@/bin/cc gcc
169
			fi
170
			fi
170
		fi
171
		fi
171
	fi
172
	fi
Lines 424-434 Link Here
424
		echo "UNSAFE SetUID: $i"
425
		echo "UNSAFE SetUID: $i"
425
	done
426
	done
426
	
427
	
427
	if [ -x /usr/bin/readelf -a -x /usr/bin/file ]; then
428
	if [ -x "@READELF@" -a -x "@FILE@" ]; then
428
		for x in $(find "${D}/" -type f \( -perm -04000 -o -perm -02000 \) ); do
429
		for x in $(find "${D}/" -type f \( -perm -04000 -o -perm -02000 \) ); do
429
			f=$(file "${x}")
430
			f=$(file "${x}")
430
			if [ -z "${f/*SB executable*/}" -o -z "${f/*SB shared object*/}" ]; then
431
			if [ -z "${f/*SB executable*/}" -o -z "${f/*SB shared object*/}" ]; then
431
				/usr/bin/readelf -d "${x}" | egrep '\(FLAGS(.*)NOW' > /dev/null
432
				"@READELF@" -d "${x}" | @EGREP@ '\(FLAGS(.*)NOW' > /dev/null
432
				if [ "$?" != "0" ]; then
433
				if [ "$?" != "0" ]; then
433
					if [ ! -z "${f/*statically linked*/}" ]; then
434
					if [ ! -z "${f/*statically linked*/}" ]; then
434
						#uncomment this line out after developers have had ample time to fix pkgs.
435
						#uncomment this line out after developers have had ample time to fix pkgs.
Lines 451-484 Link Here
451
452
452
	local file s
453
	local file s
453
454
454
	find "${D}/" -user  portage -print | while read file; do
455
	[[ ${PORTAGE_USER:-@portageuser@} == ${PORTAGE_ROOTUSER:-@rootuser@} ]] || \
455
		ewarn "file $file was installed with user portage!"
456
	find "${D}/" -user ${PORTAGE_USER:-@portageuser@} -print | while read file; do
457
		ewarn "file $file was installed with user ${PORTAGE_USER:=@portageuser@}!"
456
		s=$(stat_perms $file)
458
		s=$(stat_perms $file)
457
		chown root "$file"
459
		chown ${PORTAGE_ROOTUSER:-@rootuser@} "$file"
458
		#XXX: Stable does not have the symlink test
460
		#XXX: Stable does not have the symlink test
459
		[ -h "$file" ] || chmod "$s" "$file"
461
		[ -h "$file" ] || chmod "$s" "$file"
460
	done
462
	done
461
463
462
	find "${D}/" -group portage -print | while read file; do
464
	find "${D}/" -group ${PORTAGE_GROUP:-@portagegroup@} -print | while read file; do
463
		# Too annoying - uncommenting this as it's a regression - it's not, commenting again
465
		# Too annoying - uncommenting this as it's a regression - it's not, commenting again
464
		#ewarn "file $file was installed with group portage!"
466
		#ewarn "file $file was installed with group ${PORTAGE_GROUP:-@portagegroup@}!"
465
		s=$(stat_perms "$file")
467
		s=$(stat_perms "$file")
466
		if [ "$USERLAND" == "BSD" ]; then
468
		if [ "/@affix@" != "/" ]; then
469
			chgrp ${PORTAGE_WHEELGROUP:-@wheelgroup@} "$file"
470
		elif [ "$USERLAND" == "BSD" ]; then
467
			chgrp wheel "$file"
471
			chgrp wheel "$file"
468
		else
472
		elif [ "$USERLAND" == "UNIX" ]; then
473
			chgrp bin "$file"
474
		else # userland GNU
469
			chgrp root "$file"
475
			chgrp root "$file"
470
		fi
476
		fi
471
		#XXX: Stable does not have the symlink test
477
		#XXX: Stable does not have the symlink test
472
		[ -h "$file" ] || chmod "$s" "$file"
478
		[ -h "$file" ] || chmod "$s" "$file"
473
	done
479
	done
474
480
475
	if hasq multilib-strict ${FEATURES} && [ -x /usr/bin/file -a -x /usr/bin/find -a \
481
	if hasq multilib-strict ${FEATURES} && [ -x "@FILE@" -a -x "@FIND@" -a \
476
	     -n "${MULTILIB_STRICT_DIRS}" -a -n "${MULTILIB_STRICT_DENY}" ]; then
482
	     -n "${MULTILIB_STRICT_DIRS}" -a -n "${MULTILIB_STRICT_DENY}" ]; then
477
		MULTILIB_STRICT_EXEMPT=${MULTILIB_STRICT_EXEMPT:-"(perl5|gcc|gcc-lib)"}
483
		MULTILIB_STRICT_EXEMPT=${MULTILIB_STRICT_EXEMPT:-"(perl5|gcc|gcc-lib)"}
478
		for dir in ${MULTILIB_STRICT_DIRS}; do
484
		for dir in ${MULTILIB_STRICT_DIRS}; do
479
			[ -d "${D}/${dir}" ] || continue
485
			[ -d "${D}/${dir}" ] || continue
480
			for file in $(find ${D}/${dir} -type f | egrep -v "^${D}/${dir}/${MULTILIB_STRICT_EXEMPT}"); do
486
			for file in $(find ${D}/${dir} -type f | @EGREP@ -v "^${D}/${dir}/${MULTILIB_STRICT_EXEMPT}"); do
481
				file ${file} | egrep -q "${MULTILIB_STRICT_DENY}" && die "File ${file} matches a file type that is not allowed in ${dir}"
487
				file ${file} | @EGREP@ -q "${MULTILIB_STRICT_DENY}" && die "File ${file} matches a file type that is not allowed in ${dir}"
482
			done
488
			done
483
		done
489
		done
484
	fi
490
	fi
Lines 503-519 Link Here
503
509
504
	# remove man pages
510
	# remove man pages
505
	if hasq noman $FEATURES; then
511
	if hasq noman $FEATURES; then
506
		rm -fR "${IMAGE}/usr/share/man"
512
		rm -fR "${IMAGE}${PREFIX}/share/man"
507
	fi
513
	fi
508
514
509
	# remove info pages
515
	# remove info pages
510
	if hasq noinfo $FEATURES; then
516
	if hasq noinfo $FEATURES; then
511
		rm -fR "${IMAGE}/usr/share/info"
517
		rm -fR "${IMAGE}${PREFIX}/share/info"
512
	fi
518
	fi
513
519
514
	# remove docs
520
	# remove docs
515
	if hasq nodoc $FEATURES; then
521
	if hasq nodoc $FEATURES; then
516
		rm -fR "${IMAGE}/usr/share/doc"
522
		rm -fR "${IMAGE}${PREFIX}/share/doc"
517
	fi
523
	fi
518
524
519
	# hopefully this will someday allow us to get rid of the no* feature flags
525
	# hopefully this will someday allow us to get rid of the no* feature flags
Lines 535-541 Link Here
535
541
536
	# remove share dir if unnessesary
542
	# remove share dir if unnessesary
537
	if hasq nodoc $FEATURES -o hasq noman $FEATURES -o hasq noinfo $FEATURES; then
543
	if hasq nodoc $FEATURES -o hasq noman $FEATURES -o hasq noinfo $FEATURES; then
538
		rmdir "${IMAGE}/usr/share" &> /dev/null
544
		rmdir "${IMAGE}${PREFIX}/share" &> /dev/null
539
	fi
545
	fi
540
546
541
	# Smart FileSystem Permissions
547
	# Smart FileSystem Permissions
Lines 554-560 Link Here
554
560
555
	# total suid control.
561
	# total suid control.
556
	if hasq suidctl $FEATURES > /dev/null ; then
562
	if hasq suidctl $FEATURES > /dev/null ; then
557
		sfconf=/etc/portage/suidctl.conf
563
		sfconf=/@affix@etc/portage/suidctl.conf
558
		echo ">>> Preforming suid scan in ${IMAGE}"
564
		echo ">>> Preforming suid scan in ${IMAGE}"
559
		for i in $(find ${IMAGE}/ -type f \( -perm -4000 -o -perm -2000 \) ); do
565
		for i in $(find ${IMAGE}/ -type f \( -perm -4000 -o -perm -2000 \) ); do
560
			if [ -s "${sfconf}" ]; then
566
			if [ -s "${sfconf}" ]; then
Lines 588-594 Link Here
588
	if hasq selinux $FEATURES || use selinux; then
594
	if hasq selinux $FEATURES || use selinux; then
589
		# only attempt to label if setfiles is executable
595
		# only attempt to label if setfiles is executable
590
		# and 'context' is available on selinuxfs.
596
		# and 'context' is available on selinuxfs.
591
		if [ -f /selinux/context -a -x /usr/sbin/setfiles ]; then
597
		if [ -f /selinux/context -a -x "@SETFILES@" ]; then
592
			echo ">>> Setting SELinux security labels"
598
			echo ">>> Setting SELinux security labels"
593
			if [ -f ${POLICYDIR}/file_contexts/file_contexts ]; then
599
			if [ -f ${POLICYDIR}/file_contexts/file_contexts ]; then
594
				cp -f "${POLICYDIR}/file_contexts/file_contexts" "${T}"
600
				cp -f "${POLICYDIR}/file_contexts/file_contexts" "${T}"
Lines 597-603 Link Here
597
			fi
603
			fi
598
604
599
			addwrite /selinux/context
605
			addwrite /selinux/context
600
			/usr/sbin/setfiles -r "${IMAGE}" "${T}/file_contexts" "${IMAGE}" \
606
			@SETFILES@ -r "${IMAGE}" "${T}/file_contexts" "${IMAGE}" \
601
				|| die "Failed to set SELinux security labels."
607
				|| die "Failed to set SELinux security labels."
602
		else
608
		else
603
			# nonfatal, since merging can happen outside a SE kernel
609
			# nonfatal, since merging can happen outside a SE kernel
Lines 714-720 Link Here
714
# You can override the setting by exporting a new one from the console, or you can
720
# You can override the setting by exporting a new one from the console, or you can
715
# set a new default in make.*. Here the default is "" or unset.
721
# set a new default in make.*. Here the default is "" or unset.
716
722
717
# in the future might use e* from /etc/init.d/functions.sh if i feel like it
723
# in the future might use e* from /@affix@etc/init.d/functions.sh if i feel like it
718
debug-print() {
724
debug-print() {
719
	if [ "$EBUILD_PHASE" == "depend" ] && [ -z "${PORTAGE_DEBUG}" ]; then
725
	if [ "$EBUILD_PHASE" == "depend" ] && [ -z "${PORTAGE_DEBUG}" ]; then
720
		return
726
		return
Lines 1058-1064 Link Here
1058
# Used to generate the /lib/cpp and /usr/bin/cc wrappers
1064
# Used to generate the /lib/cpp and /usr/bin/cc wrappers
1059
gen_wrapper() {
1065
gen_wrapper() {
1060
	cat > $1 << END
1066
	cat > $1 << END
1061
#!/bin/sh
1067
#! @SHELL@
1062
1068
1063
$2 "\$@"
1069
$2 "\$@"
1064
END
1070
END
(-)portage-cvs/bin/ebuild-functions.sh (-30 / +31 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# ebuild-functions.sh; ebuild env functions, saved with the ebuild (not specific to the portage version).
2
# ebuild-functions.sh; ebuild env functions, saved with the ebuild (not specific to the portage version).
3
# Copyright 2004 Gentoo Foundation
3
# Copyright 2004 Gentoo Foundation
4
# Distributed under the terms of the GNU General Public License v2
4
# Distributed under the terms of the GNU General Public License v2
Lines 74-84 Link Here
74
	ECONF_SOURCE="${ECONF_SOURCE:-.}"
74
	ECONF_SOURCE="${ECONF_SOURCE:-.}"
75
	if [ -x "${ECONF_SOURCE}/configure" ]; then
75
	if [ -x "${ECONF_SOURCE}/configure" ]; then
76
		if hasq autoconfig $FEATURES && ! hasq autoconfig $RESTRICT; then
76
		if hasq autoconfig $FEATURES && ! hasq autoconfig $RESTRICT; then
77
			if [ -e /usr/share/gnuconfig/ ]; then
77
			if [ -e @prefix@/share/gnuconfig/ ]; then
78
				local x
78
				local x
79
				for x in $(find ${WORKDIR} -type f -name config.guess -o -name config.sub); do
79
				for x in $(find ${WORKDIR} -type f -name config.guess -o -name config.sub); do
80
					echo " * econf: updating ${x/${WORKDIR}\/} with /usr/share/gnuconfig/${x##*/}"
80
					echo " * econf: updating ${x/${WORKDIR}\/} with @prefix@/share/gnuconfig/${x##*/}"
81
					cp -f "/usr/share/gnuconfig/${x##*/}" "${x}"
81
					cp -f "@prefix@/share/gnuconfig/${x##*/}" "${x}"
82
				done
82
				done
83
			fi
83
			fi
84
		fi
84
		fi
Lines 105-111 Link Here
105
 				CONF_PREFIX=${pref}
105
 				CONF_PREFIX=${pref}
106
				[ "${CONF_PREFIX:0:1}" != "/" ] && CONF_PREFIX="/${CONF_PREFIX}"
106
				[ "${CONF_PREFIX:0:1}" != "/" ] && CONF_PREFIX="/${CONF_PREFIX}"
107
			else
107
			else
108
				CONF_PREFIX="/usr"
108
				CONF_PREFIX="${PREFIX}"
109
 			fi
109
 			fi
110
 			export CONF_PREFIX
110
 			export CONF_PREFIX
111
			[ "${CONF_LIBDIR:0:1}" != "/" ] && CONF_LIBDIR="/${CONF_LIBDIR}"
111
			[ "${CONF_LIBDIR:0:1}" != "/" ] && CONF_LIBDIR="/${CONF_LIBDIR}"
Lines 123-147 Link Here
123
			EECONF_CACHE="--cache-file=${T}/local_cache"
123
			EECONF_CACHE="--cache-file=${T}/local_cache"
124
		fi
124
		fi
125
		echo "${ECONF_SOURCE}/configure" \
125
		echo "${ECONF_SOURCE}/configure" \
126
			--prefix=/usr \
126
			--prefix=${PREFIX} \
127
			--host=${CHOST} \
127
			--host=${CHOST} \
128
			--mandir=/usr/share/man \
128
			--mandir=${PREFIX}/share/man \
129
			--infodir=/usr/share/info \
129
			--infodir=${PREFIX}/share/info \
130
			--datadir=/usr/share \
130
			--datadir=${PREFIX}/share \
131
			--sysconfdir=/etc \
131
			--sysconfdir=/${AFFIX}etc \
132
			--localstatedir=/var/lib \
132
			--localstatedir=/${AFFIX}var/lib \
133
			${EXTRA_ECONF} \
133
			${EXTRA_ECONF} \
134
			${EECONF_CACHE} \
134
			${EECONF_CACHE} \
135
			"$@"
135
			"$@"
136
136
137
		if ! "${ECONF_SOURCE}/configure" \
137
		if ! "${ECONF_SOURCE}/configure" \
138
			--prefix=/usr \
138
			--prefix=/usr \
139
			--prefix=${PREFIX} \
139
			--host=${CHOST} \
140
			--host=${CHOST} \
140
			--mandir=/usr/share/man \
141
			--mandir=${PREFIX}/share/man \
141
			--infodir=/usr/share/info \
142
			--infodir=${PREFIX}/share/info \
142
			--datadir=/usr/share \
143
			--datadir=${PREFIX}/share \
143
			--sysconfdir=/etc \
144
			--sysconfdir=/${AFFIX}etc \
144
			--localstatedir=/var/lib \
145
			--localstatedir=/${AFFIX}var/lib \
145
			${EXTRA_ECONF} \
146
			${EXTRA_ECONF} \
146
			${EECONF_CACHE} \
147
			${EECONF_CACHE} \
147
			"$@" ; then
148
			"$@" ; then
Lines 188-208 Link Here
188
189
189
	if [ -f ./[mM]akefile -o -f ./GNUmakefile ] ; then
190
	if [ -f ./[mM]akefile -o -f ./GNUmakefile ] ; then
190
		if [ ! -z "${PORTAGE_DEBUG}" ]; then
191
		if [ ! -z "${PORTAGE_DEBUG}" ]; then
191
			make -n prefix=${D}/usr \
192
			make -n prefix=${D}${PREFIX} \
192
				datadir=${D}/usr/share \
193
				datadir=${D}${PREFIX}/share \
193
				infodir=${D}/usr/share/info \
194
				infodir=${D}${PREFIX}/share/info \
194
		  		localstatedir=${D}/var/lib \
195
		  		localstatedir=${D}${AFFIX}var/lib \
195
				mandir=${D}/usr/share/man \
196
				mandir=${D}${PREFIX}/share/man \
196
				sysconfdir=${D}/etc \
197
				sysconfdir=${D}${AFFIX}etc \
197
				${EXTRA_EINSTALL} \
198
				${EXTRA_EINSTALL} \
198
				"$@" install
199
				"$@" install
199
		fi
200
		fi
200
		make prefix=${D}/usr \
201
		make prefix=${D}${PREFIX} \
201
			datadir=${D}/usr/share \
202
			datadir=${D}${PREFIX}/share \
202
			infodir=${D}/usr/share/info \
203
			infodir=${D}${PREFIX}/share/info \
203
			localstatedir=${D}/var/lib \
204
			localstatedir=${D}${AFFIX}var/lib \
204
			mandir=${D}/usr/share/man \
205
			mandir=${D}${PREFIX}/share/man \
205
			sysconfdir=${D}/etc \
206
			sysconfdir=${D}${AFFIX}etc \
206
			${EXTRA_EINSTALL} \
207
			${EXTRA_EINSTALL} \
207
			"$@" install || die "einstall failed" 
208
			"$@" install || die "einstall failed" 
208
	else
209
	else
Lines 324-331 Link Here
324
		export DOCDESTTREE=""
325
		export DOCDESTTREE=""
325
	else
326
	else
326
		export DOCDESTTREE="$1"
327
		export DOCDESTTREE="$1"
327
		if [ ! -d "${D}usr/share/doc/${PF}/${DOCDESTTREE}" ]; then
328
		if [ ! -d "${D}${PREFIX}/share/doc/${PF}/${DOCDESTTREE}" ]; then
328
			install -d "${D}usr/share/doc/${PF}/${DOCDESTTREE}"
329
			install -d "${D}${PREFIX}/share/doc/${PF}/${DOCDESTTREE}"
329
		fi
330
		fi
330
	fi
331
	fi
331
}
332
}
(-)portage-cvs/bin/ebuild.sh (-21 / +32 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# ebuild.sh; ebuild phase processing, env handling
2
# ebuild.sh; ebuild phase processing, env handling
3
# Copyright 2004 Gentoo Foundation
3
# Copyright 2004 Gentoo Foundation
4
# Distributed under the terms of the GNU General Public License v2
4
# Distributed under the terms of the GNU General Public License v2
Lines 23-29 Link Here
23
# readonly.  This limits users, but also helps to ensure that reloaded envs from older portages don't
23
# readonly.  This limits users, but also helps to ensure that reloaded envs from older portages don't
24
# overwrite an internal ebd.sh function that has since changed.
24
# overwrite an internal ebd.sh function that has since changed.
25
25
26
ORIG_VARS=`declare | egrep '^[^[:space:]{}()]+=' | cut -s -d '=' -f 1`
26
ORIG_VARS=`declare | @EGREP@ '^[^[:space:]{}()]+=' | cut -s -d '=' -f 1`
27
ORIG_FUNCS=`declare -F | cut -s -d ' ' -f 3`
27
ORIG_FUNCS=`declare -F | cut -s -d ' ' -f 3`
28
DONT_EXPORT_FUNCS='portageq speak'
28
DONT_EXPORT_FUNCS='portageq speak'
29
DONT_EXPORT_VARS="ORIG_VARS GROUPS ORIG_FUNCS FUNCNAME DAEMONIZED CCACHE.* DISTCC.* AUTOCLEAN CLEAN_DELAY SYNC
29
DONT_EXPORT_VARS="ORIG_VARS GROUPS ORIG_FUNCS FUNCNAME DAEMONIZED CCACHE.* DISTCC.* AUTOCLEAN CLEAN_DELAY SYNC
Lines 38-44 Link Here
38
# knock the sandbox vars back to the defaults.
38
# knock the sandbox vars back to the defaults.
39
reset_sandbox() {
39
reset_sandbox() {
40
	export SANDBOX_ON="1"
40
	export SANDBOX_ON="1"
41
	export SANDBOX_PREDICT="${SANDBOX_PREDICT:+${SANDBOX_PREDICT}:}/proc/self/maps:/dev/console:/usr/lib/portage/pym:/dev/random"
41
	export SANDBOX_PREDICT="${SANDBOX_PREDICT:+${SANDBOX_PREDICT}:}/proc/self/maps:/dev/console:${PORTAGE_BASE}/pym:/dev/random"
42
	export SANDBOX_WRITE="${SANDBOX_WRITE:+${SANDBOX_WRITE}:}/dev/shm:${PORTAGE_TMPDIR}"
42
	export SANDBOX_WRITE="${SANDBOX_WRITE:+${SANDBOX_WRITE}:}/dev/shm:${PORTAGE_TMPDIR}"
43
	export SANDBOX_READ="${SANDBOX_READ:+${SANDBOX_READ}:}/dev/shm:${PORTAGE_TMPDIR}"
43
	export SANDBOX_READ="${SANDBOX_READ:+${SANDBOX_READ}:}/dev/shm:${PORTAGE_TMPDIR}"
44
}
44
}
Lines 177-194 Link Here
177
		echo "reinstate_loaded_env_attributes ()"
177
		echo "reinstate_loaded_env_attributes ()"
178
		echo "{"
178
		echo "{"
179
179
180
		x=$(export | get_vars | egrep -v "$(gen_filter ${DONT_EXPORT_VARS} f x y)$")
180
		x=$(export | get_vars | @EGREP@ -v "$(gen_filter ${DONT_EXPORT_VARS} f x y)$")
181
		[ ! -z "$x" ] && echo "    export `echo $x`"
181
		[ ! -z "$x" ] && echo "    export `echo $x`"
182
		
182
		
183
183
184
		x=$(readonly | get_vars | egrep -v "$(gen_filter ${DONT_EXPORT_VARS} f x y)")
184
		x=$(readonly | get_vars | @EGREP@ -v "$(gen_filter ${DONT_EXPORT_VARS} f x y)")
185
		[ ! -z "$x" ] && echo "    readonly `echo $x`"
185
		[ ! -z "$x" ] && echo "    readonly `echo $x`"
186
		
186
		
187
187
188
		x=$(declare -i | get_vars | egrep -v "$(gen_filter ${DONT_EXPORT_VARS} f x y)")
188
		x=$(declare -i | get_vars | @EGREP@ -v "$(gen_filter ${DONT_EXPORT_VARS} f x y)")
189
		[ ! -z "$x" ] && echo "    declare -i `echo $x`"
189
		[ ! -z "$x" ] && echo "    declare -i `echo $x`"
190
190
191
		declare -F | egrep "^declare -[aFfirtx]+ $(gen_filter ${f} )\$" | egrep -v "^declare -f "
191
		declare -F | @EGREP@ "^declare -[aFfirtx]+ $(gen_filter ${f} )\$" | @EGREP@ -v "^declare -f "
192
		shopt -p
192
		shopt -p
193
		echo "    unset reinstate_loaded_env_attributes"
193
		echo "    unset reinstate_loaded_env_attributes"
194
		echo "}"
194
		echo "}"
Lines 252-258 Link Here
252
	local SANDBOX_STATE=$SANDBOX_ON
252
	local SANDBOX_STATE=$SANDBOX_ON
253
	local EBUILD_PHASE=$EBUILD_PHASE
253
	local EBUILD_PHASE=$EBUILD_PHASE
254
	SANDBOX_ON=0
254
	SANDBOX_ON=0
255
	SANDBOX_READ="/bin:${SANDBOX_READ}:/dev/urandom:/dev/random:/usr/lib/portage/bin/"
255
	SANDBOX_READ="/bin:${SANDBOX_READ}:/dev/urandom:/dev/random:${PORTAGE_BASE}/bin/"
256
	SANDBOX_ON=$SANDBOX_STATE
256
	SANDBOX_ON=$SANDBOX_STATE
257
257
258
	if [ ! -z $DEBUGGING ]; then
258
	if [ ! -z $DEBUGGING ]; then
Lines 281-287 Link Here
281
		eval "$({ [ "${src%.bz2}" != "${src}" ] && bzcat "$src" || cat "${src}"
281
		eval "$({ [ "${src%.bz2}" != "${src}" ] && bzcat "$src" || cat "${src}"
282
			} | filter-env -v $(convert_filter ${DONT_EXPORT_VARS}) \
282
			} | filter-env -v $(convert_filter ${DONT_EXPORT_VARS}) \
283
			-f $(convert_filter ${DONT_EXPORT_FUNCS}) )"
283
			-f $(convert_filter ${DONT_EXPORT_FUNCS}) )"
284
#			} | egrep -v "^$(gen_filter $DONT_EXPORT_VARS)=")"
284
#			} | @EGREP@ -v "^$(gen_filter $DONT_EXPORT_VARS)=")"
285
	else
285
	else
286
		echo "ebuild=${EBUILD}, phase $EBUILD_PHASE" >&2
286
		echo "ebuild=${EBUILD}, phase $EBUILD_PHASE" >&2
287
		return 1
287
		return 1
Lines 321-328 Link Here
321
	OCC="$CC"
321
	OCC="$CC"
322
	OCXX="$CXX"
322
	OCXX="$CXX"
323
323
324
324
	export PATH="/@affix@sbin:@prefix@/sbin:/sbin:/usr/sbin:${PORTAGE_BASE}/bin:/@affix@bin:@prefix@/bin:/bin:/usr/bin${ROOTPATH:+:${ROOTPATH}}"
325
	export PATH="/sbin:/usr/sbin:/usr/lib/portage/bin:/bin:/usr/bin${ROOTPATH:+:${ROOTPATH}}"
326
	if [ "${EBUILD_PHASE}" == "setup" ]; then
325
	if [ "${EBUILD_PHASE}" == "setup" ]; then
327
		#we specifically save the env so it's not stomped on by sourcing.
326
		#we specifically save the env so it's not stomped on by sourcing.
328
		#bug 51552
327
		#bug 51552
Lines 330-336 Link Here
330
329
331
		if [ "$USERLAND" == "GNU" ]; then
330
		if [ "$USERLAND" == "GNU" ]; then
332
			local PORTAGE_SHIFTED_PATH="$PATH"
331
			local PORTAGE_SHIFTED_PATH="$PATH"
333
			source /etc/profile.env &>/dev/null
332
			source /@affix@etc/profile.env &>/dev/null
334
			PATH="${PORTAGE_SHIFTED_PATH:+${PORTAGE_SHIFTED_PATH}}${PATH:+:${PATH}}"
333
			PATH="${PORTAGE_SHIFTED_PATH:+${PORTAGE_SHIFTED_PATH}}${PATH:+:${PATH}}"
335
		fi
334
		fi
336
		#shift path.  I don't care about 51552, I'm not using the env's supplied path, alright? :)
335
		#shift path.  I don't care about 51552, I'm not using the env's supplied path, alright? :)
Lines 354-360 Link Here
354
	[ ! -z "$PREROOTPATH" ] && export PATH="${PREROOTPATH%%:}:$PATH"
353
	[ ! -z "$PREROOTPATH" ] && export PATH="${PREROOTPATH%%:}:$PATH"
355
354
356
355
357
	export DESTTREE=/usr
356
	export DESTTREE=${PREFIX}
358
	export INSDESTTREE=""
357
	export INSDESTTREE=""
359
	export EXEDESTTREE=""
358
	export EXEDESTTREE=""
360
	export DOCDESTTREE=""
359
	export DOCDESTTREE=""
Lines 366-372 Link Here
366
365
367
	# if daemonized, it's already loaded these funcs.
366
	# if daemonized, it's already loaded these funcs.
368
	if [ "$DAEMONIZED" != "yes" ]; then
367
	if [ "$DAEMONIZED" != "yes" ]; then
369
		source "/usr/lib/portage/bin/ebuild-functions.sh" || die "failed sourcing ebuild-functions.sh"
368
		source "${PORTAGE_BASE}/bin/ebuild-functions.sh" || die "failed sourcing ebuild-functions.sh"
370
	fi
369
	fi
371
	SANDBOX_ON="1"
370
	SANDBOX_ON="1"
372
	export S=${WORKDIR}/${P}
371
	export S=${WORKDIR}/${P}
Lines 435-442 Link Here
435
#	echo "DONT_EXPORT_FUNCS=$DONT_EXPORT_FUNCS" >&2
434
#	echo "DONT_EXPORT_FUNCS=$DONT_EXPORT_FUNCS" >&2
436
}
435
}
437
436
438
source "/usr/lib/portage/bin/ebuild-default-functions.sh" || die "failed sourcing ebuild-default-functions.sh"
437
source "${PORTAGE_BASE}/bin/ebuild-default-functions.sh" || die "failed sourcing ebuild-default-functions.sh"
439
source "/usr/lib/portage/bin/isolated-functions.sh" || die "failed sourcing stripped down functions.sh"
438
source "${PORTAGE_BASE}/bin/isolated-functions.sh" || die "failed sourcing stripped down functions.sh"
440
439
441
# general func to call for phase execution.  this handles necessary env loading/dumping, and executing pre/post/dyn
440
# general func to call for phase execution.  this handles necessary env loading/dumping, and executing pre/post/dyn
442
# calls.
441
# calls.
Lines 509-515 Link Here
509
		setup)
508
		setup)
510
			#pkg_setup needs to be out of the sandbox for tmp file creation;
509
			#pkg_setup needs to be out of the sandbox for tmp file creation;
511
			#for example, awking and piping a file in /tmp requires a temp file to be created
510
			#for example, awking and piping a file in /tmp requires a temp file to be created
512
			#in /etc.  If pkg_setup is in the sandbox, both our lilo and apache ebuilds break.
511
			#in /@affix@etc.  If pkg_setup is in the sandbox, both our lilo and apache ebuilds break.
513
512
514
			export SANDBOX_ON="0"
513
			export SANDBOX_ON="0"
515
514
Lines 531-537 Link Here
531
				[ "$PORTAGE_DEBUG" == "1" ] && set +x
530
				[ "$PORTAGE_DEBUG" == "1" ] && set +x
532
531
533
				if hasq distcc ${FEATURES} &>/dev/null; then
532
				if hasq distcc ${FEATURES} &>/dev/null; then
534
					if [ -d /usr/lib/distcc/bin ]; then
533
					if [ -d @prefix@/lib/distcc/bin ]; then
534
						#We can enable distributed compile support
535
						if [ -z "${PATH/*distcc*/}" ]; then
536
							# Remove the other reference.
537
							remove_path_entry "distcc"
538
						fi
539
						export PATH="@prefix@/lib/distcc/bin:${PATH}"
540
						[ ! -z "${DISTCC_LOG}" ] && addwrite "$(dirname ${DISTCC_LOG})"
541
					elif [ -d /usr/lib/distcc/bin ]; then
535
						#We can enable distributed compile support
542
						#We can enable distributed compile support
536
						if [ -z "${PATH/*distcc*/}" ]; then
543
						if [ -z "${PATH/*distcc*/}" ]; then
537
							# Remove the other reference.
544
							# Remove the other reference.
Lines 552-558 Link Here
552
						remove_path_entry "ccache"
559
						remove_path_entry "ccache"
553
					fi
560
					fi
554
561
555
					if [ -d /usr/lib/ccache/bin ]; then
562
					if [ -d @prefix@/lib/ccache/bin ]; then
563
						export PATH="@prefix@/lib/ccache/bin:${PATH}"
564
					elif [ -d @prefix@/bin/ccache ]; then
565
						export PATH="@prefix@/bin/ccache:${PATH}"
566
					elif [ -d /usr/lib/ccache/bin ]; then
556
						export PATH="/usr/lib/ccache/bin:${PATH}"
567
						export PATH="/usr/lib/ccache/bin:${PATH}"
557
					elif [ -d /usr/bin/ccache ]; then
568
					elif [ -d /usr/bin/ccache ]; then
558
						export PATH="/usr/bin/ccache:${PATH}"
569
						export PATH="/usr/bin/ccache:${PATH}"
Lines 691-697 Link Here
691
if [ -z "${ORIG_VARS}" ]; then
702
if [ -z "${ORIG_VARS}" ]; then
692
	DONT_EXPORT_VARS="${DONT_EXPORT_VARS} ${f}"
703
	DONT_EXPORT_VARS="${DONT_EXPORT_VARS} ${f}"
693
else
704
else
694
	DONT_EXPORT_VARS="${DONT_EXPORT_VARS} $(echo "${f}" | egrep -v "^`gen_filter ${ORIG_VARS}`\$")"
705
	DONT_EXPORT_VARS="${DONT_EXPORT_VARS} $(echo "${f}" | @EGREP@ -v "^`gen_filter ${ORIG_VARS}`\$")"
695
fi
706
fi
696
unset f
707
unset f
697
                 
708
                 
Lines 703-709 Link Here
703
set +f
714
set +f
704
715
705
export XARGS
716
export XARGS
706
if [ "$(id -nu)" == "portage" ] ; then
717
if [ "$(@XCU_ID@ -nu)" == "portage" ] ; then
707
	export USER=portage
718
	export USER=portage
708
fi
719
fi
709
set +H -h
720
set +H -h
(-)portage-cvs/bin/emake (-1 / +1 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
(-)portage-cvs/bin/emerge (-146 / +169 lines)
Lines 1-13 Link Here
1
#!/usr/bin/python -O
1
#! @PYTHON@ -O
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
5
5
6
import os,sys
6
import os,sys
7
os.environ["PORTAGE_CALLER"]="emerge"
7
os.environ["PORTAGE_CALLER"]="emerge"
8
sys.path = ["/usr/lib/portage/pym"]+sys.path
8
sys.path = ["@PORTAGE_BASE@/pym"]+sys.path
9
9
10
import portage
10
import portage_const, portage
11
from portage_const import MYROOT,ROOT,VDB_PATH,WORLD_FILE
11
import random
12
import random
12
13
13
import emergehelp,xpak,string,re,commands,time,shutil,traceback,atexit,signal,socket,types
14
import emergehelp,xpak,string,re,commands,time,shutil,traceback,atexit,signal,socket,types
Lines 391-399 Link Here
391
	print
392
	print
392
	print red("*** --inject has been deprecated.")
393
	print red("*** --inject has been deprecated.")
393
	print red("*** If you manage a piece of software yourself, add it's name and")
394
	print red("*** If you manage a piece of software yourself, add it's name and")
394
	print red("*** version (eg foo/bar-1.0) to /etc/portage/profile/package.provided.")
395
	print red("*** version (eg foo/bar-1.0) to "+MYROOT(CUSTOM_PROFILE_PATH+"/package.provided")+".")
395
	print red("*** If you want to prevent portage from upgrading a package, add it to")
396
	print red("*** If you want to prevent portage from upgrading a package, add it to")
396
	print red("*** /etc/portage/package.mask prepending it with '>' (eg >foo/bar-1.0)")
397
	print red("*** "+MYROOT(USER_CONFIG_PATH+"/package.mask")+" prepending it with '>' (eg >foo/bar-1.0)")
397
	print red("*** For more information on fine-grained portage control, please see")
398
	print red("*** For more information on fine-grained portage control, please see")
398
	print red("*** the portage man page.")
399
	print red("*** the portage man page.")
399
	print
400
	print
Lines 406-417 Link Here
406
			xtermTitle(mystr)
407
			xtermTitle(mystr)
407
	try:
408
	try:
408
		#seems odd opening a file each write...
409
		#seems odd opening a file each write...
409
		if not os.path.exists("/var/log/emerge.log"):
410
		if not os.path.exists(MYROOT("var/log/emerge.log")):
410
			mylogfile=open("/var/log/emerge.log", "w")
411
			mylogfile=open(MYROOT("var/log/emerge.log"), "w")
411
			os.chmod("/var/log/emerge.log", S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP)
412
			os.chmod(MYROOT("var/log/emerge.log"), S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP)
412
			os.chown("/var/log/emerge.log", portage.portage_uid, portage.portage_gid)
413
			os.chown(MYROOT("var/log/emerge.log"), portage.portage_uid, portage.portage_gid)
413
		else:
414
		else:
414
			mylogfile=open("/var/log/emerge.log", "a")
415
			mylogfile=open(MYROOT("var/log/emerge.log"), "a")
415
416
416
		l=portage_locks.lockfile(mylogfile)
417
		l=portage_locks.lockfile(mylogfile)
417
		# seek because we may have gotten held up by the lock.
418
		# seek because we may have gotten held up by the lock.
Lines 473-485 Link Here
473
	return:  the current in-use gcc version
474
	return:  the current in-use gcc version
474
	"""
475
	"""
475
476
476
	gcc_env_dir = os.path.join('/', 'etc', 'env.d', 'gcc')
477
	gcc_env_dir = os.path.join(MYROOT(), 'etc', 'env.d', 'gcc')
477
	gcc_config_config = os.path.join(gcc_env_dir, 'config')
478
	gcc_config_config = os.path.join(gcc_env_dir, 'config')
478
	gcc_ver_command = 'gcc -dumpversion'
479
	gcc_ver_command = 'gcc -dumpversion'
479
	gcc_ver_prefix = 'gcc-'
480
	gcc_ver_prefix = 'gcc-'
480
481
481
	gcc_not_found_error = red(
482
	gcc_not_found_error = red(
482
	"!!! No gcc found. You probably need to 'source /etc/profile'\n" +
483
	"!!! No gcc found. You probably need to 'source "+MYROOT("etc/profile")+"'\n" +
483
	"!!! to update the environment of this terminal and possibly\n" +
484
	"!!! to update the environment of this terminal and possibly\n" +
484
	"!!! other terminals also."
485
	"!!! other terminals also."
485
	)
486
	)
Lines 534-540 Link Here
534
def getportageversion():
535
def getportageversion():
535
	try:
536
	try:
536
		import re
537
		import re
537
		profilever = os.path.normpath("///"+os.readlink("/etc/make.profile"))
538
		profilever = os.path.normpath("///"+os.readlink(MYROOT("etc/make.profile")))
538
		basepath   = os.path.normpath("///"+portage.settings["PORTDIR"]+"/profiles")
539
		basepath   = os.path.normpath("///"+portage.settings["PORTDIR"]+"/profiles")
539
		if re.match(basepath,profilever):
540
		if re.match(basepath,profilever):
540
			profilever = profilever[len(basepath)+1:]
541
			profilever = profilever[len(basepath)+1:]
Lines 546-553 Link Here
546
	except:
547
	except:
547
		profilever="unavailable"
548
		profilever="unavailable"
548
	libcver=[]
549
	libcver=[]
549
	libclist  = portage.vardbapi(portage.root).match("virtual/libc")
550
	libclist  = portage.vardbapi(ROOT).match("virtual/libc")
550
	libclist += portage.vardbapi(portage.root).match("virtual/glibc")
551
	libclist += portage.vardbapi(ROOT).match("virtual/glibc")
551
	libclist  = portage_util.unique_array(libclist)
552
	libclist  = portage_util.unique_array(libclist)
552
	for x in libclist:
553
	for x in libclist:
553
		xs=portage_versions.catpkgsplit(x)
554
		xs=portage_versions.catpkgsplit(x)
Lines 658-664 Link Here
658
		"""Searches the available and installed packages for the supplied search key.
659
		"""Searches the available and installed packages for the supplied search key.
659
		The list of available and installed packages is created at object instantiation.
660
		The list of available and installed packages is created at object instantiation.
660
		This makes successive searches faster."""
661
		This makes successive searches faster."""
661
		self.installcache = portage.db["/"]["vartree"]
662
		self.installcache = portage.db[MYROOT()]["vartree"]
662
		
663
		
663
	def execute(self,searchkey):
664
	def execute(self,searchkey):
664
		"""Performs the search for the supplied search key"""
665
		"""Performs the search for the supplied search key"""
Lines 752-758 Link Here
752
					mycat = match.split("/")[0]
753
					mycat = match.split("/")[0]
753
					mypkg = match.split("/")[1]
754
					mypkg = match.split("/")[1]
754
755
755
					mydigest = portage.db["/"]["porttree"].dbapi.finddigest(mycat+"/"+mypkg + "-" + myversion)
756
					mydigest = portage.db[MYROOT()]["porttree"].dbapi.finddigest(mycat+"/"+mypkg + "-" + myversion)
756
					
757
					
757
					try:
758
					try:
758
						myfile = open(mydigest,"r")
759
						myfile = open(mydigest,"r")
Lines 828-834 Link Here
828
		mylines=portage.settings.packages
829
		mylines=portage.settings.packages
829
	elif mode=="world":
830
	elif mode=="world":
830
		try:
831
		try:
831
			myfile=open(portage.root+portage.WORLD_FILE,"r")
832
			myfile=open(ROOT(WORLD_FILE),"r")
832
			mylines=myfile.readlines()
833
			mylines=myfile.readlines()
833
			myfile.close()
834
			myfile.close()
834
		except OSError:
835
		except OSError:
Lines 864-870 Link Here
864
		global olddbapi
865
		global olddbapi
865
		self.pkgsettings = portage.config(clone=portage.settings)
866
		self.pkgsettings = portage.config(clone=portage.settings)
866
		if not self.pkgsettings["ARCH"]:
867
		if not self.pkgsettings["ARCH"]:
867
			portage.writemsg(red("\a!!! ARCH is not set... Are you missing the /etc/make.profile symlink?\n"))
868
			portage.writemsg(red("\a!!! ARCH is not set... Are you missing the "
869
				+MYROOT("etc/make.profile")+" symlink?\n"))
868
			portage.writemsg(red("\a!!! Is the symlink correct? Is your portage tree complete?\n\n"))
870
			portage.writemsg(red("\a!!! Is the symlink correct? Is your portage tree complete?\n\n"))
869
			sys.exit(9)
871
			sys.exit(9)
870
		self.applied_useflags = {}
872
		self.applied_useflags = {}
Lines 875-892 Link Here
875
		self.orderedkeys=[]
877
		self.orderedkeys=[]
876
		self.outdatedpackages=[]
878
		self.outdatedpackages=[]
877
		self.mydbapi={}
879
		self.mydbapi={}
878
		self.mydbapi["/"] = portage.fakedbapi()
880
		self.mydbapi[MYROOT()] = portage.fakedbapi()
879
		if "empty" not in myparams:
881
		if "empty" not in myparams:
880
			for pkg in portage.db["/"]["vartree"].getallcpv():
882
			for pkg in portage.db[MYROOT()]["vartree"].getallcpv():
881
				self.mydbapi["/"].cpv_inject(pkg)
883
				self.mydbapi[MYROOT()].cpv_inject(pkg)
882
		if portage.root != "/":
884
		if ROOT() != MYROOT():
883
			self.mydbapi[portage.root] = portage.fakedbapi()
885
			self.mydbapi[ROOT()] = portage.fakedbapi()
884
			if "empty" not in myparams:
886
			if "empty" not in myparams:
885
				for pkg in portage.db[portage.root]["vartree"].getallcpv():
887
				for pkg in portage.db[ROOT()]["vartree"].getallcpv():
886
					self.mydbapi[portage.root].cpv_inject(pkg)
888
					self.mydbapi[ROOT()].cpv_inject(pkg)
887
		
889
		
888
		if "--usepkg" in myopts:
890
		if "--usepkg" in myopts:
889
			portage.db["/"]["bintree"].populate(("--getbinpkg" in myopts), ("--getbinpkgonly" in myopts))
891
			portage.db[MYROOT()]["bintree"].populate(("--getbinpkg" in myopts), ("--getbinpkgonly" in myopts))
890
892
891
	def create(self,mybigkey,myparent=None,addme=1,myuse=None):
893
	def create(self,mybigkey,myparent=None,addme=1,myuse=None):
892
		"""creates the actual digraph of packages to merge.  return 1 on success, 0 on failure
894
		"""creates the actual digraph of packages to merge.  return 1 on success, 0 on failure
Lines 898-904 Link Here
898
		#"no downgrade" emerge
900
		#"no downgrade" emerge
899
		#print "mybigkey:",mybigkey
901
		#print "mybigkey:",mybigkey
900
		
902
		
901
		jbigkey=" ".join(mybigkey)
903
		jbigkey=""
904
		for k in mybigkey:
905
			jbigkey=jbigkey+" "+str(k)
902
		if self.mynewgraph.has_node(jbigkey+" merge") or self.mynewgraph.has_node(jbigkey+" nomerge"):
906
		if self.mynewgraph.has_node(jbigkey+" merge") or self.mynewgraph.has_node(jbigkey+" nomerge"):
903
			if myparent:
907
			if myparent:
904
				if self.mynewgraph.has_node(jbigkey+" merge"):
908
				if self.mynewgraph.has_node(jbigkey+" merge"):
Lines 913-928 Link Here
913
917
914
		mytype,myroot,mykey=mybigkey
918
		mytype,myroot,mykey=mybigkey
915
		# select the correct /var database that we'll be checking against
919
		# select the correct /var database that we'll be checking against
916
		vardbapi=portage.db[myroot]["vartree"].dbapi
920
		vardbapi=portage.db[myroot()]["vartree"].dbapi
917
921
918
		if addme:
922
		if addme:
919
			if mytype=="blocks":
923
			if mytype=="blocks":
920
				# we've encountered a "blocks" node.  We will totally ignore this
924
				# we've encountered a "blocks" node.  We will totally ignore this
921
				# node and not add it to our digraph if it doesn't apply to us.
925
				# node and not add it to our digraph if it doesn't apply to us.
922
				if myparent and (self.mydbapi[myroot].match(mykey) or vardbapi.match(mykey)):
926
				if myparent and (self.mydbapi[myroot()].match(mykey) or vardbapi.match(mykey)):
923
					mybigkey.append(myparent.split()[2])
927
					mybigkey.append(myparent.split()[2])
924
					self.mynewgraph.add_node(" ".join(mybigkey))
928
					jbigkey=""
925
					self.mynewgraph.add_relationship(myparent, " ".join(mybigkey))
929
					for k in mybigkey:
930
						jbigkey=jbigkey+" "+str(k)
931
					self.mynewgraph.add_node(jbigkey)
932
					self.mynewgraph.add_relationship(myparent, jbigkey)
926
				return 1
933
				return 1
927
934
928
		if myuse == None:
935
		if myuse == None:
Lines 963-971 Link Here
963
		
970
		
964
		# whatever the case, we need to add the node to our digraph so
971
		# whatever the case, we need to add the node to our digraph so
965
		# that children can depend upon it.
972
		# that children can depend upon it.
966
		self.mynewgraph.add_node(" ".join(mybigkey))
973
		jbigkey=""
974
		for k in mybigkey:
975
			jbigkey=jbigkey+" "+str(k)
976
		self.mynewgraph.add_node(jbigkey)
967
		if myparent:
977
		if myparent:
968
			self.mynewgraph.add_relationship(myparent, " ".join(mybigkey))
978
			self.mynewgraph.add_relationship(myparent, jbigkey)
969
		if ("deep" not in myparams) and (not merging):
979
		if ("deep" not in myparams) and (not merging):
970
			return 1
980
			return 1
971
		elif "recurse" not in myparams:
981
		elif "recurse" not in myparams:
Lines 975-993 Link Here
975
		if mytype=="binary":
985
		if mytype=="binary":
976
			mypkgparts=portage_versions.catpkgsplit(mykey)
986
			mypkgparts=portage_versions.catpkgsplit(mykey)
977
			tbz2name = mykey.split("/")[1]+".tbz2"
987
			tbz2name = mykey.split("/")[1]+".tbz2"
978
			if tbz2name in portage.db[portage.root]["bintree"].invalids:
988
			if tbz2name in portage.db[ROOT()]["bintree"].invalids:
979
				sys.stderr.write("\nINVALID PACKAGE (is required to continue): "+str(mykey)+"\n")
989
				sys.stderr.write("\nINVALID PACKAGE (is required to continue): "+str(mykey)+"\n")
980
				sys.exit(1)
990
				sys.exit(1)
981
			if portage.db[portage.root]["bintree"].isremote(mykey):
991
			if portage.db[ROOT()]["bintree"].isremote(mykey):
982
				edepend = portage.db[portage.root]["bintree"].remotepkgs[tbz2name]
992
				edepend = portage.db[ROOT()]["bintree"].remotepkgs[tbz2name]
983
				edepend["DEPEND"] =""
993
				edepend["DEPEND"] =""
984
				edepend["RDEPEND"]=" ".join(edepend["RDEPEND"].split())
994
				edepend["RDEPEND"]=" ".join(edepend["RDEPEND"].split())
985
				edepend["PDEPEND"]=" ".join(edepend["PDEPEND"].split())
995
				edepend["PDEPEND"]=" ".join(edepend["PDEPEND"].split())
986
				edepend["CDEPEND"]=" ".join(edepend["CDEPEND"].split())
996
				edepend["CDEPEND"]=" ".join(edepend["CDEPEND"].split())
987
				edepend["SLOT"]   =edepend["SLOT"].strip()
997
				edepend["SLOT"]   =edepend["SLOT"].strip()
988
				#portage.db[portage.root]["bintree"].gettbz2(mykey)
998
				#portage.db[ROOT()]["bintree"].gettbz2(mykey)
989
			else: # It's local.
999
			else: # It's local.
990
				mytbz2=xpak.tbz2(portage.db[portage.root]["bintree"].getname(mykey))
1000
				mytbz2=xpak.tbz2(portage.db[ROOT()]["bintree"].getname(mykey))
991
				edepend["DEPEND"] =""
1001
				edepend["DEPEND"] =""
992
				edepend["RDEPEND"]=" ".join(mytbz2.getelements("RDEPEND"))
1002
				edepend["RDEPEND"]=" ".join(mytbz2.getelements("RDEPEND"))
993
				edepend["PDEPEND"]=" ".join(mytbz2.getelements("PDEPEND"))
1003
				edepend["PDEPEND"]=" ".join(mytbz2.getelements("PDEPEND"))
Lines 1003-1020 Link Here
1003
				print "emerge: create(): aux_get() error on",mykey+"; aborting..."
1013
				print "emerge: create(): aux_get() error on",mykey+"; aborting..."
1004
				sys.exit(1)
1014
				sys.exit(1)
1005
		mydep={}	
1015
		mydep={}	
1006
		mp=" ".join(mybigkey)
1016
		mp=""
1007
1017
		for k in mybigkey:
1008
		if myroot=="/":
1018
			mp=mp+" "+str(k)
1009
			mydep["/"]=edepend["DEPEND"]+" "+edepend["RDEPEND"]
1019
1010
			if not self.select_dep("/",mydep["/"],myparent=mp,myuse=myuse):
1020
		if myroot()==MYROOT():
1021
			mydep[MYROOT()]=edepend["DEPEND"]+" "+edepend["RDEPEND"]
1022
			if not self.select_dep(MYROOT,mydep[MYROOT()],myparent=mp,myuse=myuse):
1011
				return 0
1023
				return 0
1012
		else:
1024
		else:
1013
			mydep["/"]=edepend["DEPEND"]
1025
			mydep[MYROOT()]=edepend["DEPEND"]
1014
			mydep[myroot]=edepend["RDEPEND"]
1026
			mydep[myroot()]=edepend["RDEPEND"]
1015
			if not self.select_dep("/",mydep["/"],myparent=mp,myuse=myuse):
1027
			if not self.select_dep(MYROOT,mydep[MYROOT()],myparent=mp,myuse=myuse):
1016
				return 0
1028
				return 0
1017
			if not self.select_dep(myroot,mydep[myroot],myparent=mp,myuse=myuse):
1029
			if not self.select_dep(myroot,mydep[myroot()],myparent=mp,myuse=myuse):
1018
				return 0
1030
				return 0
1019
1031
1020
		if edepend.has_key("PDEPEND") and edepend["PDEPEND"]:
1032
		if edepend.has_key("PDEPEND") and edepend["PDEPEND"]:
Lines 1041-1070 Link Here
1041
						sys.exit(1)
1053
						sys.exit(1)
1042
				mytbz2=xpak.tbz2(x)
1054
				mytbz2=xpak.tbz2(x)
1043
				mykey=mytbz2.getelements("CATEGORY")[0]+"/"+os.path.basename(x)[:-5]
1055
				mykey=mytbz2.getelements("CATEGORY")[0]+"/"+os.path.basename(x)[:-5]
1044
				if os.path.realpath(portage.db["/"]["bintree"].getname(mykey)) != os.path.realpath(x):
1056
				if os.path.realpath(portage.db[MYROOT()]["bintree"].getname(mykey)) != os.path.realpath(x):
1045
					print red("\n*** You need to adjust PKGDIR to emerge this package.\n")
1057
					print red("\n*** You need to adjust PKGDIR to emerge this package.\n")
1046
					sys.exit(1)
1058
					sys.exit(1)
1047
				if not self.create(["binary",portage.root,mykey],None,"--onlydeps" not in myopts):
1059
				if not self.create(["binary",ROOT,mykey],None,"--onlydeps" not in myopts):
1048
					return (0,myfavorites)
1060
					return (0,myfavorites)
1049
				elif not "--oneshot" in myopts:
1061
				elif not "--oneshot" in myopts:
1050
					myfavorites.append(mykey)
1062
					myfavorites.append(mykey)
1051
			elif x[-7:]==".ebuild":
1063
			elif x[-7:]==".ebuild":
1052
				x = os.path.realpath(x)
1064
				x = os.path.realpath(x)
1053
				mykey=os.path.basename(os.path.normpath(x+"/../.."))+"/"+os.path.basename(x)[:-7]
1065
				mykey=os.path.basename(os.path.normpath(x+"/../.."))+"/"+os.path.basename(x)[:-7]
1054
				ebuild_path = portage.db["/"]["porttree"].dbapi.findname(mykey)
1066
				ebuild_path = portage.db[MYROOT()]["porttree"].dbapi.findname(mykey)
1055
				if ebuild_path:
1067
				if ebuild_path:
1056
				        if os.path.realpath(ebuild_path) != x:
1068
				        if os.path.realpath(ebuild_path) != x:
1057
				                print red("\n*** You need to adjust PORTDIR or PORTDIR_OVERLAY to emerge this package.\n")
1069
				                print red("\n*** You need to adjust PORTDIR or PORTDIR_OVERLAY to emerge this package.\n")
1058
				                sys.exit(1)
1070
				                sys.exit(1)
1059
				        if mykey not in portage.db["/"]["porttree"].dbapi.xmatch("match-visible", portage.portage_dep.dep_getkey(mykey)):
1071
				        if mykey not in portage.db[MYROOT()]["porttree"].dbapi.xmatch("match-visible", portage.portage_dep.dep_getkey(mykey)):
1060
				                print red("\n*** You are emerging a masked package. It is MUCH better to use")
1072
				                print red("\n*** You are emerging a masked package. It is MUCH better to use")
1061
				                print red("*** /etc/portage/package.* to accomplish this. See portage(5) man")
1073
				                print red("*** "+MYROOT(USER_CONFIG_PATH+"/")+"package.* to accomplish this. See portage(5) man")
1062
				                print red("*** page for details.")
1074
				                print red("*** page for details.")
1063
				                countdown(EMERGE_WARNING_DELAY, "Continuing...")
1075
				                countdown(EMERGE_WARNING_DELAY, "Continuing...")
1064
				else:
1076
				else:
1065
				        print red("\n*** "+x+" does not exist")
1077
				        print red("\n*** "+x+" does not exist")
1066
				        sys.exit(1)
1078
				        sys.exit(1)
1067
				if not self.create(["ebuild",portage.root,mykey],None,"--onlydeps" not in myopts):
1079
				if not self.create(["ebuild",ROOT,mykey],None,"--onlydeps" not in myopts):
1068
					return (0,myfavorites)
1080
					return (0,myfavorites)
1069
				elif not "--oneshot" in myopts:
1081
				elif not "--oneshot" in myopts:
1070
					myfavorites.append(mykey)
1082
					myfavorites.append(mykey)
Lines 1085-1091 Link Here
1085
				sys.stderr.flush()
1097
				sys.stderr.flush()
1086
1098
1087
				try:
1099
				try:
1088
					self.mysd = self.select_dep(portage.root,mykey,arg=x)
1100
					self.mysd = self.select_dep(ROOT,mykey,arg=x)
1089
				except portage_exception.MissingSignature, e:
1101
				except portage_exception.MissingSignature, e:
1090
					portage.writemsg("\n\n!!! A missing gpg signature is preventing portage from calculating the\n")
1102
					portage.writemsg("\n\n!!! A missing gpg signature is preventing portage from calculating the\n")
1091
					portage.writemsg("!!! required dependencies. This is a security feature enabled by the admin\n")
1103
					portage.writemsg("!!! required dependencies. This is a security feature enabled by the admin\n")
Lines 1129-1142 Link Here
1129
1141
1130
	def is_newer_ver_installed(self,myroot,pkg,pkgver):
1142
	def is_newer_ver_installed(self,myroot,pkg,pkgver):
1131
		"if there is a version of pkg installed newer than pkgver, return it"
1143
		"if there is a version of pkg installed newer than pkgver, return it"
1132
		vardbapi=portage.db[myroot]["vartree"].dbapi
1144
		vardbapi=portage.db[myroot()]["vartree"].dbapi
1133
1145
1134
		matches=portage.db[myroot]["vartree"].dbapi.match(pkg)
1146
		matches=portage.db[myroot()]["vartree"].dbapi.match(pkg)
1135
		if matches:
1147
		if matches:
1136
			myslot=portage.db["/"]["porttree"].getslot(pkgver)
1148
			myslot=portage.db[MYROOT()]["porttree"].getslot(pkgver)
1137
			for match in matches:
1149
			for match in matches:
1138
				if portage_versions.pkgcmp(portage_versions.catpkgsplit(pkgver)[1:], portage_versions.catpkgsplit(match)[1:]) < 0:
1150
				if portage_versions.pkgcmp(portage_versions.catpkgsplit(pkgver)[1:], portage_versions.catpkgsplit(match)[1:]) < 0:
1139
					curslot=portage.db[myroot]["vartree"].getslot(match)
1151
					curslot=portage.db[myroot()]["vartree"].getslot(match)
1140
					if curslot == myslot:
1152
					if curslot == myslot:
1141
						return match
1153
						return match
1142
1154
Lines 1148-1155 Link Here
1148
			print "Depstring:",depstring
1160
			print "Depstring:",depstring
1149
		if not arg:
1161
		if not arg:
1150
			#processing dependencies
1162
			#processing dependencies
1151
			mycheck=portage.dep_check(depstring,self.mydbapi[myroot],self.pkgsettings,myuse=myuse,use_binaries=("--usepkg" in myopts))
1163
			mycheck=portage.dep_check(depstring,self.mydbapi[myroot()],self.pkgsettings,myuse=myuse,use_binaries=("--usepkg" in myopts))
1152
			#mycheck=portage.dep_check(depstring,self.mydbapi[myroot],self.pkgsettings,myuse=myuse)
1164
			#mycheck=portage.dep_check(depstring,self.mydbapi[myroot()],self.pkgsettings,myuse=myuse)
1153
1165
1154
			if not mycheck[0]:
1166
			if not mycheck[0]:
1155
				mymerge=[]
1167
				mymerge=[]
Lines 1167-1177 Link Here
1167
		if myparent:
1179
		if myparent:
1168
			myp = myparent.split()
1180
			myp = myparent.split()
1169
			if myp[3]=="merge":
1181
			if myp[3]=="merge":
1170
				self.mydbapi[myroot].cpv_inject(myp[2])
1182
				self.mydbapi[myroot()].cpv_inject(myp[2])
1171
				if myp[0]=="binary":
1183
				if myp[0]=="binary":
1172
					self.pkgsettings.setinst(myp[2],portage.db["/"]["bintree"].dbapi)
1184
					self.pkgsettings.setinst(myp[2],portage.db[MYROOT()]["bintree"].dbapi)
1173
				else:
1185
				else:
1174
					self.pkgsettings.setinst(myp[2],portage.db[myroot]["porttree"].dbapi)
1186
					self.pkgsettings.setinst(myp[2],portage.db[myroot()]["porttree"].dbapi)
1175
1187
1176
		if not mymerge:
1188
		if not mymerge:
1177
			return 1
1189
			return 1
Lines 1202-1208 Link Here
1202
				if ("--usepkg" in myopts):
1214
				if ("--usepkg" in myopts):
1203
					# The next line assumes the binarytree has been populated.
1215
					# The next line assumes the binarytree has been populated.
1204
					# XXX: Need to work out how we use the binary tree with roots.
1216
					# XXX: Need to work out how we use the binary tree with roots.
1205
					myeb_pkg_matches=portage.db["/"]["bintree"].dbapi.match(x)
1217
					myeb_pkg_matches=portage.db[MYROOT()]["bintree"].dbapi.match(x)
1206
					if ("--usepkgonly" not in myopts):
1218
					if ("--usepkgonly" not in myopts):
1207
						# Remove any binary package entries that are masked in the portage tree (#55871)
1219
						# Remove any binary package entries that are masked in the portage tree (#55871)
1208
						for idx in range(len(myeb_pkg_matches)-1,-1,-1):
1220
						for idx in range(len(myeb_pkg_matches)-1,-1,-1):
Lines 1281-1287 Link Here
1281
				if myeb:
1293
				if myeb:
1282
					myk=["ebuild",myroot,myeb]
1294
					myk=["ebuild",myroot,myeb]
1283
				elif myeb_pkg:
1295
				elif myeb_pkg:
1284
					binpkguseflags=portage.db[portage.root]["bintree"].get_use(myeb_pkg)
1296
					binpkguseflags=portage.db[ROOT()]["bintree"].get_use(myeb_pkg)
1285
					myk=["binary",myroot,myeb_pkg]
1297
					myk=["binary",myroot,myeb_pkg]
1286
				else:
1298
				else:
1287
					sys.stderr.write("!!! Confused... Don't know what I'm using for dependency info. :(\n")
1299
					sys.stderr.write("!!! Confused... Don't know what I'm using for dependency info. :(\n")
Lines 1289-1295 Link Here
1289
1301
1290
				#if "--usepkg" in myopts:
1302
				#if "--usepkg" in myopts:
1291
				#	#If we want to use packages, see if we have a pre-built one...
1303
				#	#If we want to use packages, see if we have a pre-built one...
1292
				#	mypk=portage.db["/"]["bintree"].dbapi.match(x)
1304
				#	mypk=portage.db[MYROOT()]["bintree"].dbapi.match(x)
1293
				#	if myeb in mypk:
1305
				#	if myeb in mypk:
1294
				#		#Use it only if it's exactly the version we want.
1306
				#		#Use it only if it's exactly the version we want.
1295
				#		myk=["binary",myroot,myeb]
1307
				#		myk=["binary",myroot,myeb]
Lines 1314-1320 Link Here
1314
1326
1315
	def altlist(self):
1327
	def altlist(self):
1316
		mygraph=self.mynewgraph.clone()
1328
		mygraph=self.mynewgraph.clone()
1317
		dolist=["/"]
1329
		dolist=[MYROOT()]
1318
		retlist=[]
1330
		retlist=[]
1319
		for x in portage.db:
1331
		for x in portage.db:
1320
			portage.db[x]["merge"]=[]
1332
			portage.db[x]["merge"]=[]
Lines 1323-1329 Link Here
1323
		while mygraph.get_all_nodes():
1335
		while mygraph.get_all_nodes():
1324
			mycurkey=mygraph.get_leaf_nodes()[0]
1336
			mycurkey=mygraph.get_leaf_nodes()[0]
1325
			splitski=mycurkey.split()
1337
			splitski=mycurkey.split()
1326
			portage.db[splitski[1]]["merge"].append(splitski)	
1338
			splitski[1] = portage_const.find_root_instance(splitski[1])
1339
			portage.db[splitski[1]()]["merge"].append(splitski)	
1327
			mygraph.remove_node(mycurkey)
1340
			mygraph.remove_node(mycurkey)
1328
		for x in dolist:
1341
		for x in dolist:
1329
			for y in portage.db[x]["merge"]:
1342
			for y in portage.db[x]["merge"]:
Lines 1345-1353 Link Here
1345
				#actually installed -- this prevents the remerging of already unmerged packages when we do a world --update;
1358
				#actually installed -- this prevents the remerging of already unmerged packages when we do a world --update;
1346
				#actually available -- this prevents emerge from bombing out due to no match being found (we want a silent ignore)
1359
				#actually available -- this prevents emerge from bombing out due to no match being found (we want a silent ignore)
1347
				if "empty" in myparams:
1360
				if "empty" in myparams:
1348
					if portage.db["/"]["vartree"].dbapi.match(x):
1361
					if portage.db[MYROOT()]["vartree"].dbapi.match(x):
1349
						sysdict[x]=worlddict[x]
1362
						sysdict[x]=worlddict[x]
1350
				elif portage.db[portage.root]["vartree"].dbapi.match(x):
1363
				elif portage.db[ROOT()]["vartree"].dbapi.match(x):
1351
					#package is installed
1364
					#package is installed
1352
					sysdict[x]=worlddict[x]
1365
					sysdict[x]=worlddict[x]
1353
				else:
1366
				else:
Lines 1361-1367 Link Here
1361
				continue
1374
				continue
1362
1375
1363
			if "--upgradeonly" in myopts:
1376
			if "--upgradeonly" in myopts:
1364
				cand=self.is_newer_ver_installed(portage.root,mydep,myeb)
1377
				cand=self.is_newer_ver_installed(ROOT,mydep,myeb)
1365
				if cand:
1378
				if cand:
1366
					myeb=cand
1379
					myeb=cand
1367
1380
Lines 1369-1388 Link Here
1369
			#if mydep2[0]=="!":, etc.
1382
			#if mydep2[0]=="!":, etc.
1370
			binpkguseflags = None
1383
			binpkguseflags = None
1371
			if "--usepkg" in myopts:
1384
			if "--usepkg" in myopts:
1372
				mypk=portage.db[portage.root]["bintree"].dep_bestmatch(mydep)
1385
				mypk=portage.db[ROOT()]["bintree"].dep_bestmatch(mydep)
1373
				if myeb==mypk:
1386
				if myeb==mypk:
1374
					myk=["binary",portage.root,mypk]
1387
					myk=["binary",ROOT,mypk]
1375
					binpkguseflags=portage.db[portage.root]["bintree"].get_use(mypk)
1388
					binpkguseflags=portage.db[ROOT()]["bintree"].get_use(mypk)
1376
				elif "--usepkgonly" in myopts:
1389
				elif "--usepkgonly" in myopts:
1377
					if not mypk:
1390
					if not mypk:
1378
						self.missingbins += [myeb]
1391
						self.missingbins += [myeb]
1379
						myk=["binary",portage.root,myeb]
1392
						myk=["binary",ROOT,myeb]
1380
					else:
1393
					else:
1381
						myk=["binary",portage.root,mypk]
1394
						myk=["binary",ROOT,mypk]
1382
				else:
1395
				else:
1383
					myk=["ebuild",portage.root,myeb]
1396
					myk=["ebuild",ROOT,myeb]
1384
			else:
1397
			else:
1385
				myk=["ebuild",portage.root,myeb]
1398
				myk=["ebuild",ROOT,myeb]
1386
1399
1387
			if not self.create(myk,myuse=binpkguseflags):
1400
			if not self.create(myk,myuse=binpkguseflags):
1388
				print
1401
				print
Lines 1392-1404 Link Here
1392
				return 0
1405
				return 0
1393
		return 1
1406
		return 1
1394
1407
1395
	def match(self,mydep,myroot=portage.root,mykey=None):
1408
	def match(self,mydep,myroot=ROOT,mykey=None):
1396
		# support mutual exclusive deps
1409
		# support mutual exclusive deps
1397
		if mydep[0]=="!":
1410
		if mydep[0]=="!":
1398
			#add our blocker; it will be ignored later if necessary (if we are remerging the same pkg, for example)
1411
			#add our blocker; it will be ignored later if necessary (if we are remerging the same pkg, for example)
1399
			myk="blocks "+myroot+" "+mydep[1:]
1412
			myk="blocks "+myroot+" "+mydep[1:]
1400
		else:
1413
		else:
1401
			myeb=portage.db[portage.root]["porttree"].dep_bestmatch(mydep)
1414
			myeb=portage.db[ROOT()]["porttree"].dep_bestmatch(mydep)
1402
			if not myeb:
1415
			if not myeb:
1403
				if not mykey:
1416
				if not mykey:
1404
					print "\n!!! Error: couldn't find match for",mydep
1417
					print "\n!!! Error: couldn't find match for",mydep
Lines 1408-1420 Link Here
1408
				sys.exit(1)
1421
				sys.exit(1)
1409
1422
1410
			if "--usepkg" in myopts:
1423
			if "--usepkg" in myopts:
1411
				mypk=portage.db[portage.root]["bintree"].dep_bestmatch(mydep)
1424
				mypk=portage.db[ROOT()]["bintree"].dep_bestmatch(mydep)
1412
				if myeb==mypk:
1425
				if myeb==mypk:
1413
					myk="binary "+portage.root+" "+mypk
1426
					myk="binary "+ROOT()+" "+mypk
1414
				else:
1427
				else:
1415
					myk="ebuild "+myroot+" "+myeb
1428
					myk="ebuild "+myroot()+" "+myeb
1416
			else:
1429
			else:
1417
				myk="ebuild "+myroot+" "+myeb
1430
				myk="ebuild "+myroot()+" "+myeb
1418
1431
1419
		return myk
1432
		return myk
1420
1433
Lines 1470-1480 Link Here
1470
					addl="  "+yellow("R")+fetch+"  "
1483
					addl="  "+yellow("R")+fetch+"  "
1471
				elif (not "--emptytree" in myopts) and portage.db[x[1]]["vartree"].exists_specific_cat(x[2]):
1484
				elif (not "--emptytree" in myopts) and portage.db[x[1]]["vartree"].exists_specific_cat(x[2]):
1472
					if x[0] == "binary":
1485
					if x[0] == "binary":
1473
						mynewslot=portage.db["/"]["bintree"].getslot(x[2])
1486
						mynewslot=portage.db[MYROOT()]["bintree"].getslot(x[2])
1474
					elif x[0] == "ebuild":
1487
					elif x[0] == "ebuild":
1475
						mynewslot=portage.db["/"]["porttree"].getslot(x[2])
1488
						mynewslot=portage.db[MYROOT()]["porttree"].getslot(x[2])
1476
					myoldlist=portage.db[x[1]]["vartree"].dbapi.match(portage_versions.pkgsplit(x[2])[0])
1489
					myoldlist=portage.db[x[1]]["vartree"].dbapi.match(portage_versions.pkgsplit(x[2])[0])
1477
					myinslotlist=filter((lambda p: portage.db[portage.root]["vartree"].getslot(p)==mynewslot),myoldlist)
1490
					myinslotlist=filter((lambda p: portage.db[ROOT()]["vartree"].getslot(p)==mynewslot),myoldlist)
1478
					if myinslotlist:
1491
					if myinslotlist:
1479
						myoldbest=portage.best(myinslotlist)
1492
						myoldbest=portage.best(myinslotlist)
1480
						addl="   "+fetch
1493
						addl="   "+fetch
Lines 1491-1497 Link Here
1491
					if "--changelog" in myopts:
1504
					if "--changelog" in myopts:
1492
						changelogs.extend(self.calc_changelog(
1505
						changelogs.extend(self.calc_changelog(
1493
							portage.portdb.findname(x[2]),
1506
							portage.portdb.findname(x[2]),
1494
							portage.db["/"]["vartree"].dep_bestmatch('/'.join(portage_versions.catpkgsplit(x[2])[:2])),
1507
							portage.db[MYROOT()]["vartree"].dep_bestmatch('/'.join(portage_versions.catpkgsplit(x[2])[:2])),
1495
							x[2]
1508
							x[2]
1496
							))
1509
							))
1497
				else:
1510
				else:
Lines 1502-1508 Link Here
1502
					# iuse verbose
1515
					# iuse verbose
1503
					try:
1516
					try:
1504
						if x[0] == "binary":
1517
						if x[0] == "binary":
1505
							iuse_split = portage.db["/"]["bintree"].dbapi.aux_get(x[2],["IUSE"])[0].split()
1518
							iuse_split = portage.db[MYROOT()]["bintree"].dbapi.aux_get(x[2],["IUSE"])[0].split()
1506
						elif x[0] == "ebuild":
1519
						elif x[0] == "ebuild":
1507
							iuse_split = portage.portdb.aux_get(x[2],["IUSE"])[0].split()
1520
							iuse_split = portage.portdb.aux_get(x[2],["IUSE"])[0].split()
1508
						else:
1521
						else:
Lines 1519-1527 Link Here
1519
						pkg=myoldbest
1532
						pkg=myoldbest
1520
					else:
1533
					else:
1521
						pkg=x[2]
1534
						pkg=x[2]
1522
					if portage.db["/"]["vartree"].dbapi.cpv_exists(pkg):
1535
					if portage.db[MYROOT()]["vartree"].dbapi.cpv_exists(pkg):
1523
						try:
1536
						try:
1524
							old_use=portage.db["/"]["vartree"].dbapi.aux_get(pkg, ["USE"])[0].split()
1537
							old_use=portage.db[MYROOT()]["vartree"].dbapi.aux_get(pkg, ["USE"])[0].split()
1525
						except SystemExit, e:
1538
						except SystemExit, e:
1526
							raise # Needed else can't exit
1539
							raise # Needed else can't exit
1527
						except:
1540
						except:
Lines 1779-1785 Link Here
1779
				del portage.mtimedb["resume"]["mergelist"][0]
1792
				del portage.mtimedb["resume"]["mergelist"][0]
1780
				del mymergelist[0]
1793
				del mymergelist[0]
1781
		else:
1794
		else:
1782
			myfavs=portage.grabfile(portage.root+portage.WORLD_FILE)
1795
			myfavs=portage.grabfile(ROOT(WORLD_FILE))
1783
			myfavdict=genericdict(myfavs)
1796
			myfavdict=genericdict(myfavs)
1784
			for x in range(len(mylist)):
1797
			for x in range(len(mylist)):
1785
				if mylist[x][3]!="nomerge":
1798
				if mylist[x][3]!="nomerge":
Lines 1797-1803 Link Here
1797
							myfavdict[myfavkey]=myfavkey
1810
							myfavdict[myfavkey]=myfavkey
1798
							print ">>> Recording",myfavkey,"in \"world\" favorites file..."
1811
							print ">>> Recording",myfavkey,"in \"world\" favorites file..."
1799
			if not "--fetchonly" in myopts:
1812
			if not "--fetchonly" in myopts:
1800
				portage.writedict(myfavdict,portage.root+portage.WORLD_FILE,writekey=0)
1813
				portage.writedict(myfavdict,ROOT(WORLD_FILE),writekey=0)
1801
1814
1802
			portage.mtimedb["resume"]["mergelist"]=mymergelist[:]
1815
			portage.mtimedb["resume"]["mergelist"]=mymergelist[:]
1803
1816
Lines 1849-1855 Link Here
1849
			y=portage.portdb.findname(x[pkgindex])
1862
			y=portage.portdb.findname(x[pkgindex])
1850
			if not "--pretend" in myopts:
1863
			if not "--pretend" in myopts:
1851
				print ">>> emerge ("+str(mergecount)+" of "+str(len(mymergelist))+")",x[pkgindex],"to",x[1]
1864
				print ">>> emerge ("+str(mergecount)+" of "+str(len(mymergelist))+")",x[pkgindex],"to",x[1]
1852
				emergelog(" >>> emerge ("+str(mergecount)+" of "+str(len(mymergelist))+") "+x[pkgindex]+" to "+x[1])
1865
				emergelog(" >>> emerge ("+str(mergecount)+" of "+str(len(mymergelist))+") "+x[pkgindex]+" to "+x[1]())
1853
1866
1854
			self.pkgsettings["EMERGE_FROM"] = x[0][:]
1867
			self.pkgsettings["EMERGE_FROM"] = x[0][:]
1855
			self.pkgsettings.backup_changes("EMERGE_FROM")
1868
			self.pkgsettings.backup_changes("EMERGE_FROM")
Lines 1891-1898 Link Here
1891
						sys.exit(1)
1904
						sys.exit(1)
1892
					#dynamically update our database
1905
					#dynamically update our database
1893
					if "--buildpkgonly" not in myopts:
1906
					if "--buildpkgonly" not in myopts:
1894
						portage.db[portage.root]["bintree"].inject(x[2])
1907
						portage.db[ROOT()]["bintree"].inject(x[2])
1895
						mytbz2=portage.db[portage.root]["bintree"].getname(x[2])
1908
						mytbz2=portage.db[ROOT()]["bintree"].getname(x[2])
1896
						short_msg = "emerge: ("+str(mergecount)+" of "+str(len(mymergelist))+") "+x[pkgindex]+" Merge"
1909
						short_msg = "emerge: ("+str(mergecount)+" of "+str(len(mymergelist))+") "+x[pkgindex]+" Merge"
1897
						emergelog(" === ("+str(mergecount)+" of "+str(len(mymergelist))+") Merging ("+x[pkgindex]+"::"+y+")", short_msg=short_msg)
1910
						emergelog(" === ("+str(mergecount)+" of "+str(len(mymergelist))+") Merging ("+x[pkgindex]+"::"+y+")", short_msg=short_msg)
1898
1911
Lines 1916-1926 Link Here
1916
					#dynamically update our database	
1929
					#dynamically update our database	
1917
			elif x[0]=="binary":
1930
			elif x[0]=="binary":
1918
				#merge the tbz2
1931
				#merge the tbz2
1919
				mytbz2=portage.db[portage.root]["bintree"].getname(x[2])
1932
				mytbz2=portage.db[ROOT()]["bintree"].getname(x[2])
1920
				if portage.db[portage.root]["bintree"].isremote(x[2]):
1933
				if portage.db[ROOT()]["bintree"].isremote(x[2]):
1921
					short_msg = "emerge: ("+str(mergecount)+" of "+str(len(mymergelist))+") "+x[pkgindex]+" Fetch"
1934
					short_msg = "emerge: ("+str(mergecount)+" of "+str(len(mymergelist))+") "+x[pkgindex]+" Fetch"
1922
					emergelog(" --- ("+str(mergecount)+" of "+str(len(mymergelist))+") Fetching Binary ("+x[pkgindex]+"::"+mytbz2+")", short_msg=short_msg)
1935
					emergelog(" --- ("+str(mergecount)+" of "+str(len(mymergelist))+") Fetching Binary ("+x[pkgindex]+"::"+mytbz2+")", short_msg=short_msg)
1923
					portage.db[portage.root]["bintree"].gettbz2(x[2])
1936
					portage.db[ROOT()]["bintree"].gettbz2(x[2])
1924
1937
1925
				if ("--fetchonly" in myopts) or ("--fetch-all-uri" in myopts):
1938
				if ("--fetchonly" in myopts) or ("--fetch-all-uri" in myopts):
1926
					continue
1939
					continue
Lines 1932-1951 Link Here
1932
					sys.exit(1)
1945
					sys.exit(1)
1933
				#need to check for errors
1946
				#need to check for errors
1934
			if "--buildpkgonly" not in myopts:
1947
			if "--buildpkgonly" not in myopts:
1935
				portage.db[x[1]]["vartree"].inject(x[2])
1948
				portage.db[x[1]()]["vartree"].inject(x[2])
1936
				myfavkey=portage.cpv_getkey(x[2])
1949
				myfavkey=portage.cpv_getkey(x[2])
1937
				if (not "--fetchonly" in myopts) and (not "--fetch-all-uri" in myopts) and (myfavkey in favorites):
1950
				if (not "--fetchonly" in myopts) and (not "--fetch-all-uri" in myopts) and (myfavkey in favorites):
1938
					myfavs=portage.grabfile(myroot+portage.WORLD_FILE)
1951
					myfavs=portage.grabfile(myroot(WORLD_FILE))
1939
					myfavdict=genericdict(myfavs)
1952
					myfavdict=genericdict(myfavs)
1940
					mysysdict=genericdict(syslist)
1953
					mysysdict=genericdict(syslist)
1941
					#don't record if already in system profile or already recorded
1954
					#don't record if already in system profile or already recorded
1942
					if ("--update" not in myopts or not portage.db[portage.root]["vartree"].dbapi.match(myfavkey)) and \
1955
					if ("--update" not in myopts or not portage.db[ROOT()]["vartree"].dbapi.match(myfavkey)) and \
1943
					    (not mysysdict.has_key(myfavkey)) and (not myfavdict.has_key(myfavkey)):
1956
					    (not mysysdict.has_key(myfavkey)) and (not myfavdict.has_key(myfavkey)):
1944
						#we don't have a favorites entry for this package yet; add one
1957
						#we don't have a favorites entry for this package yet; add one
1945
						myfavdict[myfavkey]=myfavkey
1958
						myfavdict[myfavkey]=myfavkey
1946
						print ">>> Recording",myfavkey,"in \"world\" favorites file..."
1959
						print ">>> Recording",myfavkey,"in \"world\" favorites file..."
1947
						emergelog(" === ("+str(mergecount)+" of "+str(len(mymergelist))+") Updating world file ("+x[pkgindex]+")")
1960
						emergelog(" === ("+str(mergecount)+" of "+str(len(mymergelist))+") Updating world file ("+x[pkgindex]+")")
1948
						portage.writedict(myfavdict,myroot+portage.WORLD_FILE,writekey=0)
1961
						portage.writedict(myfavdict,myroot(WORLD_FILE),writekey=0)
1949
1962
1950
				if ("noclean" not in portage.features) and (x[0] != "binary"):
1963
				if ("noclean" not in portage.features) and (x[0] != "binary"):
1951
					short_msg = "emerge: ("+str(mergecount)+" of "+str(len(mymergelist))+") "+x[pkgindex]+" Clean Post"
1964
					short_msg = "emerge: ("+str(mergecount)+" of "+str(len(mymergelist))+") "+x[pkgindex]+" Clean Post"
Lines 2000-2009 Link Here
2000
										mynewargv += [myarg]
2013
										mynewargv += [myarg]
2001
									else:
2014
									else:
2002
										mynewargv += [arg]
2015
										mynewargv += [arg]
2003
								os.execv("/usr/lib/portage/bin/emerge", mynewargv)
2016
								os.execv("@PORTAGE_BASE@/bin/emerge", mynewargv)
2004
2017
2005
			if ("--pretend" not in myopts) and ("--fetchonly" not in myopts) and ("--fetch-all-uri" not in myopts):
2018
			if ("--pretend" not in myopts) and ("--fetchonly" not in myopts) and ("--fetch-all-uri" not in myopts):
2006
				emergelog(" ::: completed emerge ("+str(mergecount)+" of "+str(len(mymergelist))+") "+x[2]+" to "+x[1])
2019
				emergelog(" ::: completed emerge ("+str(mergecount)+" of "+str(len(mymergelist))+") "+x[2]+" to "+x[1]())
2007
			
2020
			
2008
			# Unsafe for parallel merges
2021
			# Unsafe for parallel merges
2009
			del portage.mtimedb["resume"]["mergelist"][0]
2022
			del portage.mtimedb["resume"]["mergelist"][0]
Lines 2022-2028 Link Here
2022
			if ("--fetchonly" not in myopts) and ("--fetch-all-uri" not in myopts):
2035
			if ("--fetchonly" not in myopts) and ("--fetch-all-uri" not in myopts):
2023
				if (mergecount>0):
2036
				if (mergecount>0):
2024
					if retval:
2037
					if retval:
2025
						portage.env_update(portage.root)
2038
						portage.env_update(ROOT)
2026
2039
2027
		#by doing an exit this way, --fetchonly can continue to try to
2040
		#by doing an exit this way, --fetchonly can continue to try to
2028
		#fetch everything even if a particular download fails.
2041
		#fetch everything even if a particular download fails.
Lines 2067-2075 Link Here
2067
			return None
2080
			return None
2068
		
2081
		
2069
		if dep_type == "binary":
2082
		if dep_type == "binary":
2070
			mynewslot=portage.db["/"]["bintree"].getslot(dep_pkg)
2083
			mynewslot=portage.db[MYROOT()]["bintree"].getslot(dep_pkg)
2071
		else:
2084
		else:
2072
			mynewslot=portage.db["/"]["porttree"].getslot(dep_pkg)
2085
			mynewslot=portage.db[MYROOT()]["porttree"].getslot(dep_pkg)
2073
		
2086
		
2074
		mycurpkgs = portage.db[dep_root]["vartree"].dbapi.match(portage.portage_versions.pkgsplit(dep_pkg)[0])
2087
		mycurpkgs = portage.db[dep_root]["vartree"].dbapi.match(portage.portage_versions.pkgsplit(dep_pkg)[0])
2075
		for x in range(len(mycurpkgs)-1, -1, -1):
2088
		for x in range(len(mycurpkgs)-1, -1, -1):
Lines 2109-2117 Link Here
2109
		
2122
		
2110
		else:
2123
		else:
2111
			if dep_type != "binary":
2124
			if dep_type != "binary":
2112
				restrictions = portage.db["/"]["porttree"].dbapi.aux_get(dep_pkg, ["RESTRICT"])[0].split()
2125
				restrictions = portage.db[MYROOT()]["porttree"].dbapi.aux_get(dep_pkg, ["RESTRICT"])[0].split()
2113
				if "fetch" in restrictions:
2126
				if "fetch" in restrictions:
2114
					if portage.db["/"]["porttree"].dbapi.fetch_check(dep_pkg, portage.settings):
2127
					if portage.db[MYROOT()]["porttree"].dbapi.fetch_check(dep_pkg, portage.settings):
2115
						problem_status = green("f")
2128
						problem_status = green("f")
2116
					else:
2129
					else:
2117
						problem_status = red("F")
2130
						problem_status = red("F")
Lines 2138-2143 Link Here
2138
		summary += slot_status
2151
		summary += slot_status
2139
		summary += update_status
2152
		summary += update_status
2140
		summary += downgrade_status+"]"
2153
		summary += downgrade_status+"]"
2154
		summary += "["+dep_root+"]"
2141
		
2155
		
2142
		return summary
2156
		return summary
2143
	
2157
	
Lines 2208-2216 Link Here
2208
			return ""
2222
			return ""
2209
		
2223
		
2210
		if dep_type == "binary":
2224
		if dep_type == "binary":
2211
			iuse = portage.db["/"]["bintree"].dbapi.aux_get(dep_pkg,["IUSE"])[0].split()
2225
			iuse = portage.db[MYROOT()]["bintree"].dbapi.aux_get(dep_pkg,["IUSE"])[0].split()
2212
		elif dep_type == "ebuild":
2226
		elif dep_type == "ebuild":
2213
			iuse = portage.db["/"]["porttree"].dbapi.aux_get(dep_pkg,["IUSE"])[0].split()
2227
			iuse = portage.db[MYROOT()]["porttree"].dbapi.aux_get(dep_pkg,["IUSE"])[0].split()
2214
		else:
2228
		else:
2215
			iuse = []
2229
			iuse = []
2216
		iuse.sort()
2230
		iuse.sort()
Lines 2282-2288 Link Here
2282
	def format_overlay(self, mydep):
2296
	def format_overlay(self, mydep):
2283
		if mydep[0] != "ebuild" or mydep[3] == "nomerge":
2297
		if mydep[0] != "ebuild" or mydep[3] == "nomerge":
2284
			return ""
2298
			return ""
2285
		filename = portage.db["/"]["porttree"].dbapi.findname(mydep[2])
2299
		filename = portage.db[MYROOT()]["porttree"].dbapi.findname(mydep[2])
2286
		dirname = os.path.abspath(os.path.dirname(filename)+"/../..")
2300
		dirname = os.path.abspath(os.path.dirname(filename)+"/../..")
2287
		if dirname in portage.settings['PORTDIR_OVERLAY'].split():
2301
		if dirname in portage.settings['PORTDIR_OVERLAY'].split():
2288
			if dirname not in self.overlays:
2302
			if dirname not in self.overlays:
Lines 2344-2350 Link Here
2344
2358
2345
	def format_changelog(self, mydep):
2359
	def format_changelog(self, mydep):
2346
		thispkg = mydep[2]
2360
		thispkg = mydep[2]
2347
		ebuild_path = portage.db["/"]["porttree"].dbapi.findname(thispkg)
2361
		ebuild_path = portage.db[MYROOT()]["porttree"].dbapi.findname(thispkg)
2348
		if ebuild_path:
2362
		if ebuild_path:
2349
			prevpkg = self.old_version(mydep)
2363
			prevpkg = self.old_version(mydep)
2350
			if prevpkg:
2364
			if prevpkg:
Lines 2530-2536 Link Here
2530
		else:
2544
		else:
2531
			global_unmerge=1
2545
			global_unmerge=1
2532
	
2546
	
2533
	localtree=portage.db[portage.root]["vartree"]
2547
	localtree=portage.db[ROOT()]["vartree"]
2534
	# process all arguments and add all valid db entries to candidate_catpkgs
2548
	# process all arguments and add all valid db entries to candidate_catpkgs
2535
	if global_unmerge:
2549
	if global_unmerge:
2536
		if not unmerge_files or "world" in unmerge_files:
2550
		if not unmerge_files or "world" in unmerge_files:
Lines 2565-2571 Link Here
2565
2579
2566
				sp_absx_len = len(sp_absx)
2580
				sp_absx_len = len(sp_absx)
2567
2581
2568
				vdb_path = portage.root+portage.VDB_PATH
2582
				vdb_path = ROOT(VDB_PATH)
2569
				vdb_len  = len(vdb_path)
2583
				vdb_len  = len(vdb_path)
2570
				
2584
				
2571
				sp_vdb     = vdb_path.split("/")
2585
				sp_vdb     = vdb_path.split("/")
Lines 2579-2592 Link Here
2579
					# The Path is shorter... so it can't be inside the vdb.
2593
					# The Path is shorter... so it can't be inside the vdb.
2580
					print spabsx
2594
					print spabsx
2581
					print absx
2595
					print absx
2582
					print "\n!!!",x,"cannot be inside "+(portage.root+portage.VDB_PATH)+"; aborting.\n"
2596
					print "\n!!!",x,"cannot be inside "+ROOT(VDB_PATH)+"; aborting.\n"
2583
					return 0
2597
					return 0
2584
2598
2585
				for idx in range(0,sp_vdb_len):
2599
				for idx in range(0,sp_vdb_len):
2586
					if (idx >= sp_absx_len) or (sp_vdb[idx] != sp_absx[idx]):
2600
					if (idx >= sp_absx_len) or (sp_vdb[idx] != sp_absx[idx]):
2587
						print sp_absx
2601
						print sp_absx
2588
						print absx
2602
						print absx
2589
						print "\n!!!",x,"is not inside "+(portage.root+portage.VDB_PATH)+"; aborting.\n"
2603
						print "\n!!!",x,"is not inside "+ROOT(VDB_PATH)+"; aborting.\n"
2590
						return 0
2604
						return 0
2591
				
2605
				
2592
				print "="+"/".join(sp_absx[sp_vdb_len:])
2606
				print "="+"/".join(sp_absx[sp_vdb_len:])
Lines 2617-2623 Link Here
2617
		if not mymatch:
2631
		if not mymatch:
2618
			print "\n--- Couldn't find " + white(x) + " to "+unmerge_action+"."
2632
			print "\n--- Couldn't find " + white(x) + " to "+unmerge_action+"."
2619
			continue
2633
			continue
2620
		mykey=portage.key_expand(portage.portage_dep.dep_getkey(mymatch[0]),portage.db["/"]["vartree"].dbapi)
2634
		mykey=portage.key_expand(portage.portage_dep.dep_getkey(mymatch[0]),portage.db[MYROOT()]["vartree"].dbapi)
2621
		if not pkgmap.has_key(mykey):
2635
		if not pkgmap.has_key(mykey):
2622
			pkgmap[mykey]={"protected":[], "selected":[], "omitted":[] }
2636
			pkgmap[mykey]={"protected":[], "selected":[], "omitted":[] }
2623
		if unmerge_action=="unmerge":
2637
		if unmerge_action=="unmerge":
Lines 2720-2732 Link Here
2720
			emergelog("=== Unmerging... ("+y+")")
2734
			emergelog("=== Unmerging... ("+y+")")
2721
			mysplit=y.split("/")
2735
			mysplit=y.split("/")
2722
			#unmerge...
2736
			#unmerge...
2723
			retval=portage.unmerge(mysplit[0],mysplit[1],portage.root,mysettings,unmerge_action not in ["clean","prune"])
2737
			retval=portage.unmerge(mysplit[0],mysplit[1],ROOT,mysettings,unmerge_action not in ["clean","prune"])
2724
			if retval:
2738
			if retval:
2725
				emergelog(" !!! unmerge FAILURE: "+y)
2739
				emergelog(" !!! unmerge FAILURE: "+y)
2726
			else:
2740
			else:
2727
				emergelog(" >>> unmerge success: "+y)
2741
				emergelog(" >>> unmerge success: "+y)
2728
	#run ldconfig, etc...
2742
	#run ldconfig, etc...
2729
	portage.env_update(portage.root)
2743
	portage.env_update(ROOT)
2730
	if not numselected:
2744
	if not numselected:
2731
		return 0
2745
		return 0
2732
	else:
2746
	else:
Lines 2734-2751 Link Here
2734
2748
2735
2749
2736
def chk_updated_info_files():
2750
def chk_updated_info_files():
2737
	root=portage.root
2751
	root=ROOT
2738
2752
2739
	infodirs =portage.settings["INFOPATH"].split(":")
2753
	infodirs =portage.settings["INFOPATH"].split(":")
2740
	infodirs+=portage.settings["INFODIR"].split(":")
2754
	infodirs+=portage.settings["INFODIR"].split(":")
2741
2755
2742
	print
2756
	print
2743
	if os.path.exists("/usr/bin/install-info"):
2757
	if os.path.exists("@INSTALL_INFO@"):
2744
		regen_infodirs=[]
2758
		regen_infodirs=[]
2745
		for z in infodirs:
2759
		for z in infodirs:
2746
			if z=='':
2760
			if z=='':
2747
				continue
2761
				continue
2748
			inforoot=normpath(root+z)
2762
			inforoot=normpath(root(z))
2749
			if os.path.isdir(inforoot):
2763
			if os.path.isdir(inforoot):
2750
				try:
2764
				try:
2751
					infomtime=os.stat(inforoot)[ST_MTIME]
2765
					infomtime=os.stat(inforoot)[ST_MTIME]
Lines 2788-2795 Link Here
2788
				for x in os.listdir(inforoot):
2802
				for x in os.listdir(inforoot):
2789
					if (x[0] == ".") or (x in ["dir","dir.old"]) or (os.path.isdir(inforoot+"/"+x)):
2803
					if (x[0] == ".") or (x in ["dir","dir.old"]) or (os.path.isdir(inforoot+"/"+x)):
2790
						continue
2804
						continue
2791
#					myso=commands.getstatusoutput("LANG=C LANGUAGE=C /usr/bin/install-info --dir-file="+inforoot+"/dir "+inforoot+"/"+x)[1]
2805
#					myso=commands.getstatusoutput("LANG=C LANGUAGE=C @INSTALL_INFO@ --dir-file="+inforoot+"/dir "+inforoot+"/"+x)[1]
2792
					mycmd = "LANG=C LANGUAGE=C /usr/bin/install-info --dir-file="+inforoot+"/dir "+inforoot+"/"+x
2806
					mycmd = "LANG=C LANGUAGE=C @INSTALL_INFO@ --dir-file="+inforoot+"/dir "+inforoot+"/"+x
2793
					myso=portage_exec.spawn_get_output(mycmd,spawn_type=portage_exec.spawn_bash)[1]
2807
					myso=portage_exec.spawn_get_output(mycmd,spawn_type=portage_exec.spawn_bash)[1]
2794
					existsstr="already exists, for file `"
2808
					existsstr="already exists, for file `"
2795
					if myso!="":
2809
					if myso!="":
Lines 3095-3101 Link Here
3095
			print "\n>>> Updating Portage cache:      ",
3109
			print "\n>>> Updating Portage cache:      ",
3096
		os.umask(0002)
3110
		os.umask(0002)
3097
		cachedir = os.path.normpath(portage.settings.depcachedir)
3111
		cachedir = os.path.normpath(portage.settings.depcachedir)
3098
		if cachedir in ["/",    "/bin", "/dev",  "/etc",  "/home",
3112
		if cachedir in [MYROOT(""),    MYROOT("bin"),
3113
						MYROOT("etc"), MYROOT("lib"),
3114
						MYROOT("opt"), MYROOT("sbin"),
3115
						MYROOT("tmp"), MYROOT("var"),
3116
						ROOT(""),    ROOT("bin"),
3117
						ROOT("etc"), ROOT("lib"),
3118
						ROOT("opt"), ROOT("sbin"),
3119
						ROOT("tmp"), ROOT("var"),
3120
						MYROOT.prefix(), ROOT.prefix(),
3121
						"/",    "/bin", "/dev",  "/etc",  "/home",
3099
		                "/lib", "/opt", "/proc", "/root", "/sbin",
3122
		                "/lib", "/opt", "/proc", "/root", "/sbin",
3100
		                "/sys", "/tmp", "/usr",  "/var"]:
3123
		                "/sys", "/tmp", "/usr",  "/var"]:
3101
			print "!!! PORTAGE_CACHEDIR IS SET TO A PRIMARY ROOT DIRECTORY ON YOUR SYSTEM."
3124
			print "!!! PORTAGE_CACHEDIR IS SET TO A PRIMARY ROOT DIRECTORY ON YOUR SYSTEM."
Lines 3171-3177 Link Here
3171
	portage.portageexit()
3194
	portage.portageexit()
3172
	reload(portage)
3195
	reload(portage)
3173
	mybestpv=portage.portdb.xmatch("bestmatch-visible","sys-apps/portage")
3196
	mybestpv=portage.portdb.xmatch("bestmatch-visible","sys-apps/portage")
3174
	mypvs=portage.best(portage.db[portage.root]["vartree"].dbapi.match("sys-apps/portage"))
3197
	mypvs=portage.best(portage.db[ROOT()]["vartree"].dbapi.match("sys-apps/portage"))
3175
3198
3176
	chk_updated_cfg_files()
3199
	chk_updated_cfg_files()
3177
3200
Lines 3199-3210 Link Here
3199
	print getportageversion()
3222
	print getportageversion()
3200
	print "================================================================="
3223
	print "================================================================="
3201
	print "System uname: "+unameout
3224
	print "System uname: "+unameout
3202
	if os.path.exists("/etc/gentoo-release"):
3225
	if os.path.exists(MYROOT("etc/gentoo-release")):
3203
		portage_exec.spawn("cat /etc/gentoo-release")
3226
		portage_exec.spawn("cat "+MYROOT("etc/gentoo-release"))
3204
	else:
3227
	else:
3205
		print "Unknown Host Operating System"
3228
		print "Unknown Host Operating System"
3206
	
3229
	
3207
	py_vers = string.join(portage.db["/"]["vartree"].dbapi.match("dev-lang/python"), ",")
3230
	py_vers = string.join(portage.db[MYROOT()]["vartree"].dbapi.match("dev-lang/python"), ",")
3208
	py_this = string.strip(string.split(sys.version,"\n")[0])
3231
	py_this = string.strip(string.split(sys.version,"\n")[0])
3209
	print "%-20s %s [%s]" % ("Python:",py_vers,py_this)
3232
	print "%-20s %s [%s]" % ("Python:",py_vers,py_this)
3210
3233
Lines 3232-3238 Link Here
3232
	
3255
	
3233
	for x in myvars:
3256
	for x in myvars:
3234
		if portage.portage_dep.isvalidatom(x):
3257
		if portage.portage_dep.isvalidatom(x):
3235
			pkg_matches = portage.db["/"]["vartree"].dbapi.match(x)
3258
			pkg_matches = portage.db[MYROOT()]["vartree"].dbapi.match(x)
3236
			pkgs = ""
3259
			pkgs = ""
3237
			for y in pkg_matches:
3260
			for y in pkg_matches:
3238
				mycpv   = portage.catpkgsplit(y)
3261
				mycpv   = portage.catpkgsplit(y)
Lines 3247-3253 Link Here
3247
		else:
3270
		else:
3248
			print "%-20s %s" % (x+":", "[NOT VALID]")
3271
			print "%-20s %s" % (x+":", "[NOT VALID]")
3249
3272
3250
	libtool_vers = string.join(portage.db["/"]["vartree"].dbapi.match("sys-devel/libtool"), ",")
3273
	libtool_vers = string.join(portage.db[MYROOT()]["vartree"].dbapi.match("sys-devel/libtool"), ",")
3251
	
3274
	
3252
	if "--verbose" in myopts:
3275
	if "--verbose" in myopts:
3253
		myvars=portage.settings.keys()
3276
		myvars=portage.settings.keys()
Lines 3271-3283 Link Here
3271
		print "Unset:  "+", ".join(unset_vars)
3294
		print "Unset:  "+", ".join(unset_vars)
3272
	print
3295
	print
3273
3296
3274
	config_files = [portage.MAKE_CONF_FILE,
3297
	config_files = [MYROOT(portage.MAKE_CONF_FILE),
3275
	                portage.MODULES_FILE_PATH,
3298
	                MYROOT(portage.MODULES_FILE_PATH),
3276
	                portage.USER_VIRTUALS_FILE,
3299
	                MYROOT(portage.USER_VIRTUALS_FILE),
3277
	                portage.EBUILD_SH_ENV_FILE,
3300
	                MYROOT(portage.EBUILD_SH_ENV_FILE),
3278
	                portage.CUSTOM_MIRRORS_FILE]
3301
	                MYROOT(portage.CUSTOM_MIRRORS_FILE)]
3279
	config_files += [portage.USER_CONFIG_PATH+"/package."+x for x in ["mask","unmask","keywords","env"]]
3302
	config_files += [MYROOT(portage.USER_CONFIG_PATH+"/package."+x) for x in ["mask","unmask","keywords","env"]]
3280
	config_files += [portage.CUSTOM_PROFILE_PATH+"/"+x for x in ["make.defaults","packages","use.mask","virtuals","profile.bashrc","use.defaults"]]
3303
	config_files += [MYROOT(portage.CUSTOM_PROFILE_PATH+"/"+x) for x in ["make.defaults","packages","use.mask","virtuals","profile.bashrc","use.defaults"]]
3281
	print "Config files: "+(", ".join([x for x in config_files if os.path.exists(x)]))
3304
	print "Config files: "+(", ".join([x for x in config_files if os.path.exists(x)]))
3282
3305
3283
	if "--debug" in myopts:
3306
	if "--debug" in myopts:
Lines 3316-3322 Link Here
3316
		if (not mycps) or (mycps[0]=="null"):
3339
		if (not mycps) or (mycps[0]=="null"):
3317
			print "!!!",x,"is not a specific cat/pkg-version, skipping..."
3340
			print "!!!",x,"is not a specific cat/pkg-version, skipping..."
3318
			continue
3341
			continue
3319
		if portage.db["/"]["vartree"].exists_specific(x):
3342
		if portage.db[MYROOT()]["vartree"].exists_specific(x):
3320
			print "!!! Not injecting",x+"; Package already exists."
3343
			print "!!! Not injecting",x+"; Package already exists."
3321
		else:
3344
		else:
3322
			if "--ask" in myopts:
3345
			if "--ask" in myopts:
Lines 3325-3331 Link Here
3325
					print "Quitting."
3348
					print "Quitting."
3326
					print
3349
					print
3327
					sys.exit(0)
3350
					sys.exit(0)
3328
			portage.db["/"]["vartree"].dbapi.cpv_inject(x)
3351
			portage.db[MYROOT()]["vartree"].dbapi.cpv_inject(x)
3329
			print ">>> Injected",x+"."
3352
			print ">>> Injected",x+"."
3330
			emergelog(" === inject: "+x)
3353
			emergelog(" === inject: "+x)
3331
elif "unmerge"==myaction or "prune"==myaction or "clean"==myaction:
3354
elif "unmerge"==myaction or "prune"==myaction or "clean"==myaction:
Lines 3377-3390 Link Here
3377
		sys.exit(1)
3400
		sys.exit(1)
3378
3401
3379
	alldeps=mydepgraph.mynewgraph.get_all_nodes()
3402
	alldeps=mydepgraph.mynewgraph.get_all_nodes()
3380
	myvarlist=portage.vardbapi(portage.root).cp_all()
3403
	myvarlist=portage.vardbapi(ROOT).cp_all()
3381
3404
3382
	if not syslist:
3405
	if not syslist:
3383
		print "!!! You have no system list. Cannot determine system from world."
3406
		print "!!! You have no system list. Cannot determine system from world."
3384
	if not worldlist:
3407
	if not worldlist:
3385
		print "!!! You have no world file. Cannot determine explicit merges."
3408
		print "!!! You have no world file. Cannot determine explicit merges."
3386
	if not myvarlist:
3409
	if not myvarlist:
3387
		print "!!! You have no installed package tree (%s). This is a problem." % portage.VDB_PATH
3410
		print "!!! You have no installed package tree (%s). This is a problem." % ROOT(VDB_PATH)
3388
	if not alldeps:
3411
	if not alldeps:
3389
		print "!!! You have no dependencies. Impossible. Bug."
3412
		print "!!! You have no dependencies. Impossible. Bug."
3390
3413
Lines 3586-3592 Link Here
3586
					if pkgline[0]=="ebuild" and pkgline[3]=="merge":
3609
					if pkgline[0]=="ebuild" and pkgline[3]=="merge":
3587
						y=portage.portdb.findname(pkgline[2])
3610
						y=portage.portdb.findname(pkgline[2])
3588
						tmpsettings = portage.config(clone=portage.settings)
3611
						tmpsettings = portage.config(clone=portage.settings)
3589
						retval=portage.doebuild(y,"digest",portage.root,tmpsettings,edebug,("--pretend" in myopts))
3612
						retval=portage.doebuild(y,"digest",ROOT,tmpsettings,edebug,("--pretend" in myopts))
3590
			mydepgraph.merge(mydepgraph.altlist())
3613
			mydepgraph.merge(mydepgraph.altlist())
3591
3614
3592
		if portage.mtimedb.has_key("resume"):
3615
		if portage.mtimedb.has_key("resume"):
(-)portage-cvs/bin/env-update (-2 / +2 lines)
Lines 1-11 Link Here
1
#!/usr/bin/python -O
1
#! @PYTHON@ -O
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
5
5
6
import os,sys
6
import os,sys
7
os.environ["PORTAGE_CALLER"] = "env-update"
7
os.environ["PORTAGE_CALLER"] = "env-update"
8
sys.path = ["/usr/lib/portage/pym"]+sys.path
8
sys.path = ["@PORTAGE_BASE@/pym"]+sys.path
9
9
10
import portage
10
import portage
11
portage.env_update(portage.root)
11
portage.env_update(portage.root)
(-)portage-cvs/bin/env-update.sh (-16 / +17 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
Lines 20-28 Link Here
20
	export MAKELINKS=1
20
	export MAKELINKS=1
21
fi
21
fi
22
export ROOT="${ROOT:=/}"
22
export ROOT="${ROOT:=/}"
23
[[ ${ROOT} == */ ]] || export ROOT="${ROOT}/"
23
[[ ${ROOT}${AFFIX} == */ ]] || export AFFIX="${AFFIX}/"
24
24
25
export ENVDIR="${ROOT}etc/env.d"
25
export ENVDIR="${ROOT}${AFFIX}etc/env.d"
26
mkdir -p ${ENVDIR}
26
mkdir -p ${ENVDIR}
27
chmod 755 ${ENVDIR}
27
chmod 755 ${ENVDIR}
28
specials="
28
specials="
Lines 33-45 Link Here
33
	ADA_INCLUDE_PATH ADA_OBJECTS_PATH LDPATH PATH MANPATH ROOTPATH
33
	ADA_INCLUDE_PATH ADA_OBJECTS_PATH LDPATH PATH MANPATH ROOTPATH
34
	PRELINK_PATH PRELINK_PATH_MASK PYTHON_PATH"
34
	PRELINK_PATH PRELINK_PATH_MASK PYTHON_PATH"
35
35
36
export LDSOCONF="${ROOT}etc/ld.so.conf"
36
export LDSOCONF="${ROOT}${AFFIX}etc/ld.so.conf"
37
37
38
export PRELINKCONF="${ROOT}etc/prelink.conf"
38
export PRELINKCONF="${ROOT}${AFFIX}etc/prelink.conf"
39
defaultprelinkpaths=":/bin:/sbin:/usr/bin:/usr/sbin:/lib:/usr/lib"
39
defaultprelinkpaths=":/${AFFIX}/bin:/${AFFIX}/sbin:${PREFIX}/bin:${PREFIX}/sbin:/${AFFIX}/lib:${PREFIX}/lib"
40
40
41
export PROFILEENV="${ROOT}etc/profile.env"
41
export PROFILEENV="${ROOT}${AFFIX}etc/profile.env"
42
export CSHENV="${ROOT}etc/csh.env"
42
export CSHENV="${ROOT}${AFFIX}etc/csh.env"
43
43
44
# make sure we aren't tricked with previous 'my_envd_' variables
44
# make sure we aren't tricked with previous 'my_envd_' variables
45
unset $(set | grep '^my_envd_' | cut -d= -f1)
45
unset $(set | grep '^my_envd_' | cut -d= -f1)
Lines 140-146 Link Here
140
if [[ "${OLD_LDPATH}" != "${my_envd_LDPATH}" ]] ; then
140
if [[ "${OLD_LDPATH}" != "${my_envd_LDPATH}" ]] ; then
141
	cat << EOF > ${LDSOCONF}
141
	cat << EOF > ${LDSOCONF}
142
# ld.so.conf autogenerated by env-update; make all changes to
142
# ld.so.conf autogenerated by env-update; make all changes to
143
# contents of /etc/env.d directory
143
# contents of /${AFFIX}etc/env.d directory
144
${my_envd_LDPATH//:/
144
${my_envd_LDPATH//:/
145
}
145
}
146
EOF
146
EOF
Lines 181-187 Link Here
181
181
182
	cat << EOF > ${PRELINKCONF}
182
	cat << EOF > ${PRELINKCONF}
183
# prelink.conf autogenerated by env-update; make all changes to
183
# prelink.conf autogenerated by env-update; make all changes to
184
# contents of /etc/env.d directory
184
# contents of /${AFFIX}etc/env.d directory
185
${defaultprelinkpaths//:/
185
${defaultprelinkpaths//:/
186
-l }
186
-l }
187
${envdprelinkpaths//:/
187
${envdprelinkpaths//:/
Lines 195-211 Link Here
195
# RUN EXTERNAL PROGRAMS NOW
195
# RUN EXTERNAL PROGRAMS NOW
196
############################################
196
############################################
197
197
198
echo ">>> Regenerating ${ROOT}etc/ld.so.cache..."
198
set -xv
199
echo ">>> Regenerating ${ROOT}${AFFIX}etc/ld.so.cache..."
199
if [[ ${MAKELINKS} -eq 0 ]] ; then
200
if [[ ${MAKELINKS} -eq 0 ]] ; then
200
	(cd / ; /sbin/ldconfig -X -r ${ROOT} >& /dev/null)
201
	(cd / ; /@affix@sbin/ldconfig -X -r ${ROOT}${AFFIX} >& /dev/null)
201
else
202
else
202
	(cd / ; /sbin/ldconfig -r ${ROOT} >& /dev/null)
203
	(cd / ; /@affix@sbin/ldconfig -r ${ROOT}${AFFIX} >& /dev/null)
203
fi
204
fi
204
205
205
cat << EOF > ${PROFILEENV}
206
cat << EOF > ${PROFILEENV}
206
# THIS FILE IS AUTOMATICALLY GENERATED BY env-update.
207
# THIS FILE IS AUTOMATICALLY GENERATED BY env-update.
207
# DO NOT EDIT THIS FILE. CHANGES TO STARTUP PROFILES
208
# DO NOT EDIT THIS FILE. CHANGES TO STARTUP PROFILES
208
# GO INTO /etc/profile NOT /etc/profile.env
209
# GO INTO /${AFFIX}etc/profile NOT /${AFFIX}etc/profile.env
209
210
210
$(set | grep '^my_envd_' | sed -e 's:^my_envd_:export :')
211
$(set | grep '^my_envd_' | sed -e 's:^my_envd_:export :')
211
EOF
212
EOF
Lines 213-221 Link Here
213
cat << EOF > ${CSHENV}
214
cat << EOF > ${CSHENV}
214
# THIS FILE IS AUTOMATICALLY GENERATED BY env-update.
215
# THIS FILE IS AUTOMATICALLY GENERATED BY env-update.
215
# DO NOT EDIT THIS FILE. CHANGES TO STARTUP PROFILES
216
# DO NOT EDIT THIS FILE. CHANGES TO STARTUP PROFILES
216
# GO INTO /etc/csh.cshrc NOT /etc/csh.env
217
# GO INTO /${AFFIX}etc/csh.cshrc NOT /${AFFIX}etc/csh.env
217
218
218
$(set | grep '^my_envd_' | sed -e 's:^my_envd_\([[:alpha:]_][[:alnum:]_]*\)=:setenv \1 :')
219
$(set | grep '^my_envd_' | sed -e 's:^my_envd_\([[:alpha:]_][[:alnum:]_]*\)=:setenv \1 :')
219
EOF
220
EOF
220
221
221
[[ ${ROOT} == / ]] && /sbin/depscan.sh
222
[[ ${ROOT}${AFFIX} == / ]] && /sbin/depscan.sh
(-)portage-cvs/bin/etc-update (-6 / +6 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
Lines 12-18 Link Here
12
12
13
export PORTAGE_CALLER="etc-update"
13
export PORTAGE_CALLER="etc-update"
14
14
15
if [ $(/usr/lib/portage/bin/portageq envvar USERLAND) = BSD ] ; then
15
if [ $(@PORTAGE_BASE@/bin/portageq envvar USERLAND) = BSD ] ; then
16
	function sed() { gsed "$@"; }
16
	function sed() { gsed "$@"; }
17
fi
17
fi
18
18
Lines 22-28 Link Here
22
	# First strip off comment lines, then grab the configuration
22
	# First strip off comment lines, then grab the configuration
23
	# item. If there's more than one of the same configuration item,
23
	# item. If there's more than one of the same configuration item,
24
	# then allow the last setting to take precedence.
24
	# then allow the last setting to take precedence.
25
	cut -d'#' -f1-1 /etc/etc-update.conf | \
25
	cut -d'#' -f1-1 /@affix@etc/etc-update.conf | \
26
		sed -ne "s/^ *$item *= *\([\"']\{0,1\}\)\(.*\)\1/\2/p" |sed -e '$p;d'
26
		sed -ne "s/^ *$item *= *\([\"']\{0,1\}\)\(.*\)\1/\2/p" |sed -e '$p;d'
27
}
27
}
28
28
Lines 57-63 Link Here
57
					if [ ! -e "${rpath}/${rfile}" ] || [ ! -e "${rpath}/${rfile:10}" ]; then
57
					if [ ! -e "${rpath}/${rfile}" ] || [ ! -e "${rpath}/${rfile:10}" ]; then
58
						MATCHES=0
58
						MATCHES=0
59
					else
59
					else
60
						diff -Bbua ${rpath}/${rfile} ${rpath}/${rfile:10} | egrep '^[+-]' | egrep -v '^[+-][\t ]*#|^--- |^\+\+\+ ' | egrep -qv '^[-+][\t ]*$'
60
						diff -Bbua ${rpath}/${rfile} ${rpath}/${rfile:10} | @EGREP@ '^[+-]' | @EGREP@ -v '^[+-][\t ]*#|^--- |^\+\+\+ ' | @EGREP@ -qv '^[-+][\t ]*$'
61
						MATCHES=$?
61
						MATCHES=$?
62
					fi
62
					fi
63
				elif [[ -z `diff -Nua ${rpath}/${rfile} ${rpath}/${rfile:10}|
63
				elif [[ -z `diff -Nua ${rpath}/${rfile} ${rpath}/${rfile:10}|
Lines 359-366 Link Here
359
mkdir ${TMP} || die "failed mkdir command!" 1
359
mkdir ${TMP} || die "failed mkdir command!" 1
360
360
361
# I need the CONFIG_PROTECT value
361
# I need the CONFIG_PROTECT value
362
CONFIG_PROTECT=$(/usr/lib/portage/bin/portageq envvar CONFIG_PROTECT)
362
CONFIG_PROTECT=$(@PORTAGE_BASE@/bin/portageq envvar CONFIG_PROTECT)
363
CONFIG_PROTECT_MASK=$(/usr/lib/portage/bin/portageq envvar CONFIG_PROTECT_MASK)
363
CONFIG_PROTECT_MASK=$(@PORTAGE_BASE@/bin/portageq envvar CONFIG_PROTECT_MASK)
364
364
365
# load etc-config's configuration
365
# load etc-config's configuration
366
EU_AUTOMERGE=`get_config eu_automerge`
366
EU_AUTOMERGE=`get_config eu_automerge`
(-)portage-cvs/bin/find-requires (-2 / +2 lines)
Lines 1-4 Link Here
1
#!/bin/sh
1
#! /bin/sh
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
Lines 10-16 Link Here
10
10
11
filelist=`sed "s/['\"]/\\\&/g"`
11
filelist=`sed "s/['\"]/\\\&/g"`
12
exelist=`echo $filelist | $XARGS file | grep ":.*executable" | cut -d: -f1 `
12
exelist=`echo $filelist | $XARGS file | grep ":.*executable" | cut -d: -f1 `
13
scriptlist=`echo $filelist | $XARGS file | egrep ":.* (commands|script) " | cut -d: -f1 `
13
scriptlist=`echo $filelist | $XARGS file | @EGREP@ ":.* (commands|script) " | cut -d: -f1 `
14
liblist=`echo $filelist | $XARGS file | grep ":.*shared object" | cut -d : -f1 `
14
liblist=`echo $filelist | $XARGS file | grep ":.*shared object" | cut -d : -f1 `
15
15
16
for f in $exelist; do
16
for f in $exelist; do
(-)portage-cvs/bin/fix-db.py (-7 / +7 lines)
Lines 1-17 Link Here
1
#!/usr/bin/python
1
#! @PYTHON@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
5
5
6
import os,sys,re
6
import os,sys,re
7
sys.path = ["/usr/lib/portage/pym"]+sys.path
7
sys.path = ["@PORTAGE_BASE@/pym"]+sys.path
8
8
9
from stat import *
9
from stat import *
10
from output import *
10
from output import *
11
from portage import lockfile,unlockfile,VDB_PATH,root
11
from portage import lockfile,unlockfile,MYROOT,ROOT,VDB_PATH
12
12
13
13
14
mylog = open("/var/log/emerge_fix-db.log", "a")
14
mylog = open(MYROOT("var/log/emerge_fix-db.log"), "a")
15
def writemsg(msg):
15
def writemsg(msg):
16
	if msg[-1] != '\n':
16
	if msg[-1] != '\n':
17
		msg += "\n"
17
		msg += "\n"
Lines 21-27 Link Here
21
	mylog.flush()
21
	mylog.flush()
22
22
23
def fix_global_counter(value):
23
def fix_global_counter(value):
24
	myf = open("/var/cache/edb/counter")
24
	myf = open(MYROOT(CACHE_PATH+"/counter"))
25
	newvalue = value+1000
25
	newvalue = value+1000
26
	myf.write(str(newvalue))
26
	myf.write(str(newvalue))
27
	myf.flush()
27
	myf.flush()
Lines 33-46 Link Here
33
times = {}
33
times = {}
34
34
35
try:
35
try:
36
	real_counter = long(open("/var/cache/edb/counter").read())
36
	real_counter = long(open(MYROOT(CACHE_PATH+"/counter")).read())
37
except SystemExit, e:
37
except SystemExit, e:
38
	raise  # This needs to be propogated
38
	raise  # This needs to be propogated
39
except:
39
except:
40
	writemsg("ERROR: Real counter is invalid.\n")
40
	writemsg("ERROR: Real counter is invalid.\n")
41
	real_counter = 0
41
	real_counter = 0
42
42
43
vardbdir = root+VDB_PATH+"/"
43
vardbdir = ROOT(VDB_PATH+"/")
44
for cat in os.listdir(vardbdir):
44
for cat in os.listdir(vardbdir):
45
	catdir = vardbdir+cat+"/"
45
	catdir = vardbdir+cat+"/"
46
	if not os.path.isdir(catdir):
46
	if not os.path.isdir(catdir):
(-)portage-cvs/bin/fixdbentries (-1 / +1 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
(-)portage-cvs/bin/fixpackages (-2 / +2 lines)
Lines 1-11 Link Here
1
#!/usr/bin/python
1
#! @PYTHON@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
5
5
6
import os,sys
6
import os,sys
7
os.environ["PORTAGE_CALLER"]="fixpackages"
7
os.environ["PORTAGE_CALLER"]="fixpackages"
8
sys.path = ["/usr/lib/portage/pym"]+sys.path
8
sys.path = ["@PORTAGE_BASE@/pym"]+sys.path
9
9
10
import portage
10
import portage
11
11
(-)portage-cvs/bin/fixvardbentries (-2 / +2 lines)
Lines 1-4 Link Here
1
#!/usr/bin/python -O
1
#! @PYTHON@ -O
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
Lines 141-147 Link Here
141
	return True
141
	return True
142
142
143
143
144
vardb = "/var/db/pkg/"
144
vardb = "/@affix@var/db/pkg/"
145
changed = False
145
changed = False
146
for cat in os.listdir(vardb):
146
for cat in os.listdir(vardb):
147
	if os.path.isdir(vardb+cat):
147
	if os.path.isdir(vardb+cat):
(-)portage-cvs/bin/fixvirtuals (-5 / +6 lines)
Lines 1-20 Link Here
1
#!/usr/bin/python -O
1
#! @PYTHON@ -O
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
5
5
6
import os,sys
6
import os,sys
7
sys.path = ["/usr/lib/portage/pym"]+sys.path
7
sys.path = ["@PORTAGE_BASE@/pym"]+sys.path
8
8
9
import portage
9
import portage
10
from portage import MYROOT, CACHE_PATH
10
11
11
if portage.secpass!=2:
12
if portage.secpass!=2:
12
	print "fixvirtuals: root access required."
13
	print "fixvirtuals: root access required."
13
	sys.exit(1)
14
	sys.exit(1)
14
15
15
newvirts={}
16
newvirts={}
16
myvirts=portage.grabdict("/var/cache/edb/virtuals")
17
myvirts=portage.grabdict(MYROOT(CACHE_PATH+"/virtuals"))
17
myprovides=portage.db["/"]["vartree"].get_all_provides()
18
myprovides=portage.db[MYROOT()]["vartree"].get_all_provides()
18
19
19
for myvirt in myprovides.keys():
20
for myvirt in myprovides.keys():
20
	newvirts[myvirt]=[]
21
	newvirts[myvirt]=[]
Lines 30-33 Link Here
30
		except:
31
		except:
31
			newvirts[myvirt].append(pkg)
32
			newvirts[myvirt].append(pkg)
32
33
33
portage.writedict(newvirts,"/var/cache/edb/virtuals")
34
portage.writedict(newvirts,MYROOT(CACHE_PATH+"/virtuals"))
(-)portage-cvs/bin/fowners (-1 / +1 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
(-)portage-cvs/bin/fperms (-1 / +1 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
(-)portage-cvs/bin/g-cpan.pl (-9 / +9 lines)
Lines 1-4 Link Here
1
#!/usr/bin/perl -w
1
#! @PERL@ -w
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
Lines 101-108 Link Here
101
my @ebuild_list;
101
my @ebuild_list;
102
102
103
# Set up global paths
103
# Set up global paths
104
my $TMP_DEV_PERL_DIR = '/var/db/pkg/dev-perl';
104
my $TMP_DEV_PERL_DIR = '/@affix@var/db/pkg/dev-perl';
105
my $MAKECONF         = '/etc/make.conf';
105
my $MAKECONF         = '/@affix@etc/make.conf';
106
my ( $OVERLAY_DIR, $PORTAGE_DIR, $PORTAGE_DEV_PERL, $PORTAGE_DISTDIR ) = get_globals();
106
my ( $OVERLAY_DIR, $PORTAGE_DIR, $PORTAGE_DEV_PERL, $PORTAGE_DISTDIR ) = get_globals();
107
107
108
# Create the ebuild in PORTDIR_OVERLAY, if it is defined and exists
108
# Create the ebuild in PORTDIR_OVERLAY, if it is defined and exists
Lines 339-345 Link Here
339
    $md5digest = Digest::MD5->new->addfile(*DIGIFILE)->hexdigest;
339
    $md5digest = Digest::MD5->new->addfile(*DIGIFILE)->hexdigest;
340
    close(DIGIFILE);
340
    close(DIGIFILE);
341
    } else {
341
    } else {
342
        ($md5digest = qx(/usr/bin/md5sum $localfile)) =~ s/^(.*?)\s.*$/$1/s;
342
        ($md5digest = qx(@MD5SUM@ $localfile)) =~ s/^(.*?)\s.*$/$1/s;
343
    }
343
    }
344
344
345
    my $md5string = sprintf "MD5 %s %s %d", $md5digest, $base,
345
    my $md5string = sprintf "MD5 %s %s %d", $md5digest, $base,
Lines 387-395 Link Here
387
    # let's not beat around the bush here, make.conf isn't the
387
    # let's not beat around the bush here, make.conf isn't the
388
    # only place these variables can be defined
388
    # only place these variables can be defined
389
389
390
    $OVERLAY_DIR=qx(/usr/lib/portage/bin/portageq portdir_overlay);
390
    $OVERLAY_DIR=qx(@PORTAGE_BASE@/bin/portageq portdir_overlay);
391
    $PORTAGE_DIR=qx(/usr/lib/portage/bin/portageq portdir);
391
    $PORTAGE_DIR=qx(@PORTAGE_BASE@/bin/portageq portdir);
392
    $PORTAGE_DISTDIR=qx(/usr/lib/portage/bin/portageq distdir);
392
    $PORTAGE_DISTDIR=qx(@PORTAGE_BASE@/bin/portageq distdir);
393
393
394
    chomp $OVERLAY_DIR;
394
    chomp $OVERLAY_DIR;
395
    chomp $PORTAGE_DIR;
395
    chomp $PORTAGE_DIR;
Lines 400-410 Link Here
400
    }
400
    }
401
401
402
    unless ( length $PORTAGE_DIR && -d $PORTAGE_DIR ) {
402
    unless ( length $PORTAGE_DIR && -d $PORTAGE_DIR ) {
403
        $PORTAGE_DIR = "/usr/portage";
403
        $PORTAGE_DIR = "@prefix@/portage";
404
    }
404
    }
405
405
406
    unless ( length $PORTAGE_DISTDIR && -d $PORTAGE_DISTDIR ) {
406
    unless ( length $PORTAGE_DISTDIR && -d $PORTAGE_DISTDIR ) {
407
        $PORTAGE_DISTDIR = "/usr/portage/distfiles";
407
        $PORTAGE_DISTDIR = "@prefix@/portage/distfiles";
408
    }
408
    }
409
409
410
    # Finally, set the dev-perl dir explicitly
410
    # Finally, set the dev-perl dir explicitly
(-)portage-cvs/bin/isolated-functions.sh (-2 / +2 lines)
Lines 30-36 Link Here
30
	local pri=
30
	local pri=
31
	local tag=
31
	local tag=
32
	
32
	
33
	if [ -x /usr/bin/logger ]
33
	if [ -x "@LOGGER@" ]
34
	then
34
	then
35
		pri="$1"
35
		pri="$1"
36
		tag="$2"
36
		tag="$2"
Lines 38-44 Link Here
38
		shift 2
38
		shift 2
39
		[ -z "$*" ] && return 0
39
		[ -z "$*" ] && return 0
40
		
40
		
41
		/usr/bin/logger -p "${pri}" -t "${tag}" -- "$*"
41
		@LOGGER@ -p "${pri}" -t "${tag}" -- "$*"
42
	fi
42
	fi
43
43
44
	return 0
44
	return 0
(-)portage-cvs/bin/md5check.py (-6 / +7 lines)
Lines 1-4 Link Here
1
#!/usr/bin/python -O
1
#! @PYTHON@ -O
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
Lines 6-14 Link Here
6
import os,sys,string
6
import os,sys,string
7
os.environ["PORTAGE_CALLER"]="mirror"
7
os.environ["PORTAGE_CALLER"]="mirror"
8
os.environ["FEATURES"]="mirror cvs"
8
os.environ["FEATURES"]="mirror cvs"
9
sys.path = ["/usr/lib/portage/pym"]+sys.path
9
sys.path = ["@PORTAGE_BASE@/pym"]+sys.path
10
10
11
import portage
11
import portage
12
from portage import MYROOT
12
from threading import *
13
from threading import *
13
from output import red,green,blue,bold
14
from output import red,green,blue,bold
14
from random import shuffle
15
from random import shuffle
Lines 27-43 Link Here
27
col_list = []
28
col_list = []
28
29
29
hugelist = []
30
hugelist = []
30
for mycp in portage.db["/"]["porttree"].dbapi.cp_all():
31
for mycp in portage.db[MYROOT()]["porttree"].dbapi.cp_all():
31
	hugelist += portage.db["/"]["porttree"].dbapi.cp_list(mycp)
32
	hugelist += portage.db[MYROOT()]["porttree"].dbapi.cp_list(mycp)
32
hugelist.sort()
33
hugelist.sort()
33
34
34
for mycpv in hugelist:
35
for mycpv in hugelist:
35
	pv = string.split(mycpv, "/")[-1]
36
	pv = string.split(mycpv, "/")[-1]
36
37
37
	newuri = portage.db["/"]["porttree"].dbapi.aux_get(mycpv,["SRC_URI"])[0]
38
	newuri = portage.db[MYROOT()]["porttree"].dbapi.aux_get(mycpv,["SRC_URI"])[0]
38
	newuri = string.split(newuri)
39
	newuri = string.split(newuri)
39
40
40
	digestpath = portage.db["/"]["porttree"].dbapi.findname(mycpv)
41
	digestpath = portage.db[MYROOT()]["porttree"].dbapi.findname(mycpv)
41
	digestpath = os.path.dirname(digestpath)+"/files/digest-"+pv
42
	digestpath = os.path.dirname(digestpath)+"/files/digest-"+pv
42
	md5sums    = portage.digestParseFile(digestpath)
43
	md5sums    = portage.digestParseFile(digestpath)
43
	
44
	
(-)portage-cvs/bin/md5check.sh (-1 / +1 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
(-)portage-cvs/bin/mirror.py (-6 / +7 lines)
Lines 1-4 Link Here
1
#!/usr/bin/python -O
1
#! @PYTHON@ -O
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
Lines 9-17 Link Here
9
import os,sys,string
9
import os,sys,string
10
os.environ["PORTAGE_CALLER"]="mirror"
10
os.environ["PORTAGE_CALLER"]="mirror"
11
os.environ["FEATURES"]="mirror cvs"
11
os.environ["FEATURES"]="mirror cvs"
12
sys.path = ["/usr/lib/portage/pym"]+sys.path
12
sys.path = ["@PORTAGE_BASE@/pym"]+sys.path
13
13
14
import portage
14
import portage
15
from portage import MYROOT
15
from threading import *
16
from threading import *
16
from output import red,green,blue,bold
17
from output import red,green,blue,bold
17
from random import shuffle
18
from random import shuffle
Lines 106-113 Link Here
106
destdir = portage.settings["DISTDIR"][:]
107
destdir = portage.settings["DISTDIR"][:]
107
108
108
hugelist = []
109
hugelist = []
109
for mycp in portage.db["/"]["porttree"].dbapi.cp_all():
110
for mycp in portage.db[MYROOT()]["porttree"].dbapi.cp_all():
110
	hugelist += portage.db["/"]["porttree"].dbapi.cp_list(mycp)
111
	hugelist += portage.db[MYROOT()]["porttree"].dbapi.cp_list(mycp)
111
shuffle(hugelist)
112
shuffle(hugelist)
112
113
113
mycount = -1
114
mycount = -1
Lines 120-129 Link Here
120
	if ((mycount % 20) == 0):
121
	if ((mycount % 20) == 0):
121
		sys.stdout.write("\nCompleted: %s\n" % mycount)
122
		sys.stdout.write("\nCompleted: %s\n" % mycount)
122
		sys.stdout.flush()
123
		sys.stdout.flush()
123
	newuri = portage.db["/"]["porttree"].dbapi.aux_get(mycpv,["SRC_URI"])[0]
124
	newuri = portage.db[MYROOT()]["porttree"].dbapi.aux_get(mycpv,["SRC_URI"])[0]
124
	newuri = string.split(newuri)
125
	newuri = string.split(newuri)
125
126
126
	digestpath = portage.db["/"]["porttree"].dbapi.findname(mycpv)
127
	digestpath = portage.db[MYROOT()]["porttree"].dbapi.findname(mycpv)
127
	digestpath = os.path.dirname(digestpath)+"/files/digest-"+pv
128
	digestpath = os.path.dirname(digestpath)+"/files/digest-"+pv
128
	md5sums    = portage.digestParseFile(digestpath)
129
	md5sums    = portage.digestParseFile(digestpath)
129
	
130
	
(-)portage-cvs/bin/newbin (-1 / +1 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
(-)portage-cvs/bin/newconfd (-1 / +1 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
(-)portage-cvs/bin/newdoc (-1 / +1 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
(-)portage-cvs/bin/newenvd (-1 / +1 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
(-)portage-cvs/bin/newexe (-1 / +1 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
(-)portage-cvs/bin/newinitd (-1 / +1 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
(-)portage-cvs/bin/newins (-1 / +1 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
(-)portage-cvs/bin/newlib.a (-1 / +1 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
(-)portage-cvs/bin/newlib.so (-1 / +1 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
(-)portage-cvs/bin/newman (-1 / +1 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
(-)portage-cvs/bin/newsbin (-1 / +1 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
(-)portage-cvs/bin/pkgmerge (-2 / +2 lines)
Lines 1-10 Link Here
1
#!/usr/bin/python
1
#! @PYTHON@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
5
5
6
import sys,os,string
6
import sys,os,string
7
sys.path = ["/usr/lib/portage/pym"]+sys.path
7
sys.path = ["@PORTAGE_BASE@/pym"]+sys.path
8
8
9
import portage,xpak
9
import portage,xpak
10
10
(-)portage-cvs/bin/pkgmerge.new (-2 / +2 lines)
Lines 1-10 Link Here
1
#!/usr/bin/python
1
#! @PYTHON@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
5
5
6
import os,string,sys
6
import os,string,sys
7
sys.path = ["/usr/lib/portage/pym"]+sys.path
7
sys.path = ["@PORTAGE_BASE@/pym"]+sys.path
8
8
9
import portage,xpak
9
import portage,xpak
10
10
(-)portage-cvs/bin/pkgname (-2 / +2 lines)
Lines 1-10 Link Here
1
#!/usr/bin/python
1
#! @PYTHON@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
5
5
6
import sys
6
import sys
7
sys.path = ["/usr/lib/portage/pym"]+sys.path
7
sys.path = ["@PORTAGE_BASE@/pym"]+sys.path
8
8
9
import portage
9
import portage
10
10
(-)portage-cvs/bin/portage_gpg_update.sh (-2 / +2 lines)
Lines 1-6 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
5
5
6
wget -O - http://www.gentoo.org/proj/en/devrel/roll-call/userinfo.xml | sed 's:.*\(0x[0-9a-fA-F]\+\)[^0-9a-fA-F].*:\1:gp;d' | xargs gpg -vvv --no-default-keyring  --no-permission-warning --homedir /usr/portage/metadata --keyring "gentoo.gpg" --keyserver subkeys.pgp.net --recv-keys &> gpg.log
6
@WGET@ -O - http://www.gentoo.org/proj/en/devrel/roll-call/userinfo.xml | @SED@ 's:.*\(0x[0-9a-fA-F]\+\)[^0-9a-fA-F].*:\1:gp;d' | xargs @GPG@ -vvv --no-default-keyring  --no-permission-warning --homedir @prefix@/portage/metadata --keyring "gentoo.gpg" --keyserver subkeys.pgp.net --recv-keys &> gpg.log
(-)portage-cvs/bin/portageq (-2 / +2 lines)
Lines 1-10 Link Here
1
#!/usr/bin/python -O
1
#! @PYTHON@ -O
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
5
5
6
import sys
6
import sys
7
sys.path = ["/usr/lib/portage/pym"]+sys.path
7
sys.path = ["@PORTAGE_BASE@/pym"]+sys.path
8
8
9
import portage,types, portageq
9
import portage,types, portageq
10
10
(-)portage-cvs/bin/prepall (-9 / +9 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
Lines 8-17 Link Here
8
prepallstrip
8
prepallstrip
9
9
10
#this should help to ensure that all (most?) shared libraries are executable
10
#this should help to ensure that all (most?) shared libraries are executable
11
for i in "${D}"opt/*/lib{,32,64} \
11
for i in "${D}"${AFFIX}opt/*/lib{,32,64} \
12
         "${D}"lib{,32,64}       \
12
         "${D}"${AFFIX}lib{,32,64}       \
13
         "${D}"usr/lib{,32,64}   \
13
         "${D}"${PREFIX}/lib{,32,64}   \
14
         "${D}"usr/X11R6/lib{,32,64} ; do
14
         "${D}"${PREFIX}/X11R6/lib{,32,64} ; do
15
	[ ! -d "${i}" ] && continue
15
	[ ! -d "${i}" ] && continue
16
16
17
	for j in "${i}"/*.so.* "${i}"/*.so ; do
17
	for j in "${i}"/*.so.* "${i}"/*.so ; do
Lines 23-39 Link Here
23
done
23
done
24
24
25
# Move aclocals
25
# Move aclocals
26
for i in `find "${D}"/ -name "aclocal" -type d 2>/dev/null` ; do
26
for i in `find "${D}"/${AFFIX} -name "aclocal" -type d 2>/dev/null` ; do
27
	[ -z "${i}" ] && continue
27
	[ -z "${i}" ] && continue
28
28
29
	# Strip double '/'
29
	# Strip double '/'
30
	dir1="`echo "${i}" | sed  -e 's:/\{2,\}:/:g'`"
30
	dir1="`echo "${i}" | sed  -e 's:/\{2,\}:/:g'`"
31
	dir2="`echo "${D}/usr/share/aclocal" | sed  -e 's:/\{2,\}:/:g'`"
31
	dir2="`echo "${D}${PREFIX}/share/aclocal" | sed  -e 's:/\{2,\}:/:g'`"
32
	
32
	
33
	[ "${dir1}" == "${dir2}" ] && continue
33
	[ "${dir1}" == "${dir2}" ] && continue
34
34
35
	echo "moving aclocal: /${i/${D}/}"
35
	echo "moving aclocal: /${i/${D}/}"
36
	install -d "${D}"usr/share/aclocal
36
	install -d "${D}"${PREFIX}/share/aclocal
37
	mv "${i}"/* "${D}"usr/share/aclocal
37
	mv "${i}"/* "${D}"${PREFIX}/share/aclocal
38
	rm -fr "${i}"
38
	rm -fr "${i}"
39
done
39
done
(-)portage-cvs/bin/prepalldocs (-2 / +2 lines)
Lines 1-9 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
5
5
6
z="`find "${D}"usr/share/doc \( -type f -or -type l \) -not -name "*.gz" -not -name "*.js" 2>/dev/null`"
6
z="`find "${D}"${PREFIX}/share/doc \( -type f -or -type l \) -not -name "*.gz" -not -name "*.js" 2>/dev/null`"
7
7
8
for y in ${z} ; do
8
for y in ${z} ; do
9
	if [ -L "${y}" ] ; then
9
	if [ -L "${y}" ] ; then
(-)portage-cvs/bin/prepallinfo (-2 / +2 lines)
Lines 1-9 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
5
5
6
[ ! -d "${D}usr/share/info" ] && exit 0
6
[ ! -d "${D}${PREFIX}/share/info" ] && exit 0
7
7
8
echo "info:"
8
echo "info:"
9
prepinfo
9
prepinfo
(-)portage-cvs/bin/prepallman (-2 / +2 lines)
Lines 1-10 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
5
5
6
echo "man:"
6
echo "man:"
7
for x in "${D}"opt/*/man "${D}"usr/share/man "${D}"usr/local/man "${D}"usr/X11R6/man ; do
7
for x in "${D}"/${AFFIX}man "${D}"/${AFFIX}opt/*/man "${D}"${PREFIX}/share/man "${D}"${PREFIX}/local/man "${D}"${PREFIX}/X11R6/man ; do
8
	if [ -d "${x}" ]
8
	if [ -d "${x}" ]
9
	then
9
	then
10
		prepman "`echo "${x}" | sed -e "s:${D}::" -e "s:/man[/]*$::"`"
10
		prepman "`echo "${x}" | sed -e "s:${D}::" -e "s:/man[/]*$::"`"
(-)portage-cvs/bin/prepallstrip (-1 / +1 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
(-)portage-cvs/bin/prepinfo (-2 / +2 lines)
Lines 1-10 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
5
5
6
if [ -z "$1" ] ; then
6
if [ -z "$1" ] ; then
7
	z="${D}usr/share/info"
7
	z="${D}${PREFIX}/share/info"
8
else
8
else
9
	if [ -d "${D}$1/share/info" ] ; then
9
	if [ -d "${D}$1/share/info" ] ; then
10
		z="${D}$1/share/info"
10
		z="${D}$1/share/info"
(-)portage-cvs/bin/preplib (-2 / +2 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
Lines 15-21 Link Here
15
fi
15
fi
16
16
17
if [ -z "$1" ] ; then
17
if [ -z "$1" ] ; then
18
	z="${D}usr/${CONF_LIBDIR}"
18
	z="${D}${PREFIX}/${CONF_LIBDIR}"
19
else
19
else
20
	z="${D}$1/${CONF_LIBDIR}"
20
	z="${D}$1/${CONF_LIBDIR}"
21
fi
21
fi
(-)portage-cvs/bin/preplib.so (-1 / +1 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
(-)portage-cvs/bin/prepman (-2 / +2 lines)
Lines 1-10 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
5
5
6
if [ -z "$1" ] ; then 
6
if [ -z "$1" ] ; then 
7
	z="${D}usr/share/man"
7
	z="${D}${PREFIX}/share/man"
8
else
8
else
9
	z="${D}$1/man"
9
	z="${D}$1/man"
10
fi
10
fi
(-)portage-cvs/bin/prepstrip (-3 / +3 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
Lines 35-42 Link Here
35
			echo "   ${x:${#D}:${#x}}"
35
			echo "   ${x:${#D}:${#x}}"
36
			${STRIP} ${PORTAGE_STRIP_FLAGS} "${x}"
36
			${STRIP} ${PORTAGE_STRIP_FLAGS} "${x}"
37
37
38
			if [ -x /usr/bin/readelf ] ; then
38
			if [ -x "@READELF@" ] ; then
39
				/usr/bin/readelf -d "${x}" | grep TEXTREL > /dev/null
39
				@READELF@ -d "${x}" | grep TEXTREL > /dev/null
40
				if [ $? = 0 ]; then
40
				if [ $? = 0 ]; then
41
					echo "	${x:${#D}:${#x}} will contain runtime text relocations"
41
					echo "	${x:${#D}:${#x}} will contain runtime text relocations"
42
					if [ "${FEATURES//*strict*/true}" == "true" ] ; then
42
					if [ "${FEATURES//*strict*/true}" == "true" ] ; then
(-)portage-cvs/bin/queryhost.sh (-1 / +1 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
(-)portage-cvs/bin/quickpkg (-1 / +1 lines)
Lines 1-4 Link Here
1
#!/bin/bash
1
#! @BASH@
2
# Copyright 1999-2005 Gentoo Foundation
2
# Copyright 1999-2005 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
(-)portage-cvs/bin/regenworld (-8 / +10 lines)
Lines 1-12 Link Here
1
#!/usr/bin/python
1
#! @PYTHON@
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
5
5
6
import sys
6
import sys
7
sys.path.insert(0, "/usr/lib/portage/pym")
7
sys.path.insert(0, "@PORTAGE_BASE@/pym")
8
8
9
import portage, string, re
9
import portage, string, re
10
from portage import MYROOT, ROOT, WORLD_FILE
10
11
11
__candidatematcher__ = re.compile("^[0-9]+: \\*\\*\\* emerge ")
12
__candidatematcher__ = re.compile("^[0-9]+: \\*\\*\\* emerge ")
12
__noncandidatematcher__ = re.compile(" sync( |$)| clean( |$)| search( |$)|--oneshot| unmerge( |$)")
13
__noncandidatematcher__ = re.compile(" sync( |$)| clean( |$)| search( |$)|--oneshot| unmerge( |$)")
Lines 41-54 Link Here
41
	print "This script regenerates the portage world file by checking the portage"
42
	print "This script regenerates the portage world file by checking the portage"
42
	print "logfile for all actions that you've done in the past. It ignores any"
43
	print "logfile for all actions that you've done in the past. It ignores any"
43
	print "arguments except --help. It is recommended that you make a backup of"
44
	print "arguments except --help. It is recommended that you make a backup of"
44
	print "your existing world file (%s) before using this tool." % portage.WORLD_FILE
45
	print "your existing world file (%s) before using this tool." \
46
		% MYROOT(WORLD_FILE)
45
	sys.exit(0)
47
	sys.exit(0)
46
48
47
worldlist = portage.grabfile(portage.WORLD_FILE)
49
worldlist = portage.grabfile(MYROOT(WORLD_FILE))
48
syslist = portage.settings.packages
50
syslist = portage.settings.packages
49
syslist = filter(issyspkg, syslist)
51
syslist = filter(issyspkg, syslist)
50
52
51
logfile = portage.grabfile("/var/log/emerge.log")
53
logfile = portage.grabfile(MYROOT("var/log/emerge.log"))
52
biglist = filter(iscandidate, logfile)
54
biglist = filter(iscandidate, logfile)
53
biglist = map(getpkginfo, biglist)
55
biglist = map(getpkginfo, biglist)
54
tmplist = []
56
tmplist = []
Lines 65-71 Link Here
65
	# drop the asterix
67
	# drop the asterix
66
	mykey = mykey[1:]
68
	mykey = mykey[1:]
67
	#print "candidate:",mykey
69
	#print "candidate:",mykey
68
	mylist=portage.db["/"]["vartree"].dbapi.match(mykey)
70
	mylist=portage.db[MYROOT()]["vartree"].dbapi.match(mykey)
69
	if mylist:
71
	if mylist:
70
		mykey=portage.cpv_getkey(mylist[0])
72
		mykey=portage.cpv_getkey(mylist[0])
71
		if mykey not in realsyslist:
73
		if mykey not in realsyslist:
Lines 74-80 Link Here
74
for mykey in biglist:
76
for mykey in biglist:
75
	#print "checking:",mykey
77
	#print "checking:",mykey
76
	try:
78
	try:
77
		mylist=portage.db["/"]["vartree"].dbapi.match(mykey)
79
		mylist=portage.db[MYROOT()]["vartree"].dbapi.match(mykey)
78
	except KeyError:
80
	except KeyError:
79
		if "--debug" in sys.argv:
81
		if "--debug" in sys.argv:
80
			print "* ignoring broken log entry for %s (likely injected)" % mykey
82
			print "* ignoring broken log entry for %s (likely injected)" % mykey
Lines 88-93 Link Here
88
			print "add to world:",myfavkey
90
			print "add to world:",myfavkey
89
			worldlist.append(myfavkey)
91
			worldlist.append(myfavkey)
90
92
91
myfile=open(portage.WORLD_FILE, "w")
93
myfile=open(MYROOT(WORLD_FILE), "w")
92
myfile.write(string.join(worldlist, '\n')+'\n')
94
myfile.write(string.join(worldlist, '\n')+'\n')
93
myfile.close()
95
myfile.close()
(-)portage-cvs/bin/repoman (-50 / +51 lines)
Lines 1-4 Link Here
1
#!/usr/bin/python -O
1
#! @PYTHON@ -O
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
Lines 10-21 Link Here
10
import os,sys,shutil
10
import os,sys,shutil
11
exename=os.path.basename(sys.argv[0])	
11
exename=os.path.basename(sys.argv[0])	
12
os.environ["PORTAGE_CALLER"]="repoman"
12
os.environ["PORTAGE_CALLER"]="repoman"
13
sys.path = ["/usr/lib/portage/pym"]+sys.path
13
sys.path = ["@PORTAGE_BASE@/pym"]+sys.path
14
version="1.2"	
14
version="1.2"	
15
15
16
import string,signal,re,pickle,tempfile
16
import string,signal,re,pickle,tempfile
17
17
18
import portage
18
import portage
19
from portage import MYROOT, ROOT, CACHE_PATH
19
import portage_checksum
20
import portage_checksum
20
import portage_const
21
import portage_const
21
import portage_dep
22
import portage_dep
Lines 214-223 Link Here
214
def last():
215
def last():
215
	try:
216
	try:
216
		#Retrieve and unpickle stats and fails from saved files
217
		#Retrieve and unpickle stats and fails from saved files
217
		savedf=open('/var/cache/edb/repo.stats','r')
218
		savedf=open(MYROOT(CACHE_PATH+'/repo.stats'),'r')
218
		stats = pickle.load(savedf)
219
		stats = pickle.load(savedf)
219
		savedf.close()
220
		savedf.close()
220
		savedf=open('/var/cache/edb/repo.fails','r')
221
		savedf=open(MYROOT(CACHE_PATH+'/repo.fails'),'r')
221
		fails = pickle.load(savedf)
222
		fails = pickle.load(savedf)
222
		savedf.close()
223
		savedf.close()
223
	except SystemExit, e:
224
	except SystemExit, e:
Lines 588-604 Link Here
588
	try:
589
	try:
589
		# if it's been over a week since fetching (or the system clock is fscked), grab an updated copy of metadata.dtd 
590
		# if it's been over a week since fetching (or the system clock is fscked), grab an updated copy of metadata.dtd 
590
		# clock is fscked or it's been a week. time to grab a new one.
591
		# clock is fscked or it's been a week. time to grab a new one.
591
		ct=os.stat(portage.CACHE_PATH + '/metadata.dtd')[ST_CTIME]
592
		ct=os.stat(MYROOT(CACHE_PATH+'/metadata.dtd'))[ST_CTIME]
592
		if abs(time.time() - ct) > (60*60*24*7):
593
		if abs(time.time() - ct) > (60*60*24*7):
593
			# don't trap the exception, we're watching for errno 2 (file not found), anything else is a bug.
594
			# don't trap the exception, we're watching for errno 2 (file not found), anything else is a bug.
594
			backup_exists=1
595
			backup_exists=1
595
			os.rename(portage.CACHE_PATH+'/metadata.dtd',portage.CACHE_PATH+'/metadata.dtd.backup')
596
			os.rename(MYROOT(CACHE_PATH+'/metadata.dtd'),MYROOT(CACHE_PATH+'/metadata.dtd.backup'))
596
		else:
597
		else:
597
			must_fetch=0
598
			must_fetch=0
598
599
599
	except (OSError,IOError), e:
600
	except (OSError,IOError), e:
600
		if e.errno != 2:
601
		if e.errno != 2:
601
			print red("!!!")+" caught exception '%s' for %s/metadata.dtd, bailing" % (str(e), portage.CACHE_PATH)
602
			print red("!!!")+" caught exception '%s' for %s/metadata.dtd, bailing" % (str(e), MYROOT(CACHE_PATH))
602
			sys.exit(1)
603
			sys.exit(1)
603
604
604
	if must_fetch:
605
	if must_fetch:
Lines 609-622 Link Here
609
			fetcher=portage.get_preferred_fetcher()
610
			fetcher=portage.get_preferred_fetcher()
610
611
611
			val=fetcher.fetch("http://www.gentoo.org/dtd/metadata.dtd",file_name="%s/metadata.dtd" % 
612
			val=fetcher.fetch("http://www.gentoo.org/dtd/metadata.dtd",file_name="%s/metadata.dtd" % 
612
				portage.CACHE_PATH)
613
				MYROOT(CACHE_PATH))
613
			del fetcher
614
			del fetcher
614
			if not val:
615
			if not val:
615
				print "fetched."
616
				print "fetched."
616
				if backup_exists:
617
				if backup_exists:
617
					os.remove(portage.CACHE_PATH+'/metadata.dtd.backup')
618
					os.remove(MYROOT(CACHE_PATH+'/metadata.dtd.backup'))
618
				os.chown(portage.CACHE_PATH+'/metadata.dtd',os.getuid(),portage.portage_gid)
619
				os.chown(MYROOT(CACHE_PATH+'/metadata.dtd'),os.getuid(),portage.portage_gid)
619
				os.chmod(portage.CACHE_PATH+'/metadata.dtd',0664)
620
				os.chmod(MYROOT(CACHE_PATH+'/metadata.dtd'),0664)
620
621
621
		except SystemExit, e:
622
		except SystemExit, e:
622
			raise  # Need to propogate this
623
			raise  # Need to propogate this
Lines 627-633 Link Here
627
			val=0
628
			val=0
628
		if val:
629
		if val:
629
			if backup_exists:
630
			if backup_exists:
630
				os.rename(portage.CACHE_PATH+'/metadata.dtd.backup',portage.CACHE_PATH+'/metadata.dtd')
631
				os.rename(MYROOT(CACHE_PATH+'/metadata.dtd.backup'),sMYROOT(+CACHE_PATH+'/metadata.dtd'))
631
			print red("!!!")+" fetching new metadata.dtd failed, aborting"
632
			print red("!!!")+" fetching new metadata.dtd failed, aborting"
632
			sys.exit(1)
633
			sys.exit(1)
633
	#this can be problematic if xmllint changes their output
634
	#this can be problematic if xmllint changes their output
Lines 734-740 Link Here
734
						fails["digest.stray"].append(x+"/files/"+y)
735
						fails["digest.stray"].append(x+"/files/"+y)
735
				else:
736
				else:
736
					# We have an ebuild
737
					# We have an ebuild
737
					myuris,myfiles = portage.db["/"]["porttree"].dbapi.getfetchlist(mykey,all=True)
738
					myuris,myfiles = portage.db[MYROOT()]["porttree"].dbapi.getfetchlist(mykey,all=True)
738
					for entry in mydigests.keys():
739
					for entry in mydigests.keys():
739
						if entry not in myfiles:
740
						if entry not in myfiles:
740
							stats["digest.unused"] += 1
741
							stats["digest.unused"] += 1
Lines 756-762 Link Here
756
									stats["digest.unmatch"] += 1
757
									stats["digest.unmatch"] += 1
757
									fails["digest.unmatch"].append(y+"::"+myf)
758
									fails["digest.unmatch"].append(y+"::"+myf)
758
								else:
759
								else:
759
									eb_name,eb_location = portage.db["/"]["porttree"].dbapi.findname2(mykey)
760
									eb_name,eb_location = portage.db[MYROOT()]["porttree"].dbapi.findname2(mykey)
760
									portage.doebuild(eb_name, "digest", "/", uri_settings)
761
									portage.doebuild(eb_name, "digest", "/", uri_settings)
761
						else:
762
						else:
762
							if os.path.exists(myff):
763
							if os.path.exists(myff):
Lines 799-805 Link Here
799
	else:
800
	else:
800
		#Only carry out if in package directory or check forced
801
		#Only carry out if in package directory or check forced
801
		if xmllint_capable:
802
		if xmllint_capable:
802
			st=getstatusoutput("xmllint --noout --valid --dtdvalid %s/metadata.dtd %s/metadata.xml" % (portage.CACHE_PATH, checkdir))
803
			st=getstatusoutput("xmllint --noout --valid --dtdvalid %s/metadata.dtd %s/metadata.xml" % (MYROOT(CACHE_PATH), checkdir))
803
			if st[0] != 0:
804
			if st[0] != 0:
804
				for z in st[1].split("\n"):
805
				for z in st[1].split("\n"):
805
					print red("!!! ")+z
806
					print red("!!! ")+z
Lines 821-829 Link Here
821
			if mymode=="fix":
822
			if mymode=="fix":
822
				if "--pretend" in myoptions:
823
				if "--pretend" in myoptions:
823
					print "You will need to run:"
824
					print "You will need to run:"
824
					print "  /usr/sbin/ebuild "+repodir+"/"+x+"/"+y+".ebuild digest"
825
					print "  @prefix@/sbin/ebuild "+repodir+"/"+x+"/"+y+".ebuild digest"
825
				else:
826
				else:
826
					retval=os.system("/usr/sbin/ebuild "+repodir+"/"+x+"/"+y+".ebuild digest")
827
					retval=os.system("@prefix@/sbin/ebuild "+repodir+"/"+x+"/"+y+".ebuild digest")
827
					if retval:
828
					if retval:
828
						print "!!! Exiting on ebuild digest (shell) error code:",retval
829
						print "!!! Exiting on ebuild digest (shell) error code:",retval
829
						sys.exit(retval)
830
						sys.exit(retval)
Lines 841-847 Link Here
841
			fails["ebuild.namenomatch"].append(x+"/"+y+".ebuild")
842
			fails["ebuild.namenomatch"].append(x+"/"+y+".ebuild")
842
			continue
843
			continue
843
		try:
844
		try:
844
			myaux=portage.db["/"]["porttree"].dbapi.aux_get(catdir+"/"+y,allvars,strict=1)
845
			myaux=portage.db[MYROOT()]["porttree"].dbapi.aux_get(catdir+"/"+y,allvars,strict=1)
845
		except KeyError:
846
		except KeyError:
846
			stats["ebuild.syntax"]=stats["ebuild.syntax"]+1
847
			stats["ebuild.syntax"]=stats["ebuild.syntax"]+1
847
			fails["ebuild.syntax"].append(x+"/"+y+".ebuild")
848
			fails["ebuild.syntax"].append(x+"/"+y+".ebuild")
Lines 857-866 Link Here
857
		#		print "Bad RESTRICT value: %s" % x
858
		#		print "Bad RESTRICT value: %s" % x
858
859
859
		for pos in range(0,len(missingvars)):
860
		for pos in range(0,len(missingvars)):
860
			if portage.db["/"]["porttree"].dbapi.aux_get(catdir+"/"+y, [ missingvars[pos] ] )[0]=="":
861
			if portage.db[MYROOT()]["porttree"].dbapi.aux_get(catdir+"/"+y, [ missingvars[pos] ] )[0]=="":
861
				if missingvars[pos]=="IUSE":
862
				if missingvars[pos]=="IUSE":
862
					# We should rewrite here later. See #21544
863
					# We should rewrite here later. See #21544
863
					if not os.system("egrep '^IUSE=' "+repodir+"/"+x+"/"+y+".ebuild > /dev/null 2>&1"):
864
					if not os.system("@EGREP@ '^IUSE=' "+repodir+"/"+x+"/"+y+".ebuild > /dev/null 2>&1"):
864
						continue
865
						continue
865
				myqakey=missingvars[pos]+".missing"
866
				myqakey=missingvars[pos]+".missing"
866
				stats[myqakey]=stats[myqakey]+1
867
				stats[myqakey]=stats[myqakey]+1
Lines 870-876 Link Here
870
			arches=[[repoman_settings["ARCH"], repoman_settings["ARCH"], portage.groups]]
871
			arches=[[repoman_settings["ARCH"], repoman_settings["ARCH"], portage.groups]]
871
		else:
872
		else:
872
			arches=[]
873
			arches=[]
873
			for keyword in string.split(portage.db["/"]["porttree"].dbapi.aux_get(catdir+"/"+y,["KEYWORDS"])[0]):
874
			for keyword in string.split(portage.db[MYROOT()]["porttree"].dbapi.aux_get(catdir+"/"+y,["KEYWORDS"])[0]):
874
				if (keyword[0]=="-"):
875
				if (keyword[0]=="-"):
875
					continue
876
					continue
876
				elif (keyword[0]=="~"):
877
				elif (keyword[0]=="~"):
Lines 882-888 Link Here
882
		badlicsyntax = False
883
		badlicsyntax = False
883
		catpkg = catdir+"/"+y
884
		catpkg = catdir+"/"+y
884
		for mytype in ["DEPEND","RDEPEND","PDEPEND","LICENSE"]:
885
		for mytype in ["DEPEND","RDEPEND","PDEPEND","LICENSE"]:
885
			mydepstr = string.join(portage.db["/"]["porttree"].dbapi.aux_get(catpkg, [mytype]))
886
			mydepstr = string.join(portage.db[MYROOT()]["porttree"].dbapi.aux_get(catpkg, [mytype]))
886
			if (string.find(mydepstr, " ?") != -1):
887
			if (string.find(mydepstr, " ?") != -1):
887
				stats[mytype+".syntax"] += 1
888
				stats[mytype+".syntax"] += 1
888
				fails[mytype+".syntax"].append(catpkg+".ebuild "+mytype+": '?' preceded by space")
889
				fails[mytype+".syntax"].append(catpkg+".ebuild "+mytype+": '?' preceded by space")
Lines 932-941 Link Here
932
					portage.portdb=portage.portdbapi(portdir, dep_settings)
933
					portage.portdb=portage.portdbapi(portdir, dep_settings)
933
					arch_caches[arch]=[dep_settings, portage.portdb]
934
					arch_caches[arch]=[dep_settings, portage.portdb]
934
935
935
				portage.db["/"]["porttree"]=portage.portagetree("/",dep_settings.getvirtuals("/"))
936
				portage.db[MYROOT()]["porttree"]=portage.portagetree("/",dep_settings.getvirtuals("/"))
936
937
937
				for mytype,mypos in [["DEPEND",len(missingvars)],["RDEPEND",len(missingvars)+1],["PDEPEND",len(missingvars)+2]]:
938
				for mytype,mypos in [["DEPEND",len(missingvars)],["RDEPEND",len(missingvars)+1],["PDEPEND",len(missingvars)+2]]:
938
					if not catdir+"/"+y in portage.db["/"]["porttree"].dbapi.xmatch("list-visible",x):
939
					if not catdir+"/"+y in portage.db[MYROOT()]["porttree"].dbapi.xmatch("list-visible",x):
939
						#we are testing deps for a masked package; give it some lee-way
940
						#we are testing deps for a masked package; give it some lee-way
940
						suffix="masked"
941
						suffix="masked"
941
						matchmode="match-all"
942
						matchmode="match-all"
Lines 947-957 Link Here
947
						suffix=suffix+"indev"
948
						suffix=suffix+"indev"
948
949
949
					mykey=mytype+".bad"+suffix
950
					mykey=mytype+".bad"+suffix
950
					myvalue=string.join(portage.db["/"]["porttree"].dbapi.aux_get(catdir+"/"+y,[ mytype ]))
951
					myvalue=string.join(portage.db[MYROOT()]["porttree"].dbapi.aux_get(catdir+"/"+y,[ mytype ]))
951
					if not myvalue:
952
					if not myvalue:
952
						continue
953
						continue
953
					try:
954
					try:
954
						mydep=portage.dep_check(myvalue,portage.db["/"]["porttree"].dbapi,dep_settings,use="all",mode=matchmode)
955
						mydep=portage.dep_check(myvalue,portage.db[MYROOT()]["porttree"].dbapi,dep_settings,use="all",mode=matchmode)
955
					except KeyError, e:
956
					except KeyError, e:
956
						stats[mykey]=stats[mykey]+1
957
						stats[mykey]=stats[mykey]+1
957
						fails[mykey].append(x+"/"+y+".ebuild: "+keyword+" "+repr(e[0]))
958
						fails[mykey].append(x+"/"+y+".ebuild: "+keyword+" "+repr(e[0]))
Lines 977-987 Link Here
977
						fails[mykey].append(x+"/"+y+".ebuild: "+keyword+" "+repr(mydep[1]))
978
						fails[mykey].append(x+"/"+y+".ebuild: "+keyword+" "+repr(mydep[1]))
978
979
979
		# this check needs work, it won't catch (\ndie)
980
		# this check needs work, it won't catch (\ndie)
980
		if not os.system("egrep '^[^#]*\([^)]*\<die\>' "+checkdir+"/"+y+".ebuild >/dev/null 2>&1"):
981
		if not os.system("@EGREP@ '^[^#]*\([^)]*\<die\>' "+checkdir+"/"+y+".ebuild >/dev/null 2>&1"):
981
			stats["ebuild.nesteddie"]=stats["ebuild.nesteddie"]+1
982
			stats["ebuild.nesteddie"]=stats["ebuild.nesteddie"]+1
982
			fails["ebuild.nesteddie"].append(x+"/"+y+".ebuild")
983
			fails["ebuild.nesteddie"].append(x+"/"+y+".ebuild")
983
		# uselist checks - global
984
		# uselist checks - global
984
		myuse=string.split(portage.db["/"]["porttree"].dbapi.aux_get(catdir+"/"+y,["IUSE"])[0])
985
		myuse=string.split(portage.db[MYROOT()]["porttree"].dbapi.aux_get(catdir+"/"+y,["IUSE"])[0])
985
		for mypos in range(len(myuse)-1,-1,-1):
986
		for mypos in range(len(myuse)-1,-1,-1):
986
			if myuse[mypos] and (myuse[mypos] in uselist):
987
			if myuse[mypos] and (myuse[mypos] in uselist):
987
				del myuse[mypos]
988
				del myuse[mypos]
Lines 997-1003 Link Here
997
998
998
		# license checks
999
		# license checks
999
		if not badlicsyntax:
1000
		if not badlicsyntax:
1000
			myuse=portage.db["/"]["porttree"].dbapi.aux_get(catdir+"/"+y,["LICENSE"])[0]
1001
			myuse=portage.db[MYROOT()]["porttree"].dbapi.aux_get(catdir+"/"+y,["LICENSE"])[0]
1001
			# Parse the LICENSE variable, remove USE conditions and
1002
			# Parse the LICENSE variable, remove USE conditions and
1002
			# flatten it.
1003
			# flatten it.
1003
			myuse=portage_dep.use_reduce(portage_dep.paren_reduce(myuse), matchall=1)
1004
			myuse=portage_dep.use_reduce(portage_dep.paren_reduce(myuse), matchall=1)
Lines 1012-1018 Link Here
1012
					fails["LICENSE.invalid"].append(x+"/"+y+".ebuild: %s" % myuse[mypos])
1013
					fails["LICENSE.invalid"].append(x+"/"+y+".ebuild: %s" % myuse[mypos])
1013
1014
1014
		#keyword checks
1015
		#keyword checks
1015
		myuse=string.split(portage.db["/"]["porttree"].dbapi.aux_get(catdir+"/"+y,["KEYWORDS"])[0])
1016
		myuse=string.split(portage.db[MYROOT()]["porttree"].dbapi.aux_get(catdir+"/"+y,["KEYWORDS"])[0])
1016
		for mykey in myuse:
1017
		for mykey in myuse:
1017
			myskey=mykey[:]
1018
			myskey=mykey[:]
1018
			if myskey[0]=="-":
1019
			if myskey[0]=="-":
Lines 1116-1133 Link Here
1116
		fails["ebuild.allmasked"].append(x)
1117
		fails["ebuild.allmasked"].append(x)
1117
1118
1118
#Pickle and save results for instant reuse in last and lfull
1119
#Pickle and save results for instant reuse in last and lfull
1119
savef=open('/var/cache/edb/repo.stats','w')
1120
savef=open(MYROOT(CACHE_DIR+'/repo.stats'),'w')
1120
pickle.dump(stats,savef)
1121
pickle.dump(stats,savef)
1121
savef.close()
1122
savef.close()
1122
savef=open('/var/cache/edb/repo.fails','w')
1123
savef=open(MYROOT(CACHE_DIR+'/repo.fails'),'w')
1123
pickle.dump(fails,savef)
1124
pickle.dump(fails,savef)
1124
savef.close()
1125
savef.close()
1125
if not (os.stat('/var/cache/edb/repo.stats')[ST_GID] == getgrnam('portage')[2]):
1126
if not (os.stat(MYROOT(CACHE_DIR+'/repo.stats'))[ST_GID] == getgrnam('@portagegroup@')[2]):
1126
	os.chown('/var/cache/edb/repo.stats',os.geteuid(),getgrnam('portage')[2])
1127
	os.chown(MYROOT(CACHE_DIR+'/repo.stats'),os.geteuid(),getgrnam('@portagegroup@')[2])
1127
	os.chmod('/var/cache/edb/repo.stats',0664)
1128
	os.chmod(MYROOT(CACHE_DIR+'/repo.stats'),0664)
1128
if not (os.stat('/var/cache/edb/repo.fails')[ST_GID] == getgrnam('portage')[2]):
1129
if not (os.stat(MYROOT(CACHE_DIR+'/repo.fails'))[ST_GID] == getgrnam('@portagegroup@')[2]):
1129
	os.chown('/var/cache/edb/repo.fails',os.geteuid(),getgrnam('portage')[2])
1130
	os.chown(MYROOT(CACHE_DIR+'/repo.fails'),os.geteuid(),getgrnam('@portagegroup@')[2])
1130
	os.chmod('/var/cache/edb/repo.fails',0664)
1131
	os.chmod(MYROOT(CACHE_DIR+'/repo.fails'),0664)
1131
print
1132
print
1132
#dofail will be set to 1 if we have failed in at least one non-warning category
1133
#dofail will be set to 1 if we have failed in at least one non-warning category
1133
dofail=0
1134
dofail=0
Lines 1241-1250 Link Here
1241
	if myautoadd:
1242
	if myautoadd:
1242
		print ">>> Auto-Adding missing digests..."
1243
		print ">>> Auto-Adding missing digests..."
1243
		if "--pretend" in myoptions:
1244
		if "--pretend" in myoptions:
1244
			print "(/usr/bin/cvs add "+string.join(myautoadd)+")"
1245
			print "(@CVS@ add "+string.join(myautoadd)+")"
1245
			retval=0
1246
			retval=0
1246
		else:
1247
		else:
1247
			retval=os.system("/usr/bin/cvs add "+string.join(myautoadd))
1248
			retval=os.system("@CVS@ add "+string.join(myautoadd))
1248
		if retval:
1249
		if retval:
1249
			print "!!! Exiting on cvs (shell) error code:",retval
1250
			print "!!! Exiting on cvs (shell) error code:",retval
1250
			sys.exit(retval)
1251
			sys.exit(retval)
Lines 1265-1274 Link Here
1265
		for x in mymissing:
1266
		for x in mymissing:
1266
			print "   ",x
1267
			print "   ",x
1267
		if "--pretend" in myoptions:
1268
		if "--pretend" in myoptions:
1268
			print "(/usr/bin/cvs -q up "+string.join(mymissing)+")"
1269
			print "(@CVS@ -q up "+string.join(mymissing)+")"
1269
			retval=0
1270
			retval=0
1270
		else:
1271
		else:
1271
			retval=os.system("/usr/bin/cvs -q up "+string.join(mymissing))
1272
			retval=os.system("@CVS@ -q up "+string.join(mymissing))
1272
		if retval:
1273
		if retval:
1273
			print "!!! Exiting on cvs (shell) error code:",retval
1274
			print "!!! Exiting on cvs (shell) error code:",retval
1274
			sys.exit(retval)
1275
			sys.exit(retval)
Lines 1277-1283 Link Here
1277
	retval=["",""]
1278
	retval=["",""]
1278
	if isCvs:
1279
	if isCvs:
1279
		print "Performing a "+green("cvs -n up")+" with a little magic grep to check for updates."
1280
		print "Performing a "+green("cvs -n up")+" with a little magic grep to check for updates."
1280
		retval=getstatusoutput("/usr/bin/cvs -n up 2>&1 | egrep '^[^\?] .*' | egrep -v '^. .*/digest-[^/]+|^cvs server: .* -- ignored$'")
1281
		retval=getstatusoutput("@CVS@ -n up 2>&1 | @EGREP@ '^[^\?] .*' | @EGREP@ -v '^. .*/digest-[^/]+|^cvs server: .* -- ignored$'")
1281
		
1282
		
1282
	mylines=string.split(retval[1], "\n")
1283
	mylines=string.split(retval[1], "\n")
1283
	myupdates=[]
1284
	myupdates=[]
Lines 1296-1305 Link Here
1296
	if myupdates:
1297
	if myupdates:
1297
		print green("Fetching trivial updates...")
1298
		print green("Fetching trivial updates...")
1298
		if "--pretend" in myoptions:
1299
		if "--pretend" in myoptions:
1299
			print "(/usr/bin/cvs up "+string.join(myupdates)+")"
1300
			print "(@CVS@ up "+string.join(myupdates)+")"
1300
			retval=0
1301
			retval=0
1301
		else:
1302
		else:
1302
			retval=os.system("/usr/bin/cvs up "+string.join(myupdates))
1303
			retval=os.system("@CVS@ up "+string.join(myupdates))
1303
		if retval!=0:
1304
		if retval!=0:
1304
			print "!!! cvs exited with an error. Terminating."
1305
			print "!!! cvs exited with an error. Terminating."
1305
			sys.exit(retval)
1306
			sys.exit(retval)
Lines 1323-1329 Link Here
1323
	headerstring="'\$(Header|Id)"
1324
	headerstring="'\$(Header|Id)"
1324
	headerstring+=".*\$'"
1325
	headerstring+=".*\$'"
1325
	for myfile in myupdates:
1326
	for myfile in myupdates:
1326
		myout=getstatusoutput("egrep -q "+headerstring+" "+myfile)
1327
		myout=getstatusoutput("@EGREP@ -q "+headerstring+" "+myfile)
1327
		if myout[0]==0:
1328
		if myout[0]==0:
1328
			myheaders.append(myfile)
1329
			myheaders.append(myfile)
1329
1330
Lines 1371-1380 Link Here
1371
		print
1372
		print
1372
1373
1373
		if "--pretend" in myoptions:
1374
		if "--pretend" in myoptions:
1374
			print "(/usr/bin/cvs -q commit -F "+commitmessagefile+")"
1375
			print "(@CVS@ -q commit -F "+commitmessagefile+")"
1375
			retval=0
1376
			retval=0
1376
		else:
1377
		else:
1377
			retval=os.system("/usr/bin/cvs -q commit -F "+commitmessagefile)
1378
			retval=os.system("@CVS@ -q commit -F "+commitmessagefile)
1378
		if retval:
1379
		if retval:
1379
			print "!!! Exiting on cvs (shell) error code:",retval
1380
			print "!!! Exiting on cvs (shell) error code:",retval
1380
			sys.exit(retval)
1381
			sys.exit(retval)
Lines 1446-1452 Link Here
1446
			sys.exit(1)
1447
			sys.exit(1)
1447
1448
1448
	if "--pretend" in myoptions:
1449
	if "--pretend" in myoptions:
1449
		print "(/usr/bin/cvs -q commit -F "+commitmessagefile+")"
1450
		print "(@CVS@ -q commit -F "+commitmessagefile+")"
1450
	else:
1451
	else:
1451
		mymsg=open(commitmessagefile,"a")
1452
		mymsg=open(commitmessagefile,"a")
1452
		mymsg.write(" (Manifest recommit)")
1453
		mymsg.write(" (Manifest recommit)")
Lines 1456-1462 Link Here
1456
			print "Failed to insert portage version in message!"
1457
			print "Failed to insert portage version in message!"
1457
			mymsg.write("\n(Portage version: Unknown)")
1458
			mymsg.write("\n(Portage version: Unknown)")
1458
		mymsg.close()
1459
		mymsg.close()
1459
		retval=os.system("/usr/bin/cvs -q commit -F "+commitmessagefile)
1460
		retval=os.system("@CVS@ -q commit -F "+commitmessagefile)
1460
		if retval:
1461
		if retval:
1461
			print "!!! Exiting on cvs (shell) error code:",retval
1462
			print "!!! Exiting on cvs (shell) error code:",retval
1462
			sys.exit(retval)
1463
			sys.exit(retval)
(-)portage-cvs/bin/xpak (-2 / +2 lines)
Lines 1-4 Link Here
1
#!/usr/bin/python -O
1
#! @PYTHON@ -O
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
Lines 8-14 Link Here
8
	print "xpak: expecting three arguments."
8
	print "xpak: expecting three arguments."
9
	sys.exit(1)
9
	sys.exit(1)
10
10
11
sys.path = ["/usr/lib/portage/pym"]+sys.path
11
sys.path = ["@PORTAGE_BASE@/pym"]+sys.path
12
12
13
import xpak
13
import xpak
14
xpak.xpak(sys.argv[1],sys.argv[2])
14
xpak.xpak(sys.argv[1],sys.argv[2])
(-)portage-cvs/cnf/Makefile.in (+63 lines)
Line 0 Link Here
1
sysconfdir = @prefix@/etc
2
ARCH = @ARCH@
3
4
srcdir=@srcdir@
5
top_builddir=@top_builddir@
6
7
portageuser = @portageuser@
8
portagegroup = @portagegroup@
9
10
INSTALL = @INSTALL@
11
INSTALL_cnf = @INSTALL_PROGRAM@ -o $(portageuser) -g $(portagegroup) -m 644
12
INSTALL_cnfsubst = $(SHELL) ${top_builddir}/subst-install --installcmd='${INSTALL_cnf}'
13
14
list_sourcedir = \
15
	  ( cd ${srcdir} \
16
	&& find . -name 'CVS' -prune \
17
		   -o -name 'Makefile*' -prune \
18
		   -o -name 'make.*' -type f -print \
19
		   -o -name 'dispatch-conf.conf' -type f -print \
20
		   -o -name 'etc-update.conf' -type f -print \
21
	 )
22
23
all:
24
25
install:
26
	$(INSTALL) -d -m 755 -o $(portageuser) -g $(portagegroup) $(DESTDIR)$(sysconfdir)
27
	@ if [ -f $(srcdir)/make.globals.$(ARCH) ] \
28
	; then echo "$(INSTALL_cnfsubst) $(srcdir)/make.globals.$(ARCH) $(DESTDIR)$(sysconfdir)/make.globals" \
29
		 ; $(INSTALL_cnfsubst) $(srcdir)/make.globals.$(ARCH) $(DESTDIR)$(sysconfdir)/make.globals \
30
		 ; echo "$(INSTALL_cnfsubst) $(srcdir)/make.conf.$(ARCH) $(DESTDIR)$(sysconfdir)/make.conf.example" \
31
		 ; $(INSTALL_cnfsubst) $(srcdir)/make.conf.$(ARCH) $(DESTDIR)$(sysconfdir)/make.conf.example \
32
	; else echo "" \
33
		 ; echo "Portage does not have an arch-specific configuration for this arch." \
34
		 ; echo "Please notify the arch maintainer about this issue. Using generic." \
35
		 ; echo "" \
36
		 ; echo "$(INSTALL_cnfsubst) $(srcdir)/make.globals $(DESTDIR)$(sysconfdir)/make.globals" \
37
		 ; $(INSTALL_cnfsubst) $(srcdir)/make.globals $(DESTDIR)$(sysconfdir)/make.globals \
38
		 ; echo "$(INSTALL_cnfsubst) $(srcdir)/make.conf $(DESTDIR)$(sysconfdir)/make.conf.example" \
39
		 ; $(INSTALL_cnfsubst) $(srcdir)/make.conf $(DESTDIR)$(sysconfdir)/make.conf.example \
40
	; fi
41
	@ for p in etc-update dispatch-conf \
42
	; do echo "$(INSTALL_cnfsubst) $(srcdir)/$${p}.conf $(DESTDIR)$(sysconfdir)/$${p}.conf" \
43
	   ; $(INSTALL_cnfsubst) $(srcdir)/$${p}.conf $(DESTDIR)$(sysconfdir)/$${p}.conf \
44
	; done
45
46
uninstall:
47
	@ echo rm -f $(DESTDIR)$(sysconfdir)/make.conf.example \
48
	; rm -f $(DESTDIR)$(sysconfdir)/make.conf.example \
49
	; echo rm -f $(DESTDIR)$(sysconfdir)/make.globals \
50
	; rm -f $(DESTDIR)$(sysconfdir)/make.globals \
51
52
distdir:
53
	$(list_sourcedir) | while read f \
54
	; do echo $(INSTALL_cnf) ${srcdir}/$${f} $(distdir)/$${f} \
55
	   ; $(INSTALL_cnf) ${srcdir}/$${f} $(distdir)/$${f} \
56
	; done
57
58
all dvi check installcheck:
59
clean distclean maintainer-clean:
60
61
.PHONY: all install distdir uninstall
62
.PHONY: dvi check installcheck
63
.PHONY: clean distclean maintainer-clean
(-)portage-cvs/cnf/dispatch-conf.conf (-2 / +2 lines)
Lines 3-9 Link Here
3
#
3
#
4
4
5
# Directory to archive replaced configs
5
# Directory to archive replaced configs
6
archive-dir=/etc/config-archive
6
archive-dir=/@affix@etc/config-archive
7
7
8
# Use rcs for storing files in the archive directory?
8
# Use rcs for storing files in the archive directory?
9
# (yes or no)
9
# (yes or no)
Lines 28-31 Link Here
28
replace-unmodified=no
28
replace-unmodified=no
29
29
30
# Per-session log file of changes made to configuration files
30
# Per-session log file of changes made to configuration files
31
#log-file=/var/log/dispatch-conf.log
31
#log-file=/@affix@var/log/dispatch-conf.log
(-)portage-cvs/cnf/make.conf (-14 / +14 lines)
Lines 15-21 Link Here
15
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1
15
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1
16
#
16
#
17
# The available list of use flags with descriptions is in your portage tree.
17
# The available list of use flags with descriptions is in your portage tree.
18
# Use 'less' to view them:  --> less /usr/portage/profiles/use.desc <--
18
# Use 'less' to view them:  --> less @prefix@/portage/profiles/use.desc <--
19
#
19
#
20
# 'ufed' is an ncurses/dialog interface available in portage to make handling
20
# 'ufed' is an ncurses/dialog interface available in portage to make handling
21
# useflags for you. 'emerge app-portage/ufed'
21
# useflags for you. 'emerge app-portage/ufed'
Lines 30-36 Link Here
30
# Change this line as appropriate (i686, i586, i486 or i386).
30
# Change this line as appropriate (i686, i586, i486 or i386).
31
# All modern systems (even Athlons) should use "i686-pc-linux-gnu".
31
# All modern systems (even Athlons) should use "i686-pc-linux-gnu".
32
# All K6's are i586.
32
# All K6's are i586.
33
CHOST="i686-pc-linux-gnu"
33
CHOST="@target@"
34
34
35
# Host and optimization settings 
35
# Host and optimization settings 
36
# ==============================
36
# ==============================
Lines 106-118 Link Here
106
# PORTAGE_TMPDIR is the location portage will use for compilations and
106
# PORTAGE_TMPDIR is the location portage will use for compilations and
107
#     temporary storage of data. This can get VERY large depending upon
107
#     temporary storage of data. This can get VERY large depending upon
108
#     the application being installed.
108
#     the application being installed.
109
#PORTAGE_TMPDIR=/var/tmp
109
#PORTAGE_TMPDIR=/@affix@var/tmp
110
#
110
#
111
# PORTDIR is the location of the portage tree. This is the repository
111
# PORTDIR is the location of the portage tree. This is the repository
112
#     for all profile information as well as all ebuilds. This directory
112
#     for all profile information as well as all ebuilds. This directory
113
#     itself can reach 200M. If you change this, you must update your
113
#     itself can reach 200M. If you change this, you must update your
114
#     /etc/make.profile symlink accordingly.
114
#     /@affix@etc/make.profile symlink accordingly.
115
#PORTDIR=/usr/portage
115
#PORTDIR=@prefix@/portage
116
#
116
#
117
# DISTDIR is where all of the source code tarballs will be placed for
117
# DISTDIR is where all of the source code tarballs will be placed for
118
#     emerges. The source code is maintained here unless you delete
118
#     emerges. The source code is maintained here unless you delete
Lines 132-138 Link Here
132
#     providing a directory. Permissions will be modified as needed IF the
132
#     providing a directory. Permissions will be modified as needed IF the
133
#     directory exists, otherwise logging will be disabled. NNNN is the
133
#     directory exists, otherwise logging will be disabled. NNNN is the
134
#     increment at the time the log is created. Logs are thus sequential.
134
#     increment at the time the log is created. Logs are thus sequential.
135
#PORT_LOGDIR=/var/log/portage
135
#PORT_LOGDIR=/@affix@var/log/portage
136
#
136
#
137
# PORTDIR_OVERLAY is a directory where local ebuilds may be stored without
137
# PORTDIR_OVERLAY is a directory where local ebuilds may be stored without
138
#     concern that they will be deleted by rsync updates. Default is not
138
#     concern that they will be deleted by rsync updates. Default is not
Lines 143-149 Link Here
143
# ==============
143
# ==============
144
#
144
#
145
# If you need to set a proxy for wget or lukemftp, add the appropriate "export
145
# If you need to set a proxy for wget or lukemftp, add the appropriate "export
146
# ftp_proxy=<proxy>" and "export http_proxy=<proxy>" lines to /etc/profile if
146
# ftp_proxy=<proxy>" and "export http_proxy=<proxy>" lines to /@affix@etc/profile if
147
# all users on your system should use them.
147
# all users on your system should use them.
148
#
148
#
149
# Portage uses wget by default. Here are some settings for some alternate
149
# Portage uses wget by default. Here are some settings for some alternate
Lines 151-162 Link Here
151
# will be available.
151
# will be available.
152
#
152
#
153
# Default fetch command (5 tries, passive ftp for firewall compatibility)
153
# Default fetch command (5 tries, passive ftp for firewall compatibility)
154
#FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
154
#FETCHCOMMAND="@WGET@ -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
155
#RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
155
#RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
156
#
156
#
157
# Using wget, ratelimiting downloads
157
# Using wget, ratelimiting downloads
158
#FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
158
#FETCHCOMMAND="@WGET@ -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
159
#RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
159
#RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
160
#
160
#
161
# Lukemftp (BSD ftp):
161
# Lukemftp (BSD ftp):
162
#FETCHCOMMAND="/usr/bin/lukemftp -s -a -o \${DISTDIR}/\${FILE} \${URI}"
162
#FETCHCOMMAND="/usr/bin/lukemftp -s -a -o \${DISTDIR}/\${FILE} \${URI}"
Lines 301-307 Link Here
301
#  'distcc'      enables distcc support via CC.
301
#  'distcc'      enables distcc support via CC.
302
#  'distlocks'   enables distfiles locking using fcntl or hardlinks. This
302
#  'distlocks'   enables distfiles locking using fcntl or hardlinks. This
303
#                is enabled by default. Tools exist to help clean the locks
303
#                is enabled by default. Tools exist to help clean the locks
304
#                after crashes: /usr/lib/portage/bin/clean_locks.
304
#                after crashes: @PORTAGE_BASE@/bin/clean_locks.
305
#  'fixpackages' allows portage to fix binary packages that are stored in
305
#  'fixpackages' allows portage to fix binary packages that are stored in
306
#                PKGDIR. This can consume a lot of time. 'fixpackages' is
306
#                PKGDIR. This can consume a lot of time. 'fixpackages' is
307
#                also a script that can be run at any given time to force
307
#                also a script that can be run at any given time to force
Lines 347-353 Link Here
347
#     2G, and will be set if not defined otherwise and ccache is in features. 
347
#     2G, and will be set if not defined otherwise and ccache is in features. 
348
#     Portage will set the default ccache dir if it is not present in the
348
#     Portage will set the default ccache dir if it is not present in the
349
#     user's environment, for userpriv it sets: ${PORTAGE_TMPDIR}/ccache
349
#     user's environment, for userpriv it sets: ${PORTAGE_TMPDIR}/ccache
350
#     (/var/tmp/ccache), and for regular use the default is /root/.ccache.
350
#     (/@affix@var/tmp/ccache), and for regular use the default is /root/.ccache.
351
#     Sizes are specified with 'G' 'M' or 'K'.
351
#     Sizes are specified with 'G' 'M' or 'K'.
352
#     '2G' for 2 gigabytes, '2048M' for 2048 megabytes (same as 2G).
352
#     '2G' for 2 gigabytes, '2048M' for 2048 megabytes (same as 2G).
353
#CCACHE_SIZE="512M"
353
#CCACHE_SIZE="512M"
Lines 360-366 Link Here
360
#     consideration. This may cause dependency failures if you are not careful.
360
#     consideration. This may cause dependency failures if you are not careful.
361
#     The file format is one pattern per line, blanks and ';' or '#' lines are
361
#     The file format is one pattern per line, blanks and ';' or '#' lines are
362
#     comments. See 'man rsync' for more details on the exclude-from format.
362
#     comments. See 'man rsync' for more details on the exclude-from format.
363
#RSYNC_EXCLUDEFROM=/etc/portage/rsync_excludes
363
#RSYNC_EXCLUDEFROM=/@affix@etc/portage/rsync_excludes
364
364
365
# logging related variables:
365
# logging related variables:
366
# PORTAGE_LOG_CLASSES: selects messages to be logged, possible values are:
366
# PORTAGE_LOG_CLASSES: selects messages to be logged, possible values are:
(-)portage-cvs/cnf/make.conf.alpha (-14 / +14 lines)
Lines 15-21 Link Here
15
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1
15
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1
16
#
16
#
17
# The available list of use flags with descriptions is in your portage tree.
17
# The available list of use flags with descriptions is in your portage tree.
18
# Use 'less' to view them:  --> less /usr/portage/profiles/use.desc <--
18
# Use 'less' to view them:  --> less @prefix@/portage/profiles/use.desc <--
19
#
19
#
20
# 'ufed' is an ncurses/dialog interface available in portage to make handling
20
# 'ufed' is an ncurses/dialog interface available in portage to make handling
21
# useflags for you. 'emerge app-portage/ufed'
21
# useflags for you. 'emerge app-portage/ufed'
Lines 32-38 Link Here
32
# either alphaev6-unknown-linux-gnu or alphaev67-unknown-linux-gnu accordingly.
32
# either alphaev6-unknown-linux-gnu or alphaev67-unknown-linux-gnu accordingly.
33
#
33
#
34
#CHOST="alphaev67-unknown-linux-gnu"
34
#CHOST="alphaev67-unknown-linux-gnu"
35
CHOST="alpha-unknown-linux-gnu"
35
CHOST="@target@"
36
36
37
# Host and optimization settings 
37
# Host and optimization settings 
38
# ==============================
38
# ==============================
Lines 92-104 Link Here
92
# PORTAGE_TMPDIR is the location portage will use for compilations and
92
# PORTAGE_TMPDIR is the location portage will use for compilations and
93
#     temporary storage of data. This can get VERY large depending upon
93
#     temporary storage of data. This can get VERY large depending upon
94
#     the application being installed.
94
#     the application being installed.
95
#PORTAGE_TMPDIR=/var/tmp
95
#PORTAGE_TMPDIR=/@affix@var/tmp
96
#
96
#
97
# PORTDIR is the location of the portage tree. This is the repository
97
# PORTDIR is the location of the portage tree. This is the repository
98
#     for all profile information as well as all ebuilds. This directory
98
#     for all profile information as well as all ebuilds. This directory
99
#     itself can reach 200M. If you change this, you must update your
99
#     itself can reach 200M. If you change this, you must update your
100
#     /etc/make.profile symlink accordingly.
100
#     /@affix@etc/make.profile symlink accordingly.
101
#PORTDIR=/usr/portage
101
#PORTDIR=@prefix@/portage
102
#
102
#
103
# DISTDIR is where all of the source code tarballs will be placed for
103
# DISTDIR is where all of the source code tarballs will be placed for
104
#     emerges. The source code is maintained here unless you delete
104
#     emerges. The source code is maintained here unless you delete
Lines 118-124 Link Here
118
#     providing a directory. Permissions will be modified as needed IF the
118
#     providing a directory. Permissions will be modified as needed IF the
119
#     directory exists, otherwise logging will be disabled. NNNN is the
119
#     directory exists, otherwise logging will be disabled. NNNN is the
120
#     increment at the time the log is created. Logs are thus sequential.
120
#     increment at the time the log is created. Logs are thus sequential.
121
#PORT_LOGDIR=/var/log/portage
121
#PORT_LOGDIR=/@affix@var/log/portage
122
#
122
#
123
# PORTDIR_OVERLAY is a directory where local ebuilds may be stored without
123
# PORTDIR_OVERLAY is a directory where local ebuilds may be stored without
124
#     concern that they will be deleted by rsync updates. Default is not
124
#     concern that they will be deleted by rsync updates. Default is not
Lines 129-135 Link Here
129
# ==============
129
# ==============
130
#
130
#
131
# If you need to set a proxy for wget or lukemftp, add the appropriate "export
131
# If you need to set a proxy for wget or lukemftp, add the appropriate "export
132
# ftp_proxy=<proxy>" and "export http_proxy=<proxy>" lines to /etc/profile if
132
# ftp_proxy=<proxy>" and "export http_proxy=<proxy>" lines to /@affix@etc/profile if
133
# all users on your system should use them.
133
# all users on your system should use them.
134
#
134
#
135
# Portage uses wget by default. Here are some settings for some alternate
135
# Portage uses wget by default. Here are some settings for some alternate
Lines 137-148 Link Here
137
# will be available.
137
# will be available.
138
#
138
#
139
# Default fetch command (5 tries, passive ftp for firewall compatibility)
139
# Default fetch command (5 tries, passive ftp for firewall compatibility)
140
#FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
140
#FETCHCOMMAND="@WGET@ -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
141
#RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
141
#RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
142
#
142
#
143
# Using wget, ratelimiting downloads
143
# Using wget, ratelimiting downloads
144
#FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
144
#FETCHCOMMAND="@WGET@ -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
145
#RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
145
#RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
146
#
146
#
147
# Lukemftp (BSD ftp):
147
# Lukemftp (BSD ftp):
148
#FETCHCOMMAND="/usr/bin/lukemftp -s -a -o \${DISTDIR}/\${FILE} \${URI}"
148
#FETCHCOMMAND="/usr/bin/lukemftp -s -a -o \${DISTDIR}/\${FILE} \${URI}"
Lines 251-257 Link Here
251
#  'distcc'      enables distcc support via CC.
251
#  'distcc'      enables distcc support via CC.
252
#  'distlocks'   enables distfiles locking using fcntl or hardlinks. This
252
#  'distlocks'   enables distfiles locking using fcntl or hardlinks. This
253
#                is enabled by default. Tools exist to help clean the locks
253
#                is enabled by default. Tools exist to help clean the locks
254
#                after crashes: /usr/lib/portage/bin/clean_locks.
254
#                after crashes: @PORTAGE_BASE@/bin/clean_locks.
255
#  'fixpackages' allows portage to fix binary packages that are stored in
255
#  'fixpackages' allows portage to fix binary packages that are stored in
256
#                PKGDIR. This can consume a lot of time. 'fixpackages' is
256
#                PKGDIR. This can consume a lot of time. 'fixpackages' is
257
#                also a script that can be run at any given time to force
257
#                also a script that can be run at any given time to force
Lines 285-291 Link Here
285
#     2G, and will be set if not defined otherwise and ccache is in features. 
285
#     2G, and will be set if not defined otherwise and ccache is in features. 
286
#     Portage will set the default ccache dir if it is not present in the
286
#     Portage will set the default ccache dir if it is not present in the
287
#     user's environment, for userpriv it sets: ${PORTAGE_TMPDIR}/ccache
287
#     user's environment, for userpriv it sets: ${PORTAGE_TMPDIR}/ccache
288
#     (/var/tmp/ccache), and for regular use the default is /root/.ccache.
288
#     (/@affix@var/tmp/ccache), and for regular use the default is /root/.ccache.
289
#     Sizes are specified with 'G' 'M' or 'K'.
289
#     Sizes are specified with 'G' 'M' or 'K'.
290
#     '2G' for 2 gigabytes, '2048M' for 2048 megabytes (same as 2G).
290
#     '2G' for 2 gigabytes, '2048M' for 2048 megabytes (same as 2G).
291
#CCACHE_SIZE="512M"
291
#CCACHE_SIZE="512M"
Lines 298-304 Link Here
298
#     consideration. This may cause dependency failures if you are not careful.
298
#     consideration. This may cause dependency failures if you are not careful.
299
#     The file format is one pattern per line, blanks and ';' or '#' lines are
299
#     The file format is one pattern per line, blanks and ';' or '#' lines are
300
#     comments. See 'man rsync' for more details on the exclude-from format.
300
#     comments. See 'man rsync' for more details on the exclude-from format.
301
#RSYNC_EXCLUDEFROM=/etc/portage/rsync_excludes
301
#RSYNC_EXCLUDEFROM=/@affix@etc/portage/rsync_excludes
302
302
303
# logging related variables:
303
# logging related variables:
304
# PORTAGE_LOG_CLASSES: selects messages to be logged, possible values are:
304
# PORTAGE_LOG_CLASSES: selects messages to be logged, possible values are:
(-)portage-cvs/cnf/make.conf.amd64 (-14 / +14 lines)
Lines 15-21 Link Here
15
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1
15
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1
16
#
16
#
17
# The available list of use flags with descriptions is in your portage tree.
17
# The available list of use flags with descriptions is in your portage tree.
18
# Use 'less' to view them:  --> less /usr/portage/profiles/use.desc <--
18
# Use 'less' to view them:  --> less @prefix@/portage/profiles/use.desc <--
19
#
19
#
20
# 'ufed' is an ncurses/dialog interface available in portage to make handling
20
# 'ufed' is an ncurses/dialog interface available in portage to make handling
21
# useflags for you. 'emerge app-portage/ufed'
21
# useflags for you. 'emerge app-portage/ufed'
Lines 26-32 Link Here
26
# Host Setting
26
# Host Setting
27
# ============
27
# ============
28
#
28
#
29
CHOST="x86_64-pc-linux-gnu"
29
CHOST="@target@"
30
30
31
# Host and optimization settings 
31
# Host and optimization settings 
32
# ==============================
32
# ==============================
Lines 103-115 Link Here
103
# PORTAGE_TMPDIR is the location portage will use for compilations and
103
# PORTAGE_TMPDIR is the location portage will use for compilations and
104
#     temporary storage of data. This can get VERY large depending upon
104
#     temporary storage of data. This can get VERY large depending upon
105
#     the application being installed.
105
#     the application being installed.
106
#PORTAGE_TMPDIR=/var/tmp
106
#PORTAGE_TMPDIR=/@affix@var/tmp
107
#
107
#
108
# PORTDIR is the location of the portage tree. This is the repository
108
# PORTDIR is the location of the portage tree. This is the repository
109
#     for all profile information as well as all ebuilds. This directory
109
#     for all profile information as well as all ebuilds. This directory
110
#     itself can reach 200M. If you change this, you must update your
110
#     itself can reach 200M. If you change this, you must update your
111
#     /etc/make.profile symlink accordingly.
111
#     /@affix@etc/make.profile symlink accordingly.
112
#PORTDIR=/usr/portage
112
#PORTDIR=@prefix@/portage
113
#
113
#
114
# DISTDIR is where all of the source code tarballs will be placed for
114
# DISTDIR is where all of the source code tarballs will be placed for
115
#     emerges. The source code is maintained here unless you delete
115
#     emerges. The source code is maintained here unless you delete
Lines 129-135 Link Here
129
#     providing a directory. Permissions will be modified as needed IF the
129
#     providing a directory. Permissions will be modified as needed IF the
130
#     directory exists, otherwise logging will be disabled. NNNN is the
130
#     directory exists, otherwise logging will be disabled. NNNN is the
131
#     increment at the time the log is created. Logs are thus sequential.
131
#     increment at the time the log is created. Logs are thus sequential.
132
#PORT_LOGDIR=/var/log/portage
132
#PORT_LOGDIR=/@affix@var/log/portage
133
#
133
#
134
# PORTDIR_OVERLAY is a directory where local ebuilds may be stored without
134
# PORTDIR_OVERLAY is a directory where local ebuilds may be stored without
135
#     concern that they will be deleted by rsync updates. Default is not
135
#     concern that they will be deleted by rsync updates. Default is not
Lines 140-146 Link Here
140
# ==============
140
# ==============
141
#
141
#
142
# If you need to set a proxy for wget or lukemftp, add the appropriate "export
142
# If you need to set a proxy for wget or lukemftp, add the appropriate "export
143
# ftp_proxy=<proxy>" and "export http_proxy=<proxy>" lines to /etc/profile if
143
# ftp_proxy=<proxy>" and "export http_proxy=<proxy>" lines to /@affix@etc/profile if
144
# all users on your system should use them.
144
# all users on your system should use them.
145
#
145
#
146
# Portage uses wget by default. Here are some settings for some alternate
146
# Portage uses wget by default. Here are some settings for some alternate
Lines 148-159 Link Here
148
# will be available.
148
# will be available.
149
#
149
#
150
# Default fetch command (5 tries, passive ftp for firewall compatibility)
150
# Default fetch command (5 tries, passive ftp for firewall compatibility)
151
#FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
151
#FETCHCOMMAND="@WGET@ -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
152
#RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
152
#RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
153
#
153
#
154
# Using wget, ratelimiting downloads
154
# Using wget, ratelimiting downloads
155
#FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
155
#FETCHCOMMAND="@WGET@ -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
156
#RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
156
#RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
157
#
157
#
158
# Lukemftp (BSD ftp):
158
# Lukemftp (BSD ftp):
159
#FETCHCOMMAND="/usr/bin/lukemftp -s -a -o \${DISTDIR}/\${FILE} \${URI}"
159
#FETCHCOMMAND="/usr/bin/lukemftp -s -a -o \${DISTDIR}/\${FILE} \${URI}"
Lines 262-268 Link Here
262
#  'distcc'      enables distcc support via CC.
262
#  'distcc'      enables distcc support via CC.
263
#  'distlocks'   enables distfiles locking using fcntl or hardlinks. This
263
#  'distlocks'   enables distfiles locking using fcntl or hardlinks. This
264
#                is enabled by default. Tools exist to help clean the locks
264
#                is enabled by default. Tools exist to help clean the locks
265
#                after crashes: /usr/lib/portage/bin/clean_locks.
265
#                after crashes: @PORTAGE_BASE@/bin/clean_locks.
266
#  'fixpackages' allows portage to fix binary packages that are stored in
266
#  'fixpackages' allows portage to fix binary packages that are stored in
267
#                PKGDIR. This can consume a lot of time. 'fixpackages' is
267
#                PKGDIR. This can consume a lot of time. 'fixpackages' is
268
#                also a script that can be run at any given time to force
268
#                also a script that can be run at any given time to force
Lines 296-302 Link Here
296
#     2G, and will be set if not defined otherwise and ccache is in features. 
296
#     2G, and will be set if not defined otherwise and ccache is in features. 
297
#     Portage will set the default ccache dir if it is not present in the
297
#     Portage will set the default ccache dir if it is not present in the
298
#     user's environment, for userpriv it sets: ${PORTAGE_TMPDIR}/ccache
298
#     user's environment, for userpriv it sets: ${PORTAGE_TMPDIR}/ccache
299
#     (/var/tmp/ccache), and for regular use the default is /root/.ccache.
299
#     (/@affix@var/tmp/ccache), and for regular use the default is /root/.ccache.
300
#     Sizes are specified with 'G' 'M' or 'K'.
300
#     Sizes are specified with 'G' 'M' or 'K'.
301
#     '2G' for 2 gigabytes, '2048M' for 2048 megabytes (same as 2G).
301
#     '2G' for 2 gigabytes, '2048M' for 2048 megabytes (same as 2G).
302
#CCACHE_SIZE="512M"
302
#CCACHE_SIZE="512M"
Lines 309-315 Link Here
309
#     consideration. This may cause dependency failures if you are not careful.
309
#     consideration. This may cause dependency failures if you are not careful.
310
#     The file format is one pattern per line, blanks and ';' or '#' lines are
310
#     The file format is one pattern per line, blanks and ';' or '#' lines are
311
#     comments. See 'man rsync' for more details on the exclude-from format.
311
#     comments. See 'man rsync' for more details on the exclude-from format.
312
#RSYNC_EXCLUDEFROM=/etc/portage/rsync_excludes
312
#RSYNC_EXCLUDEFROM=/@affix@etc/portage/rsync_excludes
313
313
314
# logging related variables:
314
# logging related variables:
315
# PORTAGE_LOG_CLASSES: selects messages to be logged, possible values are:
315
# PORTAGE_LOG_CLASSES: selects messages to be logged, possible values are:
(-)portage-cvs/cnf/make.conf.arm (-14 / +14 lines)
Lines 15-21 Link Here
15
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1
15
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1
16
#
16
#
17
# The available list of use flags with descriptions is in your portage tree.
17
# The available list of use flags with descriptions is in your portage tree.
18
# Use 'less' to view them:  --> less /usr/portage/profiles/use.desc <--
18
# Use 'less' to view them:  --> less @prefix@/portage/profiles/use.desc <--
19
#
19
#
20
# 'ufed' is an ncurses/dialog interface available in portage to make handling
20
# 'ufed' is an ncurses/dialog interface available in portage to make handling
21
# useflags for you. 'emerge app-portage/ufed'
21
# useflags for you. 'emerge app-portage/ufed'
Lines 34-40 Link Here
34
# nslu2: armvbe-unknown-linux-gnu
34
# nslu2: armvbe-unknown-linux-gnu
35
# Generic ARM: arm-unknown-linux-gnu
35
# Generic ARM: arm-unknown-linux-gnu
36
#
36
#
37
CHOST="armv4l-unknown-linux-gnu"
37
CHOST="@target@"
38
38
39
# Host and optimization settings 
39
# Host and optimization settings 
40
# ==============================
40
# ==============================
Lines 100-112 Link Here
100
# PORTAGE_TMPDIR is the location portage will use for compilations and
100
# PORTAGE_TMPDIR is the location portage will use for compilations and
101
#     temporary storage of data. This can get VERY large depending upon
101
#     temporary storage of data. This can get VERY large depending upon
102
#     the application being installed.
102
#     the application being installed.
103
#PORTAGE_TMPDIR=/var/tmp
103
#PORTAGE_TMPDIR=/@affix@var/tmp
104
#
104
#
105
# PORTDIR is the location of the portage tree. This is the repository
105
# PORTDIR is the location of the portage tree. This is the repository
106
#     for all profile information as well as all ebuilds. This directory
106
#     for all profile information as well as all ebuilds. This directory
107
#     itself can reach 200M. If you change this, you must update your
107
#     itself can reach 200M. If you change this, you must update your
108
#     /etc/make.profile symlink accordingly.
108
#     /@affix@etc/make.profile symlink accordingly.
109
#PORTDIR=/usr/portage
109
#PORTDIR=@prefix@/portage
110
#
110
#
111
# DISTDIR is where all of the source code tarballs will be placed for
111
# DISTDIR is where all of the source code tarballs will be placed for
112
#     emerges. The source code is maintained here unless you delete
112
#     emerges. The source code is maintained here unless you delete
Lines 126-132 Link Here
126
#     providing a directory. Permissions will be modified as needed IF the
126
#     providing a directory. Permissions will be modified as needed IF the
127
#     directory exists, otherwise logging will be disabled. NNNN is the
127
#     directory exists, otherwise logging will be disabled. NNNN is the
128
#     increment at the time the log is created. Logs are thus sequential.
128
#     increment at the time the log is created. Logs are thus sequential.
129
#PORT_LOGDIR=/var/log/portage
129
#PORT_LOGDIR=/@affix@var/log/portage
130
#
130
#
131
# PORTDIR_OVERLAY is a directory where local ebuilds may be stored without
131
# PORTDIR_OVERLAY is a directory where local ebuilds may be stored without
132
#     concern that they will be deleted by rsync updates. Default is not
132
#     concern that they will be deleted by rsync updates. Default is not
Lines 137-143 Link Here
137
# ==============
137
# ==============
138
#
138
#
139
# If you need to set a proxy for wget or lukemftp, add the appropriate "export
139
# If you need to set a proxy for wget or lukemftp, add the appropriate "export
140
# ftp_proxy=<proxy>" and "export http_proxy=<proxy>" lines to /etc/profile if
140
# ftp_proxy=<proxy>" and "export http_proxy=<proxy>" lines to /@affix@etc/profile if
141
# all users on your system should use them.
141
# all users on your system should use them.
142
#
142
#
143
# Portage uses wget by default. Here are some settings for some alternate
143
# Portage uses wget by default. Here are some settings for some alternate
Lines 145-156 Link Here
145
# will be available.
145
# will be available.
146
#
146
#
147
# Default fetch command (5 tries, passive ftp for firewall compatibility)
147
# Default fetch command (5 tries, passive ftp for firewall compatibility)
148
#FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
148
#FETCHCOMMAND="@WGET@ -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
149
#RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
149
#RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
150
#
150
#
151
# Using wget, ratelimiting downloads
151
# Using wget, ratelimiting downloads
152
#FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
152
#FETCHCOMMAND="@WGET@ -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
153
#RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
153
#RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
154
#
154
#
155
# Lukemftp (BSD ftp):
155
# Lukemftp (BSD ftp):
156
#FETCHCOMMAND="/usr/bin/lukemftp -s -a -o \${DISTDIR}/\${FILE} \${URI}"
156
#FETCHCOMMAND="/usr/bin/lukemftp -s -a -o \${DISTDIR}/\${FILE} \${URI}"
Lines 259-265 Link Here
259
#  'distcc'      enables distcc support via CC.
259
#  'distcc'      enables distcc support via CC.
260
#  'distlocks'   enables distfiles locking using fcntl or hardlinks. This
260
#  'distlocks'   enables distfiles locking using fcntl or hardlinks. This
261
#                is enabled by default. Tools exist to help clean the locks
261
#                is enabled by default. Tools exist to help clean the locks
262
#                after crashes: /usr/lib/portage/bin/clean_locks.
262
#                after crashes: @PORTAGE_BASE@/bin/clean_locks.
263
#  'fixpackages' allows portage to fix binary packages that are stored in
263
#  'fixpackages' allows portage to fix binary packages that are stored in
264
#                PKGDIR. This can consume a lot of time. 'fixpackages' is
264
#                PKGDIR. This can consume a lot of time. 'fixpackages' is
265
#                also a script that can be run at any given time to force
265
#                also a script that can be run at any given time to force
Lines 293-299 Link Here
293
#     2G, and will be set if not defined otherwise and ccache is in features. 
293
#     2G, and will be set if not defined otherwise and ccache is in features. 
294
#     Portage will set the default ccache dir if it is not present in the
294
#     Portage will set the default ccache dir if it is not present in the
295
#     user's environment, for userpriv it sets: ${PORTAGE_TMPDIR}/ccache
295
#     user's environment, for userpriv it sets: ${PORTAGE_TMPDIR}/ccache
296
#     (/var/tmp/ccache), and for regular use the default is /root/.ccache.
296
#     (/@affix@var/tmp/ccache), and for regular use the default is /root/.ccache.
297
#     Sizes are specified with 'G' 'M' or 'K'.
297
#     Sizes are specified with 'G' 'M' or 'K'.
298
#     '2G' for 2 gigabytes, '2048M' for 2048 megabytes (same as 2G).
298
#     '2G' for 2 gigabytes, '2048M' for 2048 megabytes (same as 2G).
299
#CCACHE_SIZE="512M"
299
#CCACHE_SIZE="512M"
Lines 306-312 Link Here
306
#     consideration. This may cause dependency failures if you are not careful.
306
#     consideration. This may cause dependency failures if you are not careful.
307
#     The file format is one pattern per line, blanks and ';' or '#' lines are
307
#     The file format is one pattern per line, blanks and ';' or '#' lines are
308
#     comments. See 'man rsync' for more details on the exclude-from format.
308
#     comments. See 'man rsync' for more details on the exclude-from format.
309
#RSYNC_EXCLUDEFROM=/etc/portage/rsync_excludes
309
#RSYNC_EXCLUDEFROM=/@affix@etc/portage/rsync_excludes
310
310
311
# logging related variables:
311
# logging related variables:
312
# PORTAGE_LOG_CLASSES: selects messages to be logged, possible values are:
312
# PORTAGE_LOG_CLASSES: selects messages to be logged, possible values are:
(-)portage-cvs/cnf/make.conf.hppa (-14 / +14 lines)
Lines 15-21 Link Here
15
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1
15
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1
16
#
16
#
17
# The available list of use flags with descriptions is in your portage tree.
17
# The available list of use flags with descriptions is in your portage tree.
18
# Use 'less' to view them:  --> less /usr/portage/profiles/use.desc <--
18
# Use 'less' to view them:  --> less @prefix@/portage/profiles/use.desc <--
19
#
19
#
20
# 'ufed' is an ncurses/dialog interface available in portage to make handling
20
# 'ufed' is an ncurses/dialog interface available in portage to make handling
21
# useflags for you. 'emerge app-portage/ufed'
21
# useflags for you. 'emerge app-portage/ufed'
Lines 31-37 Link Here
31
# But you might want to use hppa1.1-unknown-linux-gnu or hppa2.0-unknown-linux-gnu
31
# But you might want to use hppa1.1-unknown-linux-gnu or hppa2.0-unknown-linux-gnu
32
# according to your station.
32
# according to your station.
33
#
33
#
34
CHOST="hppa-unknown-linux-gnu"
34
CHOST="@target@"
35
#CHOST="hppa1.1-unknown-linux-gnu"
35
#CHOST="hppa1.1-unknown-linux-gnu"
36
#CHOST="hppa2.0-unknown-linux-gnu"
36
#CHOST="hppa2.0-unknown-linux-gnu"
37
37
Lines 109-121 Link Here
109
# PORTAGE_TMPDIR is the location portage will use for compilations and
109
# PORTAGE_TMPDIR is the location portage will use for compilations and
110
#     temporary storage of data. This can get VERY large depending upon
110
#     temporary storage of data. This can get VERY large depending upon
111
#     the application being installed.
111
#     the application being installed.
112
#PORTAGE_TMPDIR=/var/tmp
112
#PORTAGE_TMPDIR=/@affix@var/tmp
113
#
113
#
114
# PORTDIR is the location of the portage tree. This is the repository
114
# PORTDIR is the location of the portage tree. This is the repository
115
#     for all profile information as well as all ebuilds. This directory
115
#     for all profile information as well as all ebuilds. This directory
116
#     itself can reach 200M. If you change this, you must update your
116
#     itself can reach 200M. If you change this, you must update your
117
#     /etc/make.profile symlink accordingly.
117
#     /@affix@etc/make.profile symlink accordingly.
118
#PORTDIR=/usr/portage
118
#PORTDIR=@prefix@/portage
119
#
119
#
120
# DISTDIR is where all of the source code tarballs will be placed for
120
# DISTDIR is where all of the source code tarballs will be placed for
121
#     emerges. The source code is maintained here unless you delete
121
#     emerges. The source code is maintained here unless you delete
Lines 135-141 Link Here
135
#     providing a directory. Permissions will be modified as needed IF the
135
#     providing a directory. Permissions will be modified as needed IF the
136
#     directory exists, otherwise logging will be disabled. NNNN is the
136
#     directory exists, otherwise logging will be disabled. NNNN is the
137
#     increment at the time the log is created. Logs are thus sequential.
137
#     increment at the time the log is created. Logs are thus sequential.
138
#PORT_LOGDIR=/var/log/portage
138
#PORT_LOGDIR=/@affix@var/log/portage
139
#
139
#
140
# PORTDIR_OVERLAY is a directory where local ebuilds may be stored without
140
# PORTDIR_OVERLAY is a directory where local ebuilds may be stored without
141
#     concern that they will be deleted by rsync updates. Default is not
141
#     concern that they will be deleted by rsync updates. Default is not
Lines 146-152 Link Here
146
# ==============
146
# ==============
147
#
147
#
148
# If you need to set a proxy for wget or lukemftp, add the appropriate "export
148
# If you need to set a proxy for wget or lukemftp, add the appropriate "export
149
# ftp_proxy=<proxy>" and "export http_proxy=<proxy>" lines to /etc/profile if
149
# ftp_proxy=<proxy>" and "export http_proxy=<proxy>" lines to /@affix@etc/profile if
150
# all users on your system should use them.
150
# all users on your system should use them.
151
#
151
#
152
# Portage uses wget by default. Here are some settings for some alternate
152
# Portage uses wget by default. Here are some settings for some alternate
Lines 154-165 Link Here
154
# will be available.
154
# will be available.
155
#
155
#
156
# Default fetch command (5 tries, passive ftp for firewall compatibility)
156
# Default fetch command (5 tries, passive ftp for firewall compatibility)
157
#FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
157
#FETCHCOMMAND="@WGET@ -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
158
#RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
158
#RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
159
#
159
#
160
# Using wget, ratelimiting downloads
160
# Using wget, ratelimiting downloads
161
#FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
161
#FETCHCOMMAND="@WGET@ -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
162
#RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
162
#RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
163
#
163
#
164
# Lukemftp (BSD ftp):
164
# Lukemftp (BSD ftp):
165
#FETCHCOMMAND="/usr/bin/lukemftp -s -a -o \${DISTDIR}/\${FILE} \${URI}"
165
#FETCHCOMMAND="/usr/bin/lukemftp -s -a -o \${DISTDIR}/\${FILE} \${URI}"
Lines 268-274 Link Here
268
#  'distcc'      enables distcc support via CC.
268
#  'distcc'      enables distcc support via CC.
269
#  'distlocks'   enables distfiles locking using fcntl or hardlinks. This
269
#  'distlocks'   enables distfiles locking using fcntl or hardlinks. This
270
#                is enabled by default. Tools exist to help clean the locks
270
#                is enabled by default. Tools exist to help clean the locks
271
#                after crashes: /usr/lib/portage/bin/clean_locks.
271
#                after crashes: @PORTAGE_BASE@/bin/clean_locks.
272
#  'fixpackages' allows portage to fix binary packages that are stored in
272
#  'fixpackages' allows portage to fix binary packages that are stored in
273
#                PKGDIR. This can consume a lot of time. 'fixpackages' is
273
#                PKGDIR. This can consume a lot of time. 'fixpackages' is
274
#                also a script that can be run at any given time to force
274
#                also a script that can be run at any given time to force
Lines 302-308 Link Here
302
#     2G, and will be set if not defined otherwise and ccache is in features. 
302
#     2G, and will be set if not defined otherwise and ccache is in features. 
303
#     Portage will set the default ccache dir if it is not present in the
303
#     Portage will set the default ccache dir if it is not present in the
304
#     user's environment, for userpriv it sets: ${PORTAGE_TMPDIR}/ccache
304
#     user's environment, for userpriv it sets: ${PORTAGE_TMPDIR}/ccache
305
#     (/var/tmp/ccache), and for regular use the default is /root/.ccache.
305
#     (/@affix@var/tmp/ccache), and for regular use the default is /root/.ccache.
306
#     Sizes are specified with 'G' 'M' or 'K'.
306
#     Sizes are specified with 'G' 'M' or 'K'.
307
#     '2G' for 2 gigabytes, '2048M' for 2048 megabytes (same as 2G).
307
#     '2G' for 2 gigabytes, '2048M' for 2048 megabytes (same as 2G).
308
#CCACHE_SIZE="512M"
308
#CCACHE_SIZE="512M"
Lines 315-321 Link Here
315
#     consideration. This may cause dependency failures if you are not careful.
315
#     consideration. This may cause dependency failures if you are not careful.
316
#     The file format is one pattern per line, blanks and ';' or '#' lines are
316
#     The file format is one pattern per line, blanks and ';' or '#' lines are
317
#     comments. See 'man rsync' for more details on the exclude-from format.
317
#     comments. See 'man rsync' for more details on the exclude-from format.
318
#RSYNC_EXCLUDEFROM=/etc/portage/rsync_excludes
318
#RSYNC_EXCLUDEFROM=/@affix@etc/portage/rsync_excludes
319
319
320
# logging related variables:
320
# logging related variables:
321
# PORTAGE_LOG_CLASSES: selects messages to be logged, possible values are:
321
# PORTAGE_LOG_CLASSES: selects messages to be logged, possible values are:
(-)portage-cvs/cnf/make.conf.ia64 (-14 / +14 lines)
Lines 15-21 Link Here
15
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1
15
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1
16
#
16
#
17
# The available list of use flags with descriptions is in your portage tree.
17
# The available list of use flags with descriptions is in your portage tree.
18
# Use 'less' to view them:  --> less /usr/portage/profiles/use.desc <--
18
# Use 'less' to view them:  --> less @prefix@/portage/profiles/use.desc <--
19
#
19
#
20
# 'ufed' is an ncurses/dialog interface available in portage to make handling
20
# 'ufed' is an ncurses/dialog interface available in portage to make handling
21
# useflags for you. 'emerge app-portage/ufed'
21
# useflags for you. 'emerge app-portage/ufed'
Lines 28-34 Link Here
28
#
28
#
29
# All Itanium systems should use this host setting:
29
# All Itanium systems should use this host setting:
30
30
31
CHOST="ia64-unknown-linux-gnu"
31
CHOST="@target@"
32
32
33
# Host and optimization settings 
33
# Host and optimization settings 
34
# ==============================
34
# ==============================
Lines 71-83 Link Here
71
# PORTAGE_TMPDIR is the location portage will use for compilations and
71
# PORTAGE_TMPDIR is the location portage will use for compilations and
72
#     temporary storage of data. This can get VERY large depending upon
72
#     temporary storage of data. This can get VERY large depending upon
73
#     the application being installed.
73
#     the application being installed.
74
#PORTAGE_TMPDIR=/var/tmp
74
#PORTAGE_TMPDIR=/@affix@var/tmp
75
#
75
#
76
# PORTDIR is the location of the portage tree. This is the repository
76
# PORTDIR is the location of the portage tree. This is the repository
77
#     for all profile information as well as all ebuilds. This directory
77
#     for all profile information as well as all ebuilds. This directory
78
#     itself can reach 200M. If you change this, you must update your
78
#     itself can reach 200M. If you change this, you must update your
79
#     /etc/make.profile symlink accordingly.
79
#     /@affix@etc/make.profile symlink accordingly.
80
#PORTDIR=/usr/portage
80
#PORTDIR=@prefix@/portage
81
#
81
#
82
# DISTDIR is where all of the source code tarballs will be placed for
82
# DISTDIR is where all of the source code tarballs will be placed for
83
#     emerges. The source code is maintained here unless you delete
83
#     emerges. The source code is maintained here unless you delete
Lines 97-103 Link Here
97
#     providing a directory. Permissions will be modified as needed IF the
97
#     providing a directory. Permissions will be modified as needed IF the
98
#     directory exists, otherwise logging will be disabled. NNNN is the
98
#     directory exists, otherwise logging will be disabled. NNNN is the
99
#     increment at the time the log is created. Logs are thus sequential.
99
#     increment at the time the log is created. Logs are thus sequential.
100
#PORT_LOGDIR=/var/log/portage
100
#PORT_LOGDIR=/@affix@var/log/portage
101
#
101
#
102
# PORTDIR_OVERLAY is a directory where local ebuilds may be stored without
102
# PORTDIR_OVERLAY is a directory where local ebuilds may be stored without
103
#     concern that they will be deleted by rsync updates. Default is not
103
#     concern that they will be deleted by rsync updates. Default is not
Lines 108-114 Link Here
108
# ==============
108
# ==============
109
#
109
#
110
# If you need to set a proxy for wget or lukemftp, add the appropriate "export
110
# If you need to set a proxy for wget or lukemftp, add the appropriate "export
111
# ftp_proxy=<proxy>" and "export http_proxy=<proxy>" lines to /etc/profile if
111
# ftp_proxy=<proxy>" and "export http_proxy=<proxy>" lines to /@affix@etc/profile if
112
# all users on your system should use them.
112
# all users on your system should use them.
113
#
113
#
114
# Portage uses wget by default. Here are some settings for some alternate
114
# Portage uses wget by default. Here are some settings for some alternate
Lines 116-127 Link Here
116
# will be available.
116
# will be available.
117
#
117
#
118
# Default fetch command (5 tries, passive ftp for firewall compatibility)
118
# Default fetch command (5 tries, passive ftp for firewall compatibility)
119
#FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
119
#FETCHCOMMAND="@WGET@ -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
120
#RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
120
#RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
121
#
121
#
122
# Using wget, ratelimiting downloads
122
# Using wget, ratelimiting downloads
123
#FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
123
#FETCHCOMMAND="@WGET@ -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
124
#RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
124
#RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
125
#
125
#
126
# Lukemftp (BSD ftp):
126
# Lukemftp (BSD ftp):
127
#FETCHCOMMAND="/usr/bin/lukemftp -s -a -o \${DISTDIR}/\${FILE} \${URI}"
127
#FETCHCOMMAND="/usr/bin/lukemftp -s -a -o \${DISTDIR}/\${FILE} \${URI}"
Lines 230-236 Link Here
230
#  'distcc'      enables distcc support via CC.
230
#  'distcc'      enables distcc support via CC.
231
#  'distlocks'   enables distfiles locking using fcntl or hardlinks. This
231
#  'distlocks'   enables distfiles locking using fcntl or hardlinks. This
232
#                is enabled by default. Tools exist to help clean the locks
232
#                is enabled by default. Tools exist to help clean the locks
233
#                after crashes: /usr/lib/portage/bin/clean_locks.
233
#                after crashes: @PORTAGE_BASE@/bin/clean_locks.
234
#  'fixpackages' allows portage to fix binary packages that are stored in
234
#  'fixpackages' allows portage to fix binary packages that are stored in
235
#                PKGDIR. This can consume a lot of time. 'fixpackages' is
235
#                PKGDIR. This can consume a lot of time. 'fixpackages' is
236
#                also a script that can be run at any given time to force
236
#                also a script that can be run at any given time to force
Lines 264-270 Link Here
264
#     2G, and will be set if not defined otherwise and ccache is in features. 
264
#     2G, and will be set if not defined otherwise and ccache is in features. 
265
#     Portage will set the default ccache dir if it is not present in the
265
#     Portage will set the default ccache dir if it is not present in the
266
#     user's environment, for userpriv it sets: ${PORTAGE_TMPDIR}/ccache
266
#     user's environment, for userpriv it sets: ${PORTAGE_TMPDIR}/ccache
267
#     (/var/tmp/ccache), and for regular use the default is /root/.ccache.
267
#     (/@affix@var/tmp/ccache), and for regular use the default is /root/.ccache.
268
#     Sizes are specified with 'G' 'M' or 'K'.
268
#     Sizes are specified with 'G' 'M' or 'K'.
269
#     '2G' for 2 gigabytes, '2048M' for 2048 megabytes (same as 2G).
269
#     '2G' for 2 gigabytes, '2048M' for 2048 megabytes (same as 2G).
270
#CCACHE_SIZE="512M"
270
#CCACHE_SIZE="512M"
Lines 277-283 Link Here
277
#     consideration. This may cause dependency failures if you are not careful.
277
#     consideration. This may cause dependency failures if you are not careful.
278
#     The file format is one pattern per line, blanks and ';' or '#' lines are
278
#     The file format is one pattern per line, blanks and ';' or '#' lines are
279
#     comments. See 'man rsync' for more details on the exclude-from format.
279
#     comments. See 'man rsync' for more details on the exclude-from format.
280
#RSYNC_EXCLUDEFROM=/etc/portage/rsync_excludes
280
#RSYNC_EXCLUDEFROM=/@affix@etc/portage/rsync_excludes
281
281
282
# logging related variables:
282
# logging related variables:
283
# PORTAGE_LOG_CLASSES: selects messages to be logged, possible values are:
283
# PORTAGE_LOG_CLASSES: selects messages to be logged, possible values are:
(-)portage-cvs/cnf/make.conf.mips (-14 / +14 lines)
Lines 15-21 Link Here
15
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1
15
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1
16
#
16
#
17
# The available list of use flags with descriptions is in your portage tree.
17
# The available list of use flags with descriptions is in your portage tree.
18
# Use 'less' to view them:  --> less /usr/portage/profiles/use.desc <--
18
# Use 'less' to view them:  --> less @prefix@/portage/profiles/use.desc <--
19
#
19
#
20
# 'ufed' is an ncurses/dialog interface available in portage to make handling
20
# 'ufed' is an ncurses/dialog interface available in portage to make handling
21
# useflags for you. 'emerge app-portage/ufed'
21
# useflags for you. 'emerge app-portage/ufed'
Lines 28-34 Link Here
28
#
28
#
29
# All MIPS systems should use this host setting:
29
# All MIPS systems should use this host setting:
30
30
31
CHOST="mips-unknown-linux-gnu"
31
CHOST="@target@"
32
32
33
# Host and optimization settings 
33
# Host and optimization settings 
34
# ==============================
34
# ==============================
Lines 89-101 Link Here
89
# PORTAGE_TMPDIR is the location portage will use for compilations and
89
# PORTAGE_TMPDIR is the location portage will use for compilations and
90
#     temporary storage of data. This can get VERY large depending upon
90
#     temporary storage of data. This can get VERY large depending upon
91
#     the application being installed.
91
#     the application being installed.
92
#PORTAGE_TMPDIR=/var/tmp
92
#PORTAGE_TMPDIR=/@affix@var/tmp
93
#
93
#
94
# PORTDIR is the location of the portage tree. This is the repository
94
# PORTDIR is the location of the portage tree. This is the repository
95
#     for all profile information as well as all ebuilds. This directory
95
#     for all profile information as well as all ebuilds. This directory
96
#     itself can reach 200M. If you change this, you must update your
96
#     itself can reach 200M. If you change this, you must update your
97
#     /etc/make.profile symlink accordingly.
97
#     /@affix@etc/make.profile symlink accordingly.
98
#PORTDIR=/usr/portage
98
#PORTDIR=@prefix@/portage
99
#
99
#
100
# DISTDIR is where all of the source code tarballs will be placed for
100
# DISTDIR is where all of the source code tarballs will be placed for
101
#     emerges. The source code is maintained here unless you delete
101
#     emerges. The source code is maintained here unless you delete
Lines 115-121 Link Here
115
#     providing a directory. Permissions will be modified as needed IF the
115
#     providing a directory. Permissions will be modified as needed IF the
116
#     directory exists, otherwise logging will be disabled. NNNN is the
116
#     directory exists, otherwise logging will be disabled. NNNN is the
117
#     increment at the time the log is created. Logs are thus sequential.
117
#     increment at the time the log is created. Logs are thus sequential.
118
#PORT_LOGDIR=/var/log/portage
118
#PORT_LOGDIR=/@affix@var/log/portage
119
#
119
#
120
# PORTDIR_OVERLAY is a directory where local ebuilds may be stored without
120
# PORTDIR_OVERLAY is a directory where local ebuilds may be stored without
121
#     concern that they will be deleted by rsync updates. Default is not
121
#     concern that they will be deleted by rsync updates. Default is not
Lines 126-132 Link Here
126
# ==============
126
# ==============
127
#
127
#
128
# If you need to set a proxy for wget or lukemftp, add the appropriate "export
128
# If you need to set a proxy for wget or lukemftp, add the appropriate "export
129
# ftp_proxy=<proxy>" and "export http_proxy=<proxy>" lines to /etc/profile if
129
# ftp_proxy=<proxy>" and "export http_proxy=<proxy>" lines to /@affix@etc/profile if
130
# all users on your system should use them.
130
# all users on your system should use them.
131
#
131
#
132
# Portage uses wget by default. Here are some settings for some alternate
132
# Portage uses wget by default. Here are some settings for some alternate
Lines 134-145 Link Here
134
# will be available.
134
# will be available.
135
#
135
#
136
# Default fetch command (5 tries, passive ftp for firewall compatibility)
136
# Default fetch command (5 tries, passive ftp for firewall compatibility)
137
#FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
137
#FETCHCOMMAND="@WGET@ -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
138
#RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
138
#RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
139
#
139
#
140
# Using wget, ratelimiting downloads
140
# Using wget, ratelimiting downloads
141
#FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
141
#FETCHCOMMAND="@WGET@ -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
142
#RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
142
#RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
143
#
143
#
144
# Lukemftp (BSD ftp):
144
# Lukemftp (BSD ftp):
145
#FETCHCOMMAND="/usr/bin/lukemftp -s -a -o \${DISTDIR}/\${FILE} \${URI}"
145
#FETCHCOMMAND="/usr/bin/lukemftp -s -a -o \${DISTDIR}/\${FILE} \${URI}"
Lines 248-254 Link Here
248
#  'distcc'      enables distcc support via CC.
248
#  'distcc'      enables distcc support via CC.
249
#  'distlocks'   enables distfiles locking using fcntl or hardlinks. This
249
#  'distlocks'   enables distfiles locking using fcntl or hardlinks. This
250
#                is enabled by default. Tools exist to help clean the locks
250
#                is enabled by default. Tools exist to help clean the locks
251
#                after crashes: /usr/lib/portage/bin/clean_locks.
251
#                after crashes: @PORTAGE_BASE@/bin/clean_locks.
252
#  'fixpackages' allows portage to fix binary packages that are stored in
252
#  'fixpackages' allows portage to fix binary packages that are stored in
253
#                PKGDIR. This can consume a lot of time. 'fixpackages' is
253
#                PKGDIR. This can consume a lot of time. 'fixpackages' is
254
#                also a script that can be run at any given time to force
254
#                also a script that can be run at any given time to force
Lines 282-288 Link Here
282
#     2G, and will be set if not defined otherwise and ccache is in features. 
282
#     2G, and will be set if not defined otherwise and ccache is in features. 
283
#     Portage will set the default ccache dir if it is not present in the
283
#     Portage will set the default ccache dir if it is not present in the
284
#     user's environment, for userpriv it sets: ${PORTAGE_TMPDIR}/ccache
284
#     user's environment, for userpriv it sets: ${PORTAGE_TMPDIR}/ccache
285
#     (/var/tmp/ccache), and for regular use the default is /root/.ccache.
285
#     (/@affix@var/tmp/ccache), and for regular use the default is /root/.ccache.
286
#     Sizes are specified with 'G' 'M' or 'K'.
286
#     Sizes are specified with 'G' 'M' or 'K'.
287
#     '2G' for 2 gigabytes, '2048M' for 2048 megabytes (same as 2G).
287
#     '2G' for 2 gigabytes, '2048M' for 2048 megabytes (same as 2G).
288
#CCACHE_SIZE="512M"
288
#CCACHE_SIZE="512M"
Lines 295-301 Link Here
295
#     consideration. This may cause dependency failures if you are not careful.
295
#     consideration. This may cause dependency failures if you are not careful.
296
#     The file format is one pattern per line, blanks and ';' or '#' lines are
296
#     The file format is one pattern per line, blanks and ';' or '#' lines are
297
#     comments. See 'man rsync' for more details on the exclude-from format.
297
#     comments. See 'man rsync' for more details on the exclude-from format.
298
#RSYNC_EXCLUDEFROM=/etc/portage/rsync_excludes
298
#RSYNC_EXCLUDEFROM=/@affix@etc/portage/rsync_excludes
299
299
300
# logging related variables:
300
# logging related variables:
301
# PORTAGE_LOG_CLASSES: selects messages to be logged, possible values are:
301
# PORTAGE_LOG_CLASSES: selects messages to be logged, possible values are:
(-)portage-cvs/cnf/make.conf.ppc (-14 / +14 lines)
Lines 15-21 Link Here
15
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1
15
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1
16
# 
16
# 
17
# The available list of use flags with descriptions is in your portage tree.
17
# The available list of use flags with descriptions is in your portage tree.
18
# Use 'less' to view them:  --> less /usr/portage/profiles/use.desc <--
18
# Use 'less' to view them:  --> less @prefix@/portage/profiles/use.desc <--
19
#
19
#
20
# 'ufed' is an ncurses/dialog interface available in portage to make handling
20
# 'ufed' is an ncurses/dialog interface available in portage to make handling
21
# useflags for you. 'emerge app-portage/ufed'
21
# useflags for you. 'emerge app-portage/ufed'
Lines 28-34 Link Here
28
#
28
#
29
# All PowerPC systems should use this host setting:
29
# All PowerPC systems should use this host setting:
30
30
31
CHOST="powerpc-unknown-linux-gnu"
31
CHOST="@target@"
32
32
33
# Host and optimization settings 
33
# Host and optimization settings 
34
# ==============================
34
# ==============================
Lines 122-134 Link Here
122
# PORTAGE_TMPDIR is the location portage will use for compilations and
122
# PORTAGE_TMPDIR is the location portage will use for compilations and
123
#     temporary storage of data. This can get VERY large depending upon
123
#     temporary storage of data. This can get VERY large depending upon
124
#     the application being installed.
124
#     the application being installed.
125
#PORTAGE_TMPDIR=/var/tmp
125
#PORTAGE_TMPDIR=/@affix@var/tmp
126
#
126
#
127
# PORTDIR is the location of the portage tree. This is the repository
127
# PORTDIR is the location of the portage tree. This is the repository
128
#     for all profile information as well as all ebuilds. This directory
128
#     for all profile information as well as all ebuilds. This directory
129
#     itself can reach 200M. If you change this, you must update your
129
#     itself can reach 200M. If you change this, you must update your
130
#     /etc/make.profile symlink accordingly.
130
#     /@affix@etc/make.profile symlink accordingly.
131
#PORTDIR=/usr/portage
131
#PORTDIR=@prefix@/portage
132
#
132
#
133
# DISTDIR is where all of the source code tarballs will be placed for
133
# DISTDIR is where all of the source code tarballs will be placed for
134
#     emerges. The source code is maintained here unless you delete
134
#     emerges. The source code is maintained here unless you delete
Lines 148-154 Link Here
148
#     providing a directory. Permissions will be modified as needed IF the
148
#     providing a directory. Permissions will be modified as needed IF the
149
#     directory exists, otherwise logging will be disabled. NNNN is the
149
#     directory exists, otherwise logging will be disabled. NNNN is the
150
#     increment at the time the log is created. Logs are thus sequential.
150
#     increment at the time the log is created. Logs are thus sequential.
151
#PORT_LOGDIR=/var/log/portage
151
#PORT_LOGDIR=/@affix@var/log/portage
152
#
152
#
153
# PORTDIR_OVERLAY is a directory where local ebuilds may be stored without
153
# PORTDIR_OVERLAY is a directory where local ebuilds may be stored without
154
#     concern that they will be deleted by rsync updates. Default is not
154
#     concern that they will be deleted by rsync updates. Default is not
Lines 159-165 Link Here
159
# ==============
159
# ==============
160
#
160
#
161
# If you need to set a proxy for wget or lukemftp, add the appropriate "export
161
# If you need to set a proxy for wget or lukemftp, add the appropriate "export
162
# ftp_proxy=<proxy>" and "export http_proxy=<proxy>" lines to /etc/profile if
162
# ftp_proxy=<proxy>" and "export http_proxy=<proxy>" lines to /@affix@etc/profile if
163
# all users on your system should use them.
163
# all users on your system should use them.
164
#
164
#
165
# Portage uses wget by default. Here are some settings for some alternate
165
# Portage uses wget by default. Here are some settings for some alternate
Lines 167-178 Link Here
167
# will be available.
167
# will be available.
168
#
168
#
169
# Default fetch command (5 tries, passive ftp for firewall compatibility)
169
# Default fetch command (5 tries, passive ftp for firewall compatibility)
170
#FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
170
#FETCHCOMMAND="@WGET@ -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
171
#RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
171
#RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
172
#
172
#
173
# Using wget, ratelimiting downloads
173
# Using wget, ratelimiting downloads
174
#FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
174
#FETCHCOMMAND="@WGET@ -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
175
#RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
175
#RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
176
#
176
#
177
# Lukemftp (BSD ftp):
177
# Lukemftp (BSD ftp):
178
#FETCHCOMMAND="/usr/bin/lukemftp -s -a -o \${DISTDIR}/\${FILE} \${URI}"
178
#FETCHCOMMAND="/usr/bin/lukemftp -s -a -o \${DISTDIR}/\${FILE} \${URI}"
Lines 281-287 Link Here
281
#  'distcc'      enables distcc support via CC.
281
#  'distcc'      enables distcc support via CC.
282
#  'distlocks'   enables distfiles locking using fcntl or hardlinks. This
282
#  'distlocks'   enables distfiles locking using fcntl or hardlinks. This
283
#                is enabled by default. Tools exist to help clean the locks
283
#                is enabled by default. Tools exist to help clean the locks
284
#                after crashes: /usr/lib/portage/bin/clean_locks.
284
#                after crashes: @PORTAGE_BASE@/bin/clean_locks.
285
#  'fixpackages' allows portage to fix binary packages that are stored in
285
#  'fixpackages' allows portage to fix binary packages that are stored in
286
#                PKGDIR. This can consume a lot of time. 'fixpackages' is
286
#                PKGDIR. This can consume a lot of time. 'fixpackages' is
287
#                also a script that can be run at any given time to force
287
#                also a script that can be run at any given time to force
Lines 315-321 Link Here
315
#     2G, and will be set if not defined otherwise and ccache is in features. 
315
#     2G, and will be set if not defined otherwise and ccache is in features. 
316
#     Portage will set the default ccache dir if it is not present in the
316
#     Portage will set the default ccache dir if it is not present in the
317
#     user's environment, for userpriv it sets: ${PORTAGE_TMPDIR}/ccache
317
#     user's environment, for userpriv it sets: ${PORTAGE_TMPDIR}/ccache
318
#     (/var/tmp/ccache), and for regular use the default is /root/.ccache.
318
#     (/@affix@var/tmp/ccache), and for regular use the default is /root/.ccache.
319
#     Sizes are specified with 'G' 'M' or 'K'.
319
#     Sizes are specified with 'G' 'M' or 'K'.
320
#     '2G' for 2 gigabytes, '2048M' for 2048 megabytes (same as 2G).
320
#     '2G' for 2 gigabytes, '2048M' for 2048 megabytes (same as 2G).
321
#CCACHE_SIZE="512M"
321
#CCACHE_SIZE="512M"
Lines 328-334 Link Here
328
#     consideration. This may cause dependency failures if you are not careful.
328
#     consideration. This may cause dependency failures if you are not careful.
329
#     The file format is one pattern per line, blanks and ';' or '#' lines are
329
#     The file format is one pattern per line, blanks and ';' or '#' lines are
330
#     comments. See 'man rsync' for more details on the exclude-from format.
330
#     comments. See 'man rsync' for more details on the exclude-from format.
331
#RSYNC_EXCLUDEFROM=/etc/portage/rsync_excludes
331
#RSYNC_EXCLUDEFROM=/@affix@etc/portage/rsync_excludes
332
332
333
# logging related variables:
333
# logging related variables:
334
# PORTAGE_LOG_CLASSES: selects messages to be logged, possible values are:
334
# PORTAGE_LOG_CLASSES: selects messages to be logged, possible values are:
(-)portage-cvs/cnf/make.conf.ppc64 (-13 / +13 lines)
Lines 15-21 Link Here
15
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1
15
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1
16
# 
16
# 
17
# The available list of use flags with descriptions is in your portage tree.
17
# The available list of use flags with descriptions is in your portage tree.
18
# Use 'less' to view them:  --> less /usr/portage/profiles/use.desc <--
18
# Use 'less' to view them:  --> less @prefix@/portage/profiles/use.desc <--
19
#
19
#
20
# 'ufed' is an ncurses/dialog interface available in portage to make handling
20
# 'ufed' is an ncurses/dialog interface available in portage to make handling
21
# useflags for you. 'emerge app-portage/ufed'
21
# useflags for you. 'emerge app-portage/ufed'
Lines 28-34 Link Here
28
#
28
#
29
# All PowerPC64 systems should use this host setting:
29
# All PowerPC64 systems should use this host setting:
30
30
31
CHOST="powerpc64-unknown-linux-gnu"
31
CHOST="@target@"
32
32
33
# Host and optimization settings 
33
# Host and optimization settings 
34
# ==============================
34
# ==============================
Lines 112-123 Link Here
112
# PORTAGE_TMPDIR is the location portage will use for compilations and
112
# PORTAGE_TMPDIR is the location portage will use for compilations and
113
#     temporary storage of data. This can get VERY large depending upon
113
#     temporary storage of data. This can get VERY large depending upon
114
#     the application being installed.
114
#     the application being installed.
115
#PORTAGE_TMPDIR=/var/tmp
115
#PORTAGE_TMPDIR=/@affix@var/tmp
116
#
116
#
117
# PORTDIR is the location of the portage tree. This is the repository
117
# PORTDIR is the location of the portage tree. This is the repository
118
#     for all profile information as well as all ebuilds. This directory
118
#     for all profile information as well as all ebuilds. This directory
119
#     itself can reach 200M. WE DO NOT RECOMMEND that you change this.
119
#     itself can reach 200M. WE DO NOT RECOMMEND that you change this.
120
#PORTDIR=/usr/portage
120
#PORTDIR=@prefix@/portage
121
#
121
#
122
# DISTDIR is where all of the source code tarballs will be placed for
122
# DISTDIR is where all of the source code tarballs will be placed for
123
#     emerges. The source code is maintained here unless you delete
123
#     emerges. The source code is maintained here unless you delete
Lines 137-143 Link Here
137
#     providing a directory. Permissions will be modified as needed IF the
137
#     providing a directory. Permissions will be modified as needed IF the
138
#     directory exists, otherwise logging will be disabled. NNNN is the
138
#     directory exists, otherwise logging will be disabled. NNNN is the
139
#     increment at the time the log is created. Logs are thus sequential.
139
#     increment at the time the log is created. Logs are thus sequential.
140
#PORT_LOGDIR=/var/log/portage
140
#PORT_LOGDIR=/@affix@var/log/portage
141
#
141
#
142
# PORTDIR_OVERLAY is a directory where local ebuilds may be stored without
142
# PORTDIR_OVERLAY is a directory where local ebuilds may be stored without
143
#     concern that they will be deleted by rsync updates. Default is not
143
#     concern that they will be deleted by rsync updates. Default is not
Lines 148-154 Link Here
148
# ==============
148
# ==============
149
#
149
#
150
# If you need to set a proxy for wget or lukemftp, add the appropriate "export
150
# If you need to set a proxy for wget or lukemftp, add the appropriate "export
151
# ftp_proxy=<proxy>" and "export http_proxy=<proxy>" lines to /etc/profile if
151
# ftp_proxy=<proxy>" and "export http_proxy=<proxy>" lines to /@affix@etc/profile if
152
# all users on your system should use them.
152
# all users on your system should use them.
153
#
153
#
154
# Portage uses wget by default. Here are some settings for some alternate
154
# Portage uses wget by default. Here are some settings for some alternate
Lines 156-167 Link Here
156
# will be available.
156
# will be available.
157
#
157
#
158
# Default fetch command (5 tries, passive ftp for firewall compatibility)
158
# Default fetch command (5 tries, passive ftp for firewall compatibility)
159
#FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
159
#FETCHCOMMAND="@WGET@ -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
160
#RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
160
#RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
161
#
161
#
162
# Using wget, ratelimiting downloads
162
# Using wget, ratelimiting downloads
163
#FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
163
#FETCHCOMMAND="@WGET@ -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
164
#RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
164
#RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
165
#
165
#
166
# Lukemftp (BSD ftp):
166
# Lukemftp (BSD ftp):
167
#FETCHCOMMAND="/usr/bin/lukemftp -s -a -o \${DISTDIR}/\${FILE} \${URI}"
167
#FETCHCOMMAND="/usr/bin/lukemftp -s -a -o \${DISTDIR}/\${FILE} \${URI}"
Lines 260-266 Link Here
260
#  'distcc'      enables distcc support via CC.
260
#  'distcc'      enables distcc support via CC.
261
#  'distlocks'   enables distfiles locking using fcntl or hardlinks. This
261
#  'distlocks'   enables distfiles locking using fcntl or hardlinks. This
262
#                is enabled by default. Tools exist to help clean the locks
262
#                is enabled by default. Tools exist to help clean the locks
263
#                after crashes: /usr/lib/portage/bin/clean_locks.
263
#                after crashes: @PORTAGE_BASE@/bin/clean_locks.
264
#  'fixpackages' allows portage to fix binary packages that are stored in
264
#  'fixpackages' allows portage to fix binary packages that are stored in
265
#                PKGDIR. This can consume a lot of time. 'fixpackages' is
265
#                PKGDIR. This can consume a lot of time. 'fixpackages' is
266
#                also a script that can be run at any given time to force
266
#                also a script that can be run at any given time to force
Lines 294-300 Link Here
294
#     2G, and will be set if not defined otherwise and ccache is in features. 
294
#     2G, and will be set if not defined otherwise and ccache is in features. 
295
#     Portage will set the default ccache dir if it is not present in the
295
#     Portage will set the default ccache dir if it is not present in the
296
#     user's environment, for userpriv it sets: ${PORTAGE_TMPDIR}/ccache
296
#     user's environment, for userpriv it sets: ${PORTAGE_TMPDIR}/ccache
297
#     (/var/tmp/ccache), and for regular use the default is /root/.ccache.
297
#     (/@affix@var/tmp/ccache), and for regular use the default is /root/.ccache.
298
#     Sizes are specified with 'G' 'M' or 'K'.
298
#     Sizes are specified with 'G' 'M' or 'K'.
299
#     '2G' for 2 gigabytes, '2048M' for 2048 megabytes (same as 2G).
299
#     '2G' for 2 gigabytes, '2048M' for 2048 megabytes (same as 2G).
300
#CCACHE_SIZE="512M"
300
#CCACHE_SIZE="512M"
Lines 307-313 Link Here
307
#     consideration. This may cause dependency failures if you are not careful.
307
#     consideration. This may cause dependency failures if you are not careful.
308
#     The file format is one pattern per line, blanks and ';' or '#' lines are
308
#     The file format is one pattern per line, blanks and ';' or '#' lines are
309
#     comments. See 'man rsync' for more details on the exclude-from format.
309
#     comments. See 'man rsync' for more details on the exclude-from format.
310
#RSYNC_EXCLUDEFROM=/etc/portage/rsync_excludes
310
#RSYNC_EXCLUDEFROM=/@affix@etc/portage/rsync_excludes
311
311
312
# logging related variables:
312
# logging related variables:
313
# PORTAGE_LOG_CLASSES: selects messages to be logged, possible values are:
313
# PORTAGE_LOG_CLASSES: selects messages to be logged, possible values are:
(-)portage-cvs/cnf/make.conf.s390 (-14 / +14 lines)
Lines 15-21 Link Here
15
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1
15
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1
16
#
16
#
17
# The available list of use flags with descriptions is in your portage tree.
17
# The available list of use flags with descriptions is in your portage tree.
18
# Use 'less' to view them:  --> less /usr/portage/profiles/use.desc <--
18
# Use 'less' to view them:  --> less @prefix@/portage/profiles/use.desc <--
19
#
19
#
20
# 'ufed' is an ncurses/dialog interface available in portage to make handling
20
# 'ufed' is an ncurses/dialog interface available in portage to make handling
21
# useflags for you. 'emerge app-portage/ufed'
21
# useflags for you. 'emerge app-portage/ufed'
Lines 28-34 Link Here
28
#
28
#
29
# All s390 systems should use this host setting:
29
# All s390 systems should use this host setting:
30
30
31
CHOST="s390-ibm-linux-gnu"
31
CHOST="@target@"
32
32
33
# Host and optimization settings 
33
# Host and optimization settings 
34
# ==============================
34
# ==============================
Lines 71-83 Link Here
71
# PORTAGE_TMPDIR is the location portage will use for compilations and
71
# PORTAGE_TMPDIR is the location portage will use for compilations and
72
#     temporary storage of data. This can get VERY large depending upon
72
#     temporary storage of data. This can get VERY large depending upon
73
#     the application being installed.
73
#     the application being installed.
74
#PORTAGE_TMPDIR=/var/tmp
74
#PORTAGE_TMPDIR=/@affix@var/tmp
75
#
75
#
76
# PORTDIR is the location of the portage tree. This is the repository
76
# PORTDIR is the location of the portage tree. This is the repository
77
#     for all profile information as well as all ebuilds. This directory
77
#     for all profile information as well as all ebuilds. This directory
78
#     itself can reach 200M. If you change this, you must update your
78
#     itself can reach 200M. If you change this, you must update your
79
#     /etc/make.profile symlink accordingly.
79
#     /@affix@etc/make.profile symlink accordingly.
80
#PORTDIR=/usr/portage
80
#PORTDIR=@prefix@/portage
81
#
81
#
82
# DISTDIR is where all of the source code tarballs will be placed for
82
# DISTDIR is where all of the source code tarballs will be placed for
83
#     emerges. The source code is maintained here unless you delete
83
#     emerges. The source code is maintained here unless you delete
Lines 97-103 Link Here
97
#     providing a directory. Permissions will be modified as needed IF the
97
#     providing a directory. Permissions will be modified as needed IF the
98
#     directory exists, otherwise logging will be disabled. NNNN is the
98
#     directory exists, otherwise logging will be disabled. NNNN is the
99
#     increment at the time the log is created. Logs are thus sequential.
99
#     increment at the time the log is created. Logs are thus sequential.
100
#PORT_LOGDIR=/var/log/portage
100
#PORT_LOGDIR=/@affix@var/log/portage
101
#
101
#
102
# PORTDIR_OVERLAY is a directory where local ebuilds may be stored without
102
# PORTDIR_OVERLAY is a directory where local ebuilds may be stored without
103
#     concern that they will be deleted by rsync updates. Default is not
103
#     concern that they will be deleted by rsync updates. Default is not
Lines 108-114 Link Here
108
# ==============
108
# ==============
109
#
109
#
110
# If you need to set a proxy for wget or lukemftp, add the appropriate "export
110
# If you need to set a proxy for wget or lukemftp, add the appropriate "export
111
# ftp_proxy=<proxy>" and "export http_proxy=<proxy>" lines to /etc/profile if
111
# ftp_proxy=<proxy>" and "export http_proxy=<proxy>" lines to /@affix@etc/profile if
112
# all users on your system should use them.
112
# all users on your system should use them.
113
#
113
#
114
# Portage uses wget by default. Here are some settings for some alternate
114
# Portage uses wget by default. Here are some settings for some alternate
Lines 116-127 Link Here
116
# will be available.
116
# will be available.
117
#
117
#
118
# Default fetch command (5 tries, passive ftp for firewall compatibility)
118
# Default fetch command (5 tries, passive ftp for firewall compatibility)
119
#FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
119
#FETCHCOMMAND="@WGET@ -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
120
#RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
120
#RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
121
#
121
#
122
# Using wget, ratelimiting downloads
122
# Using wget, ratelimiting downloads
123
#FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
123
#FETCHCOMMAND="@WGET@ -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
124
#RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
124
#RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
125
#
125
#
126
# Lukemftp (BSD ftp):
126
# Lukemftp (BSD ftp):
127
#FETCHCOMMAND="/usr/bin/lukemftp -s -a -o \${DISTDIR}/\${FILE} \${URI}"
127
#FETCHCOMMAND="/usr/bin/lukemftp -s -a -o \${DISTDIR}/\${FILE} \${URI}"
Lines 230-236 Link Here
230
#  'distcc'      enables distcc support via CC.
230
#  'distcc'      enables distcc support via CC.
231
#  'distlocks'   enables distfiles locking using fcntl or hardlinks. This
231
#  'distlocks'   enables distfiles locking using fcntl or hardlinks. This
232
#                is enabled by default. Tools exist to help clean the locks
232
#                is enabled by default. Tools exist to help clean the locks
233
#                after crashes: /usr/lib/portage/bin/clean_locks.
233
#                after crashes: @PORTAGE_BASE@/bin/clean_locks.
234
#  'fixpackages' allows portage to fix binary packages that are stored in
234
#  'fixpackages' allows portage to fix binary packages that are stored in
235
#                PKGDIR. This can consume a lot of time. 'fixpackages' is
235
#                PKGDIR. This can consume a lot of time. 'fixpackages' is
236
#                also a script that can be run at any given time to force
236
#                also a script that can be run at any given time to force
Lines 264-270 Link Here
264
#     2G, and will be set if not defined otherwise and ccache is in features. 
264
#     2G, and will be set if not defined otherwise and ccache is in features. 
265
#     Portage will set the default ccache dir if it is not present in the
265
#     Portage will set the default ccache dir if it is not present in the
266
#     user's environment, for userpriv it sets: ${PORTAGE_TMPDIR}/ccache
266
#     user's environment, for userpriv it sets: ${PORTAGE_TMPDIR}/ccache
267
#     (/var/tmp/ccache), and for regular use the default is /root/.ccache.
267
#     (/@affix@var/tmp/ccache), and for regular use the default is /root/.ccache.
268
#     Sizes are specified with 'G' 'M' or 'K'.
268
#     Sizes are specified with 'G' 'M' or 'K'.
269
#     '2G' for 2 gigabytes, '2048M' for 2048 megabytes (same as 2G).
269
#     '2G' for 2 gigabytes, '2048M' for 2048 megabytes (same as 2G).
270
#CCACHE_SIZE="512M"
270
#CCACHE_SIZE="512M"
Lines 277-283 Link Here
277
#     consideration. This may cause dependency failures if you are not careful.
277
#     consideration. This may cause dependency failures if you are not careful.
278
#     The file format is one pattern per line, blanks and ';' or '#' lines are
278
#     The file format is one pattern per line, blanks and ';' or '#' lines are
279
#     comments. See 'man rsync' for more details on the exclude-from format.
279
#     comments. See 'man rsync' for more details on the exclude-from format.
280
#RSYNC_EXCLUDEFROM=/etc/portage/rsync_excludes
280
#RSYNC_EXCLUDEFROM=/@affix@etc/portage/rsync_excludes
281
281
282
# logging related variables:
282
# logging related variables:
283
# PORTAGE_LOG_CLASSES: selects messages to be logged, possible values are:
283
# PORTAGE_LOG_CLASSES: selects messages to be logged, possible values are:
(-)portage-cvs/cnf/make.conf.sh (-13 / +13 lines)
Lines 15-21 Link Here
15
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1
15
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1
16
#
16
#
17
# The available list of use flags with descriptions is in your portage tree.
17
# The available list of use flags with descriptions is in your portage tree.
18
# Use 'less' to view them:  --> less /usr/portage/profiles/use.desc <--
18
# Use 'less' to view them:  --> less @prefix@/portage/profiles/use.desc <--
19
#
19
#
20
# 'ufed' is an ncurses/dialog interface available in portage to make handling
20
# 'ufed' is an ncurses/dialog interface available in portage to make handling
21
# useflags for you. 'emerge app-portage/ufed'
21
# useflags for you. 'emerge app-portage/ufed'
Lines 27-33 Link Here
27
# ============
27
# ============
28
#
28
#
29
# Change this line as appropriate (sh, sh2, sh3, sh4, sh5).
29
# Change this line as appropriate (sh, sh2, sh3, sh4, sh5).
30
CHOST="sh-unknown-linux-gnu"
30
CHOST="@target@"
31
31
32
# Host and optimization settings 
32
# Host and optimization settings 
33
# ==============================
33
# ==============================
Lines 79-90 Link Here
79
# PORTAGE_TMPDIR is the location portage will use for compilations and
79
# PORTAGE_TMPDIR is the location portage will use for compilations and
80
#     temporary storage of data. This can get VERY large depending upon
80
#     temporary storage of data. This can get VERY large depending upon
81
#     the application being installed.
81
#     the application being installed.
82
#PORTAGE_TMPDIR=/var/tmp
82
#PORTAGE_TMPDIR=/@affix@var/tmp
83
#
83
#
84
# PORTDIR is the location of the portage tree. This is the repository
84
# PORTDIR is the location of the portage tree. This is the repository
85
#     for all profile information as well as all ebuilds. This directory
85
#     for all profile information as well as all ebuilds. This directory
86
#     itself can reach 200M. WE DO NOT RECOMMEND that you change this.
86
#     itself can reach 200M. WE DO NOT RECOMMEND that you change this.
87
#PORTDIR=/usr/portage
87
#PORTDIR=@prefix@/portage
88
#
88
#
89
# DISTDIR is where all of the source code tarballs will be placed for
89
# DISTDIR is where all of the source code tarballs will be placed for
90
#     emerges. The source code is maintained here unless you delete
90
#     emerges. The source code is maintained here unless you delete
Lines 104-110 Link Here
104
#     providing a directory. Permissions will be modified as needed IF the
104
#     providing a directory. Permissions will be modified as needed IF the
105
#     directory exists, otherwise logging will be disabled. NNNN is the
105
#     directory exists, otherwise logging will be disabled. NNNN is the
106
#     increment at the time the log is created. Logs are thus sequential.
106
#     increment at the time the log is created. Logs are thus sequential.
107
#PORT_LOGDIR=/var/log/portage
107
#PORT_LOGDIR=/@affix@var/log/portage
108
#
108
#
109
# PORTDIR_OVERLAY is a directory where local ebuilds may be stored without
109
# PORTDIR_OVERLAY is a directory where local ebuilds may be stored without
110
#     concern that they will be deleted by rsync updates. Default is not
110
#     concern that they will be deleted by rsync updates. Default is not
Lines 115-121 Link Here
115
# ==============
115
# ==============
116
#
116
#
117
# If you need to set a proxy for wget or lukemftp, add the appropriate "export
117
# If you need to set a proxy for wget or lukemftp, add the appropriate "export
118
# ftp_proxy=<proxy>" and "export http_proxy=<proxy>" lines to /etc/profile if
118
# ftp_proxy=<proxy>" and "export http_proxy=<proxy>" lines to /@affix@etc/profile if
119
# all users on your system should use them.
119
# all users on your system should use them.
120
#
120
#
121
# Portage uses wget by default. Here are some settings for some alternate
121
# Portage uses wget by default. Here are some settings for some alternate
Lines 123-134 Link Here
123
# will be available.
123
# will be available.
124
#
124
#
125
# Default fetch command (5 tries, passive ftp for firewall compatibility)
125
# Default fetch command (5 tries, passive ftp for firewall compatibility)
126
#FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
126
#FETCHCOMMAND="@WGET@ -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
127
#RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
127
#RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
128
#
128
#
129
# Using wget, ratelimiting downloads
129
# Using wget, ratelimiting downloads
130
#FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
130
#FETCHCOMMAND="@WGET@ -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
131
#RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
131
#RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
132
#
132
#
133
# Lukemftp (BSD ftp):
133
# Lukemftp (BSD ftp):
134
#FETCHCOMMAND="/usr/bin/lukemftp -s -a -o \${DISTDIR}/\${FILE} \${URI}"
134
#FETCHCOMMAND="/usr/bin/lukemftp -s -a -o \${DISTDIR}/\${FILE} \${URI}"
Lines 227-233 Link Here
227
#  'distcc'      enables distcc support via CC.
227
#  'distcc'      enables distcc support via CC.
228
#  'distlocks'   enables distfiles locking using fcntl or hardlinks. This
228
#  'distlocks'   enables distfiles locking using fcntl or hardlinks. This
229
#                is enabled by default. Tools exist to help clean the locks
229
#                is enabled by default. Tools exist to help clean the locks
230
#                after crashes: /usr/lib/portage/bin/clean_locks.
230
#                after crashes: @PORTAGE_BASE@/bin/clean_locks.
231
#  'fixpackages' allows portage to fix binary packages that are stored in
231
#  'fixpackages' allows portage to fix binary packages that are stored in
232
#                PKGDIR. This can consume a lot of time. 'fixpackages' is
232
#                PKGDIR. This can consume a lot of time. 'fixpackages' is
233
#                also a script that can be run at any given time to force
233
#                also a script that can be run at any given time to force
Lines 261-267 Link Here
261
#     2G, and will be set if not defined otherwise and ccache is in features. 
261
#     2G, and will be set if not defined otherwise and ccache is in features. 
262
#     Portage will set the default ccache dir if it is not present in the
262
#     Portage will set the default ccache dir if it is not present in the
263
#     user's environment, for userpriv it sets: ${PORTAGE_TMPDIR}/ccache
263
#     user's environment, for userpriv it sets: ${PORTAGE_TMPDIR}/ccache
264
#     (/var/tmp/ccache), and for regular use the default is /root/.ccache.
264
#     (/@affix@var/tmp/ccache), and for regular use the default is /root/.ccache.
265
#     Sizes are specified with 'G' 'M' or 'K'.
265
#     Sizes are specified with 'G' 'M' or 'K'.
266
#     '2G' for 2 gigabytes, '2048M' for 2048 megabytes (same as 2G).
266
#     '2G' for 2 gigabytes, '2048M' for 2048 megabytes (same as 2G).
267
#CCACHE_SIZE="512M"
267
#CCACHE_SIZE="512M"
Lines 274-280 Link Here
274
#     consideration. This may cause dependency failures if you are not careful.
274
#     consideration. This may cause dependency failures if you are not careful.
275
#     The file format is one pattern per line, blanks and ';' or '#' lines are
275
#     The file format is one pattern per line, blanks and ';' or '#' lines are
276
#     comments. See 'man rsync' for more details on the exclude-from format.
276
#     comments. See 'man rsync' for more details on the exclude-from format.
277
#RSYNC_EXCLUDEFROM=/etc/portage/rsync_excludes
277
#RSYNC_EXCLUDEFROM=/@affix@etc/portage/rsync_excludes
278
278
279
# logging related variables:
279
# logging related variables:
280
# PORTAGE_LOG_CLASSES: selects messages to be logged, possible values are:
280
# PORTAGE_LOG_CLASSES: selects messages to be logged, possible values are:
(-)portage-cvs/cnf/make.conf.sparc (-14 / +14 lines)
Lines 15-21 Link Here
15
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1
15
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1
16
#
16
#
17
# The available list of use flags with descriptions is in your portage tree.
17
# The available list of use flags with descriptions is in your portage tree.
18
# Use 'less' to view them:  --> less /usr/portage/profiles/use.desc <--
18
# Use 'less' to view them:  --> less @prefix@/portage/profiles/use.desc <--
19
#
19
#
20
# 'ufed' is an ncurses/dialog interface available in portage to make handling
20
# 'ufed' is an ncurses/dialog interface available in portage to make handling
21
# useflags for you. 'emerge app-portage/ufed'
21
# useflags for you. 'emerge app-portage/ufed'
Lines 30-36 Link Here
30
# destroying your system, you will recieve no support and your bugs will be 
30
# destroying your system, you will recieve no support and your bugs will be 
31
# marked INVALID if you change this.
31
# marked INVALID if you change this.
32
#
32
#
33
# CHOST="sparc-unknown-linux-gnu"
33
CHOST="@target@"
34
34
35
# Host and optimization settings 
35
# Host and optimization settings 
36
# ==============================
36
# ==============================
Lines 106-118 Link Here
106
# PORTAGE_TMPDIR is the location portage will use for compilations and
106
# PORTAGE_TMPDIR is the location portage will use for compilations and
107
#     temporary storage of data. This can get VERY large depending upon
107
#     temporary storage of data. This can get VERY large depending upon
108
#     the application being installed.
108
#     the application being installed.
109
#PORTAGE_TMPDIR=/var/tmp
109
#PORTAGE_TMPDIR=/@affix@var/tmp
110
#
110
#
111
# PORTDIR is the location of the portage tree. This is the repository
111
# PORTDIR is the location of the portage tree. This is the repository
112
#     for all profile information as well as all ebuilds. This directory
112
#     for all profile information as well as all ebuilds. This directory
113
#     itself can reach 200M. If you change this, you must update your
113
#     itself can reach 200M. If you change this, you must update your
114
#     /etc/make.profile symlink accordingly.
114
#     /@affix@etc/make.profile symlink accordingly.
115
#PORTDIR=/usr/portage
115
#PORTDIR=@prefix@/portage
116
#
116
#
117
# DISTDIR is where all of the source code tarballs will be placed for
117
# DISTDIR is where all of the source code tarballs will be placed for
118
#     emerges. The source code is maintained here unless you delete
118
#     emerges. The source code is maintained here unless you delete
Lines 132-138 Link Here
132
#     providing a directory. Permissions will be modified as needed IF the
132
#     providing a directory. Permissions will be modified as needed IF the
133
#     directory exists, otherwise logging will be disabled. NNNN is the
133
#     directory exists, otherwise logging will be disabled. NNNN is the
134
#     increment at the time the log is created. Logs are thus sequential.
134
#     increment at the time the log is created. Logs are thus sequential.
135
#PORT_LOGDIR=/var/log/portage
135
#PORT_LOGDIR=/@affix@var/log/portage
136
#
136
#
137
# PORTDIR_OVERLAY is a directory where local ebuilds may be stored without
137
# PORTDIR_OVERLAY is a directory where local ebuilds may be stored without
138
#     concern that they will be deleted by rsync updates. Default is not
138
#     concern that they will be deleted by rsync updates. Default is not
Lines 143-149 Link Here
143
# ==============
143
# ==============
144
#
144
#
145
# If you need to set a proxy for wget or lukemftp, add the appropriate "export
145
# If you need to set a proxy for wget or lukemftp, add the appropriate "export
146
# ftp_proxy=<proxy>" and "export http_proxy=<proxy>" lines to /etc/profile if
146
# ftp_proxy=<proxy>" and "export http_proxy=<proxy>" lines to /@affix@etc/profile if
147
# all users on your system should use them.
147
# all users on your system should use them.
148
#
148
#
149
# Portage uses wget by default. Here are some settings for some alternate
149
# Portage uses wget by default. Here are some settings for some alternate
Lines 151-162 Link Here
151
# will be available.
151
# will be available.
152
#
152
#
153
# Default fetch command (5 tries, passive ftp for firewall compatibility)
153
# Default fetch command (5 tries, passive ftp for firewall compatibility)
154
#FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
154
#FETCHCOMMAND="@WGET@ -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
155
#RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
155
#RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
156
#
156
#
157
# Using wget, ratelimiting downloads
157
# Using wget, ratelimiting downloads
158
#FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
158
#FETCHCOMMAND="@WGET@ -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
159
#RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
159
#RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
160
#
160
#
161
# Lukemftp (BSD ftp):
161
# Lukemftp (BSD ftp):
162
#FETCHCOMMAND="/usr/bin/lukemftp -s -a -o \${DISTDIR}/\${FILE} \${URI}"
162
#FETCHCOMMAND="/usr/bin/lukemftp -s -a -o \${DISTDIR}/\${FILE} \${URI}"
Lines 265-271 Link Here
265
#  'distcc'      enables distcc support via CC.
265
#  'distcc'      enables distcc support via CC.
266
#  'distlocks'   enables distfiles locking using fcntl or hardlinks. This
266
#  'distlocks'   enables distfiles locking using fcntl or hardlinks. This
267
#                is enabled by default. Tools exist to help clean the locks
267
#                is enabled by default. Tools exist to help clean the locks
268
#                after crashes: /usr/lib/portage/bin/clean_locks.
268
#                after crashes: @PORTAGE_BASE@/bin/clean_locks.
269
#  'fixpackages' allows portage to fix binary packages that are stored in
269
#  'fixpackages' allows portage to fix binary packages that are stored in
270
#                PKGDIR. This can consume a lot of time. 'fixpackages' is
270
#                PKGDIR. This can consume a lot of time. 'fixpackages' is
271
#                also a script that can be run at any given time to force
271
#                also a script that can be run at any given time to force
Lines 299-305 Link Here
299
#     2G, and will be set if not defined otherwise and ccache is in features. 
299
#     2G, and will be set if not defined otherwise and ccache is in features. 
300
#     Portage will set the default ccache dir if it is not present in the
300
#     Portage will set the default ccache dir if it is not present in the
301
#     user's environment, for userpriv it sets: ${PORTAGE_TMPDIR}/ccache
301
#     user's environment, for userpriv it sets: ${PORTAGE_TMPDIR}/ccache
302
#     (/var/tmp/ccache), and for regular use the default is /root/.ccache.
302
#     (/@affix@var/tmp/ccache), and for regular use the default is /root/.ccache.
303
#     Sizes are specified with 'G' 'M' or 'K'.
303
#     Sizes are specified with 'G' 'M' or 'K'.
304
#     '2G' for 2 gigabytes, '2048M' for 2048 megabytes (same as 2G).
304
#     '2G' for 2 gigabytes, '2048M' for 2048 megabytes (same as 2G).
305
#CCACHE_SIZE="512M"
305
#CCACHE_SIZE="512M"
Lines 312-318 Link Here
312
#     consideration. This may cause dependency failures if you are not careful.
312
#     consideration. This may cause dependency failures if you are not careful.
313
#     The file format is one pattern per line, blanks and ';' or '#' lines are
313
#     The file format is one pattern per line, blanks and ';' or '#' lines are
314
#     comments. See 'man rsync' for more details on the exclude-from format.
314
#     comments. See 'man rsync' for more details on the exclude-from format.
315
#RSYNC_EXCLUDEFROM=/etc/portage/rsync_excludes
315
#RSYNC_EXCLUDEFROM=/@affix@etc/portage/rsync_excludes
316
316
317
# logging related variables:
317
# logging related variables:
318
# PORTAGE_LOG_CLASSES: selects messages to be logged, possible values are:
318
# PORTAGE_LOG_CLASSES: selects messages to be logged, possible values are:
(-)portage-cvs/cnf/make.conf.x86 (-14 / +14 lines)
Lines 15-21 Link Here
15
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1
15
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1
16
#
16
#
17
# The available list of use flags with descriptions is in your portage tree.
17
# The available list of use flags with descriptions is in your portage tree.
18
# Use 'less' to view them:  --> less /usr/portage/profiles/use.desc <--
18
# Use 'less' to view them:  --> less @prefix@/portage/profiles/use.desc <--
19
#
19
#
20
# 'ufed' is an ncurses/dialog interface available in portage to make handling
20
# 'ufed' is an ncurses/dialog interface available in portage to make handling
21
# useflags for you. 'emerge app-portage/ufed'
21
# useflags for you. 'emerge app-portage/ufed'
Lines 30-36 Link Here
30
# Change this line as appropriate (i686, i586, i486 or i386).
30
# Change this line as appropriate (i686, i586, i486 or i386).
31
# All modern systems (even Athlons) should use "i686-pc-linux-gnu".
31
# All modern systems (even Athlons) should use "i686-pc-linux-gnu".
32
# All K6's are i586.
32
# All K6's are i586.
33
CHOST="i686-pc-linux-gnu"
33
CHOST="@target@"
34
34
35
# Host and optimization settings 
35
# Host and optimization settings 
36
# ==============================
36
# ==============================
Lines 106-118 Link Here
106
# PORTAGE_TMPDIR is the location portage will use for compilations and
106
# PORTAGE_TMPDIR is the location portage will use for compilations and
107
#     temporary storage of data. This can get VERY large depending upon
107
#     temporary storage of data. This can get VERY large depending upon
108
#     the application being installed.
108
#     the application being installed.
109
#PORTAGE_TMPDIR=/var/tmp
109
#PORTAGE_TMPDIR=/@affix@var/tmp
110
#
110
#
111
# PORTDIR is the location of the portage tree. This is the repository
111
# PORTDIR is the location of the portage tree. This is the repository
112
#     for all profile information as well as all ebuilds. This directory
112
#     for all profile information as well as all ebuilds. This directory
113
#     itself can reach 200M. If you change this, you must update your
113
#     itself can reach 200M. If you change this, you must update your
114
#     /etc/make.profile symlink accordingly.
114
#     /@affix@etc/make.profile symlink accordingly.
115
#PORTDIR=/usr/portage
115
#PORTDIR=@prefix@/portage
116
#
116
#
117
# DISTDIR is where all of the source code tarballs will be placed for
117
# DISTDIR is where all of the source code tarballs will be placed for
118
#     emerges. The source code is maintained here unless you delete
118
#     emerges. The source code is maintained here unless you delete
Lines 132-138 Link Here
132
#     providing a directory. Permissions will be modified as needed IF the
132
#     providing a directory. Permissions will be modified as needed IF the
133
#     directory exists, otherwise logging will be disabled. NNNN is the
133
#     directory exists, otherwise logging will be disabled. NNNN is the
134
#     increment at the time the log is created. Logs are thus sequential.
134
#     increment at the time the log is created. Logs are thus sequential.
135
#PORT_LOGDIR=/var/log/portage
135
#PORT_LOGDIR=/@affix@var/log/portage
136
#
136
#
137
# PORTDIR_OVERLAY is a directory where local ebuilds may be stored without
137
# PORTDIR_OVERLAY is a directory where local ebuilds may be stored without
138
#     concern that they will be deleted by rsync updates. Default is not
138
#     concern that they will be deleted by rsync updates. Default is not
Lines 143-149 Link Here
143
# ==============
143
# ==============
144
#
144
#
145
# If you need to set a proxy for wget or lukemftp, add the appropriate "export
145
# If you need to set a proxy for wget or lukemftp, add the appropriate "export
146
# ftp_proxy=<proxy>" and "export http_proxy=<proxy>" lines to /etc/profile if
146
# ftp_proxy=<proxy>" and "export http_proxy=<proxy>" lines to /@affix@etc/profile if
147
# all users on your system should use them.
147
# all users on your system should use them.
148
#
148
#
149
# Portage uses wget by default. Here are some settings for some alternate
149
# Portage uses wget by default. Here are some settings for some alternate
Lines 151-162 Link Here
151
# will be available.
151
# will be available.
152
#
152
#
153
# Default fetch command (5 tries, passive ftp for firewall compatibility)
153
# Default fetch command (5 tries, passive ftp for firewall compatibility)
154
#FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
154
#FETCHCOMMAND="@WGET@ -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
155
#RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
155
#RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
156
#
156
#
157
# Using wget, ratelimiting downloads
157
# Using wget, ratelimiting downloads
158
#FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
158
#FETCHCOMMAND="@WGET@ -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
159
#RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
159
#RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
160
#
160
#
161
# Lukemftp (BSD ftp):
161
# Lukemftp (BSD ftp):
162
#FETCHCOMMAND="/usr/bin/lukemftp -s -a -o \${DISTDIR}/\${FILE} \${URI}"
162
#FETCHCOMMAND="/usr/bin/lukemftp -s -a -o \${DISTDIR}/\${FILE} \${URI}"
Lines 265-271 Link Here
265
#  'distcc'      enables distcc support via CC.
265
#  'distcc'      enables distcc support via CC.
266
#  'distlocks'   enables distfiles locking using fcntl or hardlinks. This
266
#  'distlocks'   enables distfiles locking using fcntl or hardlinks. This
267
#                is enabled by default. Tools exist to help clean the locks
267
#                is enabled by default. Tools exist to help clean the locks
268
#                after crashes: /usr/lib/portage/bin/clean_locks.
268
#                after crashes: @PORTAGE_BASE@/bin/clean_locks.
269
#  'fixpackages' allows portage to fix binary packages that are stored in
269
#  'fixpackages' allows portage to fix binary packages that are stored in
270
#                PKGDIR. This can consume a lot of time. 'fixpackages' is
270
#                PKGDIR. This can consume a lot of time. 'fixpackages' is
271
#                also a script that can be run at any given time to force
271
#                also a script that can be run at any given time to force
Lines 299-305 Link Here
299
#     2G, and will be set if not defined otherwise and ccache is in features. 
299
#     2G, and will be set if not defined otherwise and ccache is in features. 
300
#     Portage will set the default ccache dir if it is not present in the
300
#     Portage will set the default ccache dir if it is not present in the
301
#     user's environment, for userpriv it sets: ${PORTAGE_TMPDIR}/ccache
301
#     user's environment, for userpriv it sets: ${PORTAGE_TMPDIR}/ccache
302
#     (/var/tmp/ccache), and for regular use the default is /root/.ccache.
302
#     (/@affix@var/tmp/ccache), and for regular use the default is /root/.ccache.
303
#     Sizes are specified with 'G' 'M' or 'K'.
303
#     Sizes are specified with 'G' 'M' or 'K'.
304
#     '2G' for 2 gigabytes, '2048M' for 2048 megabytes (same as 2G).
304
#     '2G' for 2 gigabytes, '2048M' for 2048 megabytes (same as 2G).
305
#CCACHE_SIZE="512M"
305
#CCACHE_SIZE="512M"
Lines 312-318 Link Here
312
#     consideration. This may cause dependency failures if you are not careful.
312
#     consideration. This may cause dependency failures if you are not careful.
313
#     The file format is one pattern per line, blanks and ';' or '#' lines are
313
#     The file format is one pattern per line, blanks and ';' or '#' lines are
314
#     comments. See 'man rsync' for more details on the exclude-from format.
314
#     comments. See 'man rsync' for more details on the exclude-from format.
315
#RSYNC_EXCLUDEFROM=/etc/portage/rsync_excludes
315
#RSYNC_EXCLUDEFROM=/@affix@etc/portage/rsync_excludes
316
316
317
# logging related variables:
317
# logging related variables:
318
# PORTAGE_LOG_CLASSES: selects messages to be logged, possible values are:
318
# PORTAGE_LOG_CLASSES: selects messages to be logged, possible values are:
(-)portage-cvs/cnf/make.conf.x86-fbsd (-14 / +14 lines)
Lines 15-21 Link Here
15
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1
15
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1
16
#
16
#
17
# The available list of use flags with descriptions is in your portage tree.
17
# The available list of use flags with descriptions is in your portage tree.
18
# Use 'less' to view them:  --> less /usr/portage/profiles/use.desc <--
18
# Use 'less' to view them:  --> less @prefix@/portage/profiles/use.desc <--
19
#
19
#
20
# 'ufed' is an ncurses/dialog interface available in portage to make handling
20
# 'ufed' is an ncurses/dialog interface available in portage to make handling
21
# useflags for you. 'emerge app-portage/ufed'
21
# useflags for you. 'emerge app-portage/ufed'
Lines 30-36 Link Here
30
# Change this line as appropriate (i686, i586, i486 or i386).
30
# Change this line as appropriate (i686, i586, i486 or i386).
31
# All modern systems (even Athlons) should use "i686-pc-linux-gnu".
31
# All modern systems (even Athlons) should use "i686-pc-linux-gnu".
32
# All K6's are i586.
32
# All K6's are i586.
33
CHOST="i686-unknown-freebsd5.3"
33
CHOST="@target@"
34
34
35
# Host and optimization settings 
35
# Host and optimization settings 
36
# ==============================
36
# ==============================
Lines 106-118 Link Here
106
# PORTAGE_TMPDIR is the location portage will use for compilations and
106
# PORTAGE_TMPDIR is the location portage will use for compilations and
107
#     temporary storage of data. This can get VERY large depending upon
107
#     temporary storage of data. This can get VERY large depending upon
108
#     the application being installed.
108
#     the application being installed.
109
#PORTAGE_TMPDIR=/var/tmp
109
#PORTAGE_TMPDIR=/@affix@var/tmp
110
#
110
#
111
# PORTDIR is the location of the portage tree. This is the repository
111
# PORTDIR is the location of the portage tree. This is the repository
112
#     for all profile information as well as all ebuilds. This directory
112
#     for all profile information as well as all ebuilds. This directory
113
#     itself can reach 200M. If you change this, you must update your
113
#     itself can reach 200M. If you change this, you must update your
114
#     /etc/make.profile symlink accordingly.
114
#     /@affix@etc/make.profile symlink accordingly.
115
#PORTDIR=/usr/portage
115
#PORTDIR=@prefix@/portage
116
#
116
#
117
# DISTDIR is where all of the source code tarballs will be placed for
117
# DISTDIR is where all of the source code tarballs will be placed for
118
#     emerges. The source code is maintained here unless you delete
118
#     emerges. The source code is maintained here unless you delete
Lines 132-138 Link Here
132
#     providing a directory. Permissions will be modified as needed IF the
132
#     providing a directory. Permissions will be modified as needed IF the
133
#     directory exists, otherwise logging will be disabled. NNNN is the
133
#     directory exists, otherwise logging will be disabled. NNNN is the
134
#     increment at the time the log is created. Logs are thus sequential.
134
#     increment at the time the log is created. Logs are thus sequential.
135
#PORT_LOGDIR=/var/log/portage
135
#PORT_LOGDIR=/@affix@var/log/portage
136
#
136
#
137
# PORTDIR_OVERLAY is a directory where local ebuilds may be stored without
137
# PORTDIR_OVERLAY is a directory where local ebuilds may be stored without
138
#     concern that they will be deleted by rsync updates. Default is not
138
#     concern that they will be deleted by rsync updates. Default is not
Lines 143-149 Link Here
143
# ==============
143
# ==============
144
#
144
#
145
# If you need to set a proxy for wget or lukemftp, add the appropriate "export
145
# If you need to set a proxy for wget or lukemftp, add the appropriate "export
146
# ftp_proxy=<proxy>" and "export http_proxy=<proxy>" lines to /etc/profile if
146
# ftp_proxy=<proxy>" and "export http_proxy=<proxy>" lines to /@affix@etc/profile if
147
# all users on your system should use them.
147
# all users on your system should use them.
148
#
148
#
149
# Portage uses wget by default. Here are some settings for some alternate
149
# Portage uses wget by default. Here are some settings for some alternate
Lines 151-162 Link Here
151
# will be available.
151
# will be available.
152
#
152
#
153
# Default fetch command (5 tries, passive ftp for firewall compatibility)
153
# Default fetch command (5 tries, passive ftp for firewall compatibility)
154
#FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
154
#FETCHCOMMAND="@WGET@ -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
155
#RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
155
#RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
156
#
156
#
157
# Using wget, ratelimiting downloads
157
# Using wget, ratelimiting downloads
158
#FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
158
#FETCHCOMMAND="@WGET@ -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
159
#RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
159
#RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
160
#
160
#
161
# Lukemftp (BSD ftp):
161
# Lukemftp (BSD ftp):
162
#FETCHCOMMAND="/usr/bin/lukemftp -s -a -o \${DISTDIR}/\${FILE} \${URI}"
162
#FETCHCOMMAND="/usr/bin/lukemftp -s -a -o \${DISTDIR}/\${FILE} \${URI}"
Lines 260-266 Link Here
260
#  'distcc'      enables distcc support via CC.
260
#  'distcc'      enables distcc support via CC.
261
#  'distlocks'   enables distfiles locking using fcntl or hardlinks. This
261
#  'distlocks'   enables distfiles locking using fcntl or hardlinks. This
262
#                is enabled by default. Tools exist to help clean the locks
262
#                is enabled by default. Tools exist to help clean the locks
263
#                after crashes: /usr/lib/portage/bin/clean_locks.
263
#                after crashes: @PORTAGE_BASE@/bin/clean_locks.
264
#  'fixpackages' allows portage to fix binary packages that are stored in
264
#  'fixpackages' allows portage to fix binary packages that are stored in
265
#                PKGDIR. This can consume a lot of time. 'fixpackages' is
265
#                PKGDIR. This can consume a lot of time. 'fixpackages' is
266
#                also a script that can be run at any given time to force
266
#                also a script that can be run at any given time to force
Lines 295-301 Link Here
295
#     2G, and will be set if not defined otherwise and ccache is in features. 
295
#     2G, and will be set if not defined otherwise and ccache is in features. 
296
#     Portage will set the default ccache dir if it is not present in the
296
#     Portage will set the default ccache dir if it is not present in the
297
#     user's environment, for userpriv it sets: ${PORTAGE_TMPDIR}/ccache
297
#     user's environment, for userpriv it sets: ${PORTAGE_TMPDIR}/ccache
298
#     (/var/tmp/ccache), and for regular use the default is /root/.ccache.
298
#     (/@affix@var/tmp/ccache), and for regular use the default is /root/.ccache.
299
#     Sizes are specified with 'G' 'M' or 'K'.
299
#     Sizes are specified with 'G' 'M' or 'K'.
300
#     '2G' for 2 gigabytes, '2048M' for 2048 megabytes (same as 2G).
300
#     '2G' for 2 gigabytes, '2048M' for 2048 megabytes (same as 2G).
301
#CCACHE_SIZE="512M"
301
#CCACHE_SIZE="512M"
Lines 308-311 Link Here
308
#     consideration. This may cause dependency failures if you are not careful.
308
#     consideration. This may cause dependency failures if you are not careful.
309
#     The file format is one pattern per line, blanks and ';' or '#' lines are
309
#     The file format is one pattern per line, blanks and ';' or '#' lines are
310
#     comments. See 'man rsync' for more details on the exclude-from format.
310
#     comments. See 'man rsync' for more details on the exclude-from format.
311
#RSYNC_EXCLUDEFROM=/etc/portage/rsync_excludes
311
#RSYNC_EXCLUDEFROM=/@affix@etc/portage/rsync_excludes
(-)portage-cvs/cnf/make.globals (-7 / +7 lines)
Lines 16-37 Link Here
16
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
16
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
17
17
18
# Host-type
18
# Host-type
19
CHOST=i686-pc-linux-gnu
19
CHOST="@target@"
20
PORTAGE_TMPDIR=/var/tmp
20
PORTAGE_TMPDIR=/@affix@var/tmp
21
21
22
PORTDIR=/usr/portage
22
PORTDIR=@prefix@/portage
23
DISTDIR=${PORTDIR}/distfiles
23
DISTDIR=${PORTDIR}/distfiles
24
PKGDIR=${PORTDIR}/packages
24
PKGDIR=${PORTDIR}/packages
25
RPMDIR=${PORTDIR}/rpm
25
RPMDIR=${PORTDIR}/rpm
26
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config"
26
CONFIG_PROTECT="/@affix@etc /@affix@var/qmail/control @prefix@/share/config @prefix@/kde/2/share/config @prefix@/kde/3/share/config"
27
CONFIG_PROTECT_MASK="/etc/gconf"
27
CONFIG_PROTECT_MASK="/@affix@etc/gconf"
28
28
29
# Options passed to make during the build process
29
# Options passed to make during the build process
30
MAKEOPTS="-j2"
30
MAKEOPTS="-j2"
31
31
32
# Fetching command (5 tries, passive ftp for firewall compatibility)
32
# Fetching command (5 tries, passive ftp for firewall compatibility)
33
FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
33
FETCHCOMMAND="@WGET@ -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
34
RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
34
RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
35
35
36
CFLAGS="-O2 -mcpu=i686 -pipe"
36
CFLAGS="-O2 -mcpu=i686 -pipe"
37
CXXFLAGS=${CFLAGS}
37
CXXFLAGS=${CFLAGS}
(-)portage-cvs/cnf/make.globals.alpha (-7 / +7 lines)
Lines 15-36 Link Here
15
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
15
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
16
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
16
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
17
# Host-type
17
# Host-type
18
CHOST="alpha-unknown-linux-gnu"
18
CHOST="@target@"
19
PORTAGE_TMPDIR=/var/tmp
19
PORTAGE_TMPDIR=/@affix@var/tmp
20
20
21
PORTDIR=/usr/portage
21
PORTDIR=@prefix@/portage
22
DISTDIR=${PORTDIR}/distfiles
22
DISTDIR=${PORTDIR}/distfiles
23
PKGDIR=${PORTDIR}/packages
23
PKGDIR=${PORTDIR}/packages
24
RPMDIR=${PORTDIR}/rpm
24
RPMDIR=${PORTDIR}/rpm
25
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config"
25
CONFIG_PROTECT="/@affix@etc /@affix@var/qmail/control @prefix@/share/config @prefix@/kde/2/share/config @prefix@/kde/3/share/config"
26
CONFIG_PROTECT_MASK="/etc/gconf"
26
CONFIG_PROTECT_MASK="/@affix@etc/gconf"
27
27
28
# Options passed to make during the build process
28
# Options passed to make during the build process
29
MAKEOPTS="-j2"
29
MAKEOPTS="-j2"
30
30
31
# Fetching command (5 tries, passive ftp for firewall compatibility)
31
# Fetching command (5 tries, passive ftp for firewall compatibility)
32
FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
32
FETCHCOMMAND="@WGET@ -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
33
RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
33
RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
34
34
35
CFLAGS="-O2 -pipe"
35
CFLAGS="-O2 -pipe"
36
CXXFLAGS=${CFLAGS}
36
CXXFLAGS=${CFLAGS}
(-)portage-cvs/cnf/make.globals.amd64 (-7 / +7 lines)
Lines 15-36 Link Here
15
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
15
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
16
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
16
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
17
# Host-type
17
# Host-type
18
CHOST=x86_64-pc-linux-gnu
18
CHOST="@target@"
19
PORTAGE_TMPDIR=/var/tmp
19
PORTAGE_TMPDIR=/@affix@var/tmp
20
20
21
PORTDIR=/usr/portage
21
PORTDIR=@prefix@/portage
22
DISTDIR=${PORTDIR}/distfiles
22
DISTDIR=${PORTDIR}/distfiles
23
PKGDIR=${PORTDIR}/packages
23
PKGDIR=${PORTDIR}/packages
24
RPMDIR=${PORTDIR}/rpm
24
RPMDIR=${PORTDIR}/rpm
25
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config"
25
CONFIG_PROTECT="/@affix@etc /@affix@var/qmail/control @prefix@/share/config @prefix@/kde/2/share/config @prefix@/kde/3/share/config"
26
CONFIG_PROTECT_MASK="/etc/gconf"
26
CONFIG_PROTECT_MASK="/@affix@etc/gconf"
27
27
28
# Options passed to make during the build process
28
# Options passed to make during the build process
29
MAKEOPTS="-j2"
29
MAKEOPTS="-j2"
30
30
31
# Fetching command (5 tries, passive ftp for firewall compatibility)
31
# Fetching command (5 tries, passive ftp for firewall compatibility)
32
FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
32
FETCHCOMMAND="@WGET@ -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
33
RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
33
RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
34
34
35
CFLAGS="-march=x86-64 -O2 -pipe"
35
CFLAGS="-march=x86-64 -O2 -pipe"
36
CXXFLAGS=${CFLAGS}
36
CXXFLAGS=${CFLAGS}
(-)portage-cvs/cnf/make.globals.arm (-7 / +7 lines)
Lines 15-36 Link Here
15
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
15
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
16
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
16
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
17
# Host-type
17
# Host-type
18
CHOST=arm-unknown-linux-gnu
18
CHOST="@target@"
19
PORTAGE_TMPDIR=/var/tmp
19
PORTAGE_TMPDIR=/@affix@var/tmp
20
20
21
PORTDIR=/usr/portage
21
PORTDIR=@prefix@/portage
22
DISTDIR=${PORTDIR}/distfiles
22
DISTDIR=${PORTDIR}/distfiles
23
PKGDIR=${PORTDIR}/packages
23
PKGDIR=${PORTDIR}/packages
24
RPMDIR=${PORTDIR}/rpm
24
RPMDIR=${PORTDIR}/rpm
25
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config"
25
CONFIG_PROTECT="/@affix@etc /@affix@var/qmail/control @prefix@/share/config @prefix@/kde/2/share/config @prefix@/kde/3/share/config"
26
CONFIG_PROTECT_MASK="/etc/gconf"
26
CONFIG_PROTECT_MASK="/@affix@etc/gconf"
27
27
28
# Options passed to make during the build process
28
# Options passed to make during the build process
29
MAKEOPTS="-j2"
29
MAKEOPTS="-j2"
30
30
31
# Fetching command (5 tries, passive ftp for firewall compatibility)
31
# Fetching command (5 tries, passive ftp for firewall compatibility)
32
FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
32
FETCHCOMMAND="@WGET@ -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
33
RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
33
RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
34
34
35
CFLAGS="-O2 -mcpu=strongarm110 -pipe"
35
CFLAGS="-O2 -mcpu=strongarm110 -pipe"
36
CXXFLAGS=${CFLAGS}
36
CXXFLAGS=${CFLAGS}
(-)portage-cvs/cnf/make.globals.hppa (-7 / +7 lines)
Lines 15-36 Link Here
15
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
15
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
16
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
16
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
17
# Host-type
17
# Host-type
18
CHOST=hppa-unknown-linux-gnu
18
CHOST="@target@"
19
PORTAGE_TMPDIR=/var/tmp
19
PORTAGE_TMPDIR=/@affix@var/tmp
20
20
21
PORTDIR=/usr/portage
21
PORTDIR=@prefix@/portage
22
DISTDIR=${PORTDIR}/distfiles
22
DISTDIR=${PORTDIR}/distfiles
23
PKGDIR=${PORTDIR}/packages
23
PKGDIR=${PORTDIR}/packages
24
RPMDIR=${PORTDIR}/rpm
24
RPMDIR=${PORTDIR}/rpm
25
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config"
25
CONFIG_PROTECT="/@affix@etc /@affix@var/qmail/control @prefix@/share/config @prefix@/kde/2/share/config @prefix@/kde/3/share/config"
26
CONFIG_PROTECT_MASK="/etc/gconf"
26
CONFIG_PROTECT_MASK="/@affix@etc/gconf"
27
27
28
# Options passed to make during the build process
28
# Options passed to make during the build process
29
MAKEOPTS="-j2"
29
MAKEOPTS="-j2"
30
30
31
# Fetching command (5 tries, passive ftp for firewall compatibility)
31
# Fetching command (5 tries, passive ftp for firewall compatibility)
32
FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
32
FETCHCOMMAND="@WGET@ -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
33
RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
33
RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
34
34
35
CFLAGS="-O2 -pipe"
35
CFLAGS="-O2 -pipe"
36
CXXFLAGS="-O1 -pipe"
36
CXXFLAGS="-O1 -pipe"
(-)portage-cvs/cnf/make.globals.ia64 (-7 / +7 lines)
Lines 15-36 Link Here
15
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
15
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
16
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
16
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
17
# Host-type
17
# Host-type
18
CHOST=ia64-unknown-linux-gnu
18
CHOST="@target@"
19
PORTAGE_TMPDIR=/var/tmp
19
PORTAGE_TMPDIR=/@affix@var/tmp
20
20
21
PORTDIR=/usr/portage
21
PORTDIR=@prefix@/portage
22
DISTDIR=${PORTDIR}/distfiles
22
DISTDIR=${PORTDIR}/distfiles
23
PKGDIR=${PORTDIR}/packages
23
PKGDIR=${PORTDIR}/packages
24
RPMDIR=${PORTDIR}/rpm
24
RPMDIR=${PORTDIR}/rpm
25
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config"
25
CONFIG_PROTECT="/@affix@etc /@affix@var/qmail/control @prefix@/share/config @prefix@/kde/2/share/config @prefix@/kde/3/share/config"
26
CONFIG_PROTECT_MASK="/etc/gconf"
26
CONFIG_PROTECT_MASK="/@affix@etc/gconf"
27
27
28
# Options passed to make during the build process
28
# Options passed to make during the build process
29
MAKEOPTS="-j2"
29
MAKEOPTS="-j2"
30
30
31
# Fetching command (5 tries, passive ftp for firewall compatibility)
31
# Fetching command (5 tries, passive ftp for firewall compatibility)
32
FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
32
FETCHCOMMAND="@WGET@ -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
33
RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
33
RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
34
34
35
CFLAGS="-O2 -pipe"
35
CFLAGS="-O2 -pipe"
36
CXXFLAGS=${CFLAGS}
36
CXXFLAGS=${CFLAGS}
(-)portage-cvs/cnf/make.globals.mac (-5 / +5 lines)
Lines 15-29 Link Here
15
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
15
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
16
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
16
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
17
# Host-type
17
# Host-type
18
CHOST=ppc-darwin
18
CHOST="@target@"
19
PORTAGE_TMPDIR=/var/tmp
19
PORTAGE_TMPDIR=/@affix@var/tmp
20
20
21
PORTDIR=/usr/portage
21
PORTDIR=@prefix@/portage
22
DISTDIR=${PORTDIR}/distfiles
22
DISTDIR=${PORTDIR}/distfiles
23
PKGDIR=${PORTDIR}/packages
23
PKGDIR=${PORTDIR}/packages
24
RPMDIR=${PORTDIR}/rpm
24
RPMDIR=${PORTDIR}/rpm
25
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config"
25
CONFIG_PROTECT="/@affix@etc /@affix@var/qmail/control @prefix@/share/config @prefix@/kde/2/share/config @prefix@/kde/3/share/config"
26
CONFIG_PROTECT_MASK="/etc/gconf"
26
CONFIG_PROTECT_MASK="/@affix@etc/gconf"
27
27
28
# Options passed to make during the build process
28
# Options passed to make during the build process
29
MAKEOPTS="-j2"
29
MAKEOPTS="-j2"
(-)portage-cvs/cnf/make.globals.mips (-7 / +7 lines)
Lines 15-36 Link Here
15
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
15
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
16
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
16
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
17
# Host-type
17
# Host-type
18
CHOST="mips-unknown-linux-gnu"
18
CHOST="@target@"
19
PORTAGE_TMPDIR=/var/tmp
19
PORTAGE_TMPDIR=/@affix@var/tmp
20
20
21
PORTDIR=/usr/portage
21
PORTDIR=@prefix@/portage
22
DISTDIR=${PORTDIR}/distfiles
22
DISTDIR=${PORTDIR}/distfiles
23
PKGDIR=${PORTDIR}/packages
23
PKGDIR=${PORTDIR}/packages
24
RPMDIR=${PORTDIR}/rpm
24
RPMDIR=${PORTDIR}/rpm
25
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config"
25
CONFIG_PROTECT="/@affix@etc /@affix@var/qmail/control @prefix@/share/config @prefix@/kde/2/share/config @prefix@/kde/3/share/config"
26
CONFIG_PROTECT_MASK="/etc/gconf"
26
CONFIG_PROTECT_MASK="/@affix@etc/gconf"
27
27
28
# Options passed to make during the build process
28
# Options passed to make during the build process
29
MAKEOPTS="-j2"
29
MAKEOPTS="-j2"
30
30
31
# Fetching command (5 tries, passive ftp for firewall compatibility)
31
# Fetching command (5 tries, passive ftp for firewall compatibility)
32
FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
32
FETCHCOMMAND="@WGET@ -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
33
RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
33
RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
34
34
35
CFLAGS="-O2 -pipe"
35
CFLAGS="-O2 -pipe"
36
CXXFLAGS=${CFLAGS}
36
CXXFLAGS=${CFLAGS}
(-)portage-cvs/cnf/make.globals.ppc (-7 / +7 lines)
Lines 15-36 Link Here
15
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
15
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
16
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
16
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
17
# Host-type
17
# Host-type
18
CHOST="powerpc-unknown-linux-gnu"
18
CHOST="@target@"
19
PORTAGE_TMPDIR=/var/tmp
19
PORTAGE_TMPDIR=/@affix@var/tmp
20
20
21
PORTDIR=/usr/portage
21
PORTDIR=@prefix@/portage
22
DISTDIR=${PORTDIR}/distfiles
22
DISTDIR=${PORTDIR}/distfiles
23
PKGDIR=${PORTDIR}/packages
23
PKGDIR=${PORTDIR}/packages
24
RPMDIR=${PORTDIR}/rpm
24
RPMDIR=${PORTDIR}/rpm
25
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config"
25
CONFIG_PROTECT="/@affix@etc /@affix@var/qmail/control @prefix@/share/config @prefix@/kde/2/share/config @prefix@/kde/3/share/config"
26
CONFIG_PROTECT_MASK="/etc/gconf"
26
CONFIG_PROTECT_MASK="/@affix@etc/gconf"
27
27
28
# Options passed to make during the build process
28
# Options passed to make during the build process
29
MAKEOPTS="-j2"
29
MAKEOPTS="-j2"
30
30
31
# Fetching command (5 tries, passive ftp for firewall compatibility)
31
# Fetching command (5 tries, passive ftp for firewall compatibility)
32
FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
32
FETCHCOMMAND="@WGET@ -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
33
RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
33
RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
34
34
35
CFLAGS="-O2 -pipe"
35
CFLAGS="-O2 -pipe"
36
CXXFLAGS=${CFLAGS}
36
CXXFLAGS=${CFLAGS}
(-)portage-cvs/cnf/make.globals.ppc64 (-7 / +7 lines)
Lines 15-36 Link Here
15
GENTOO_MIRRORS="http://gentoo.osuosl.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
15
GENTOO_MIRRORS="http://gentoo.osuosl.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
16
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
16
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
17
# Host-type
17
# Host-type
18
CHOST="powerpc64-unknown-linux-gnu"
18
CHOST="@target@"
19
PORTAGE_TMPDIR=/var/tmp
19
PORTAGE_TMPDIR=/@affix@var/tmp
20
20
21
PORTDIR=/usr/portage
21
PORTDIR=@prefix@/portage
22
DISTDIR=${PORTDIR}/distfiles
22
DISTDIR=${PORTDIR}/distfiles
23
PKGDIR=${PORTDIR}/packages
23
PKGDIR=${PORTDIR}/packages
24
RPMDIR=${PORTDIR}/rpm
24
RPMDIR=${PORTDIR}/rpm
25
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config"
25
CONFIG_PROTECT="/@affix@etc /@affix@var/qmail/control @prefix@/share/config @prefix@/kde/2/share/config @prefix@/kde/3/share/config"
26
CONFIG_PROTECT_MASK="/etc/gconf"
26
CONFIG_PROTECT_MASK="/@affix@etc/gconf"
27
27
28
# Options passed to make during the build process
28
# Options passed to make during the build process
29
MAKEOPTS="-j2"
29
MAKEOPTS="-j2"
30
30
31
# Fetching command (5 tries, passive ftp for firewall compatibility)
31
# Fetching command (5 tries, passive ftp for firewall compatibility)
32
FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
32
FETCHCOMMAND="@WGET@ -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
33
RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
33
RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
34
34
35
CFLAGS="-O2 -pipe"
35
CFLAGS="-O2 -pipe"
36
CXXFLAGS=${CFLAGS}
36
CXXFLAGS=${CFLAGS}
(-)portage-cvs/cnf/make.globals.s390 (-7 / +7 lines)
Lines 15-36 Link Here
15
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
15
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
16
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
16
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
17
# Host-type
17
# Host-type
18
CHOST=s390-ibm-linux-gnu
18
CHOST="@target@"
19
PORTAGE_TMPDIR=/var/tmp
19
PORTAGE_TMPDIR=/@affix@var/tmp
20
20
21
PORTDIR=/usr/portage
21
PORTDIR=@prefix@/portage
22
DISTDIR=${PORTDIR}/distfiles
22
DISTDIR=${PORTDIR}/distfiles
23
PKGDIR=${PORTDIR}/packages
23
PKGDIR=${PORTDIR}/packages
24
RPMDIR=${PORTDIR}/rpm
24
RPMDIR=${PORTDIR}/rpm
25
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config"
25
CONFIG_PROTECT="/@affix@etc /@affix@var/qmail/control @prefix@/share/config @prefix@/kde/2/share/config @prefix@/kde/3/share/config"
26
CONFIG_PROTECT_MASK="/etc/gconf"
26
CONFIG_PROTECT_MASK="/@affix@etc/gconf"
27
27
28
# Options passed to make during the build process
28
# Options passed to make during the build process
29
MAKEOPTS="-j2"
29
MAKEOPTS="-j2"
30
30
31
# Fetching command (5 tries, passive ftp for firewall compatibility)
31
# Fetching command (5 tries, passive ftp for firewall compatibility)
32
FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
32
FETCHCOMMAND="@WGET@ -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
33
RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
33
RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
34
34
35
CFLAGS="-O2 -pipe"
35
CFLAGS="-O2 -pipe"
36
CXXFLAGS=${CFLAGS}
36
CXXFLAGS=${CFLAGS}
(-)portage-cvs/cnf/make.globals.sh (-7 / +7 lines)
Lines 15-36 Link Here
15
GENTOO_MIRRORS="http://gentoo.osuosl.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
15
GENTOO_MIRRORS="http://gentoo.osuosl.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
16
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
16
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
17
# Host-type
17
# Host-type
18
CHOST=sh-unknown-linux-gnu
18
CHOST="@target@"
19
PORTAGE_TMPDIR=/var/tmp
19
PORTAGE_TMPDIR=/@affix@var/tmp
20
20
21
PORTDIR=/usr/portage
21
PORTDIR=@prefix@/portage
22
DISTDIR=${PORTDIR}/distfiles
22
DISTDIR=${PORTDIR}/distfiles
23
PKGDIR=${PORTDIR}/packages
23
PKGDIR=${PORTDIR}/packages
24
RPMDIR=${PORTDIR}/rpm
24
RPMDIR=${PORTDIR}/rpm
25
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config"
25
CONFIG_PROTECT="/@affix@etc /@affix@var/qmail/control @prefix@/share/config @prefix@/kde/2/share/config @prefix@/kde/3/share/config"
26
CONFIG_PROTECT_MASK="/etc/gconf"
26
CONFIG_PROTECT_MASK="/@affix@etc/gconf"
27
27
28
# Options passed to make during the build process
28
# Options passed to make during the build process
29
MAKEOPTS="-j2"
29
MAKEOPTS="-j2"
30
30
31
# Fetching command (5 tries, passive ftp for firewall compatibility)
31
# Fetching command (5 tries, passive ftp for firewall compatibility)
32
FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
32
FETCHCOMMAND="@WGET@ -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
33
RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
33
RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
34
34
35
CFLAGS="-Os -pipe"
35
CFLAGS="-Os -pipe"
36
CXXFLAGS=${CFLAGS}
36
CXXFLAGS=${CFLAGS}
(-)portage-cvs/cnf/make.globals.sparc (-7 / +7 lines)
Lines 15-36 Link Here
15
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
15
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
16
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
16
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
17
# Host-type
17
# Host-type
18
CHOST="sparc-unknown-linux-gnu"
18
CHOST="@target@"
19
PORTAGE_TMPDIR=/var/tmp
19
PORTAGE_TMPDIR=/@affix@var/tmp
20
20
21
PORTDIR=/usr/portage
21
PORTDIR=@prefix@/portage
22
DISTDIR=${PORTDIR}/distfiles
22
DISTDIR=${PORTDIR}/distfiles
23
PKGDIR=${PORTDIR}/packages
23
PKGDIR=${PORTDIR}/packages
24
RPMDIR=${PORTDIR}/rpm
24
RPMDIR=${PORTDIR}/rpm
25
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config"
25
CONFIG_PROTECT="/@affix@etc /@affix@var/qmail/control @prefix@/share/config @prefix@/kde/2/share/config @prefix@/kde/3/share/config"
26
CONFIG_PROTECT_MASK="/etc/gconf"
26
CONFIG_PROTECT_MASK="/@affix@etc/gconf"
27
27
28
# Options passed to make during the build process
28
# Options passed to make during the build process
29
MAKEOPTS="-j2"
29
MAKEOPTS="-j2"
30
30
31
# Fetching command (5 tries, passive ftp for firewall compatibility)
31
# Fetching command (5 tries, passive ftp for firewall compatibility)
32
FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
32
FETCHCOMMAND="@WGET@ -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
33
RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
33
RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
34
34
35
CFLAGS="-O2 -pipe"
35
CFLAGS="-O2 -pipe"
36
CXXFLAGS=${CFLAGS}
36
CXXFLAGS=${CFLAGS}
(-)portage-cvs/cnf/make.globals.x86 (-7 / +7 lines)
Lines 15-36 Link Here
15
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
15
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
16
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
16
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
17
# Host-type
17
# Host-type
18
CHOST=i686-pc-linux-gnu
18
CHOST="@target@"
19
PORTAGE_TMPDIR=/var/tmp
19
PORTAGE_TMPDIR=/@affix@var/tmp
20
20
21
PORTDIR=/usr/portage
21
PORTDIR=@prefix@/portage
22
DISTDIR=${PORTDIR}/distfiles
22
DISTDIR=${PORTDIR}/distfiles
23
PKGDIR=${PORTDIR}/packages
23
PKGDIR=${PORTDIR}/packages
24
RPMDIR=${PORTDIR}/rpm
24
RPMDIR=${PORTDIR}/rpm
25
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config"
25
CONFIG_PROTECT="/@affix@etc /@affix@var/qmail/control @prefix@/share/config @prefix@/kde/2/share/config @prefix@/kde/3/share/config"
26
CONFIG_PROTECT_MASK="/etc/gconf"
26
CONFIG_PROTECT_MASK="/@affix@etc/gconf"
27
27
28
# Options passed to make during the build process
28
# Options passed to make during the build process
29
MAKEOPTS="-j2"
29
MAKEOPTS="-j2"
30
30
31
# Fetching command (5 tries, passive ftp for firewall compatibility)
31
# Fetching command (5 tries, passive ftp for firewall compatibility)
32
FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
32
FETCHCOMMAND="@WGET@ -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
33
RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
33
RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
34
34
35
CFLAGS="-O2 -mcpu=i686 -pipe"
35
CFLAGS="-O2 -mcpu=i686 -pipe"
36
CXXFLAGS=${CFLAGS}
36
CXXFLAGS=${CFLAGS}
(-)portage-cvs/cnf/make.globals.x86-fbsd (-5 / +5 lines)
Lines 15-29 Link Here
15
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
15
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
16
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
16
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
17
# Host-type
17
# Host-type
18
CHOST=i686-unknown-freebsd5.3
18
CHOST="@target@"
19
PORTAGE_TMPDIR=/var/tmp
19
PORTAGE_TMPDIR=/@affix@var/tmp
20
20
21
PORTDIR=/usr/portage
21
PORTDIR=@prefix@/portage
22
DISTDIR=${PORTDIR}/distfiles
22
DISTDIR=${PORTDIR}/distfiles
23
PKGDIR=${PORTDIR}/packages
23
PKGDIR=${PORTDIR}/packages
24
RPMDIR=${PORTDIR}/rpm
24
RPMDIR=${PORTDIR}/rpm
25
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config"
25
CONFIG_PROTECT="/@affix@etc /@affix@var/qmail/control @prefix@/share/config @prefix@/kde/2/share/config @prefix@/kde/3/share/config"
26
CONFIG_PROTECT_MASK="/etc/gconf"
26
CONFIG_PROTECT_MASK="/@affix@etc/gconf"
27
27
28
# Options passed to make during the build process
28
# Options passed to make during the build process
29
MAKEOPTS="-j2"
29
MAKEOPTS="-j2"
(-)portage-cvs/configure.in (-4 / +169 lines)
Lines 1-11 Link Here
1
dnl Process this file with autoconf to produce a configure script.
1
dnl Process this file with autoconf to produce a configure script.
2
AC_INIT(portage, cvs, dev-portage@gentoo.org)
2
AC_INIT(portage, 2.1_pre, dev-portage@gentoo.org)
3
4
case "${prefix}" in
5
"") AC_MSG_ERROR(bad value '${prefix}' for --prefix, must not be empty) ;;
6
/) AC_MSG_ERROR(bad value '${prefix}' for --prefix, must not be '/' only) ;;
7
*/) AC_MSG_ERROR(bad value '${prefix}' for --prefix, must not end with '/') ;;
8
/*|NONE) ;;
9
*) AC_MSG_ERROR(bad value '${prefix}' for --prefix, must start with /) ;;
10
esac
11
12
AC_CANONICAL_BUILD
13
AC_CANONICAL_HOST
14
AC_CANONICAL_TARGET
15
3
AM_INIT_AUTOMAKE
16
AM_INIT_AUTOMAKE
4
dnl AM_CONFIG_HEADER(config.h)
17
dnl AM_CONFIG_HEADER(config.h)
5
18
6
dnl Checks for programs.
19
dnl Checks for programs.
7
dnl store clfags prior, otherwise it's not propogaed.
20
dnl store clfags prior, otherwise it's not propogaed.
8
if test x$CFLAGS != x
21
if test "x$CFLAGS" != "x"
9
then
22
then
10
CFLAGS=$CFLAGS
23
CFLAGS=$CFLAGS
11
fi
24
fi
Lines 13-18 Link Here
13
AC_PREFIX_DEFAULT([/usr])
26
AC_PREFIX_DEFAULT([/usr])
14
AC_PROG_CC
27
AC_PROG_CC
15
AC_PROG_INSTALL
28
AC_PROG_INSTALL
29
AC_PROG_LN_S
30
AX_PATH_EGREP
31
case `${EGREP} --version 2>/dev/null` in
32
*"GNU grep"*) ;;
33
*)
34
	AC_MSG_ERROR([Need GNU grep for ${EGREP}])
35
	;;
36
esac
37
AX_PATH_XCU_ID([required])
38
AC_PATH_PROG(RM, rm, /bin/rm)
39
AC_PATH_PROG(MV, mv, /bin/mv)
40
AC_PATH_PROGS(SED, [gsed sed], /usr/bin/sed)
41
42
dnl when /bin/sh is bash, then BASH is set to /bin/sh
43
test "${BASH}" != "/bin/sh" || $as_unset BASH
44
AC_PATH_PROGS(BASH, [bash2 bash], /bin/bash)
45
46
dnl >=python-2.2, but prefer path .../python
47
AC_PATH_PROG(PYTHON, [python], /usr/bin/python)
48
AX_WITH_PYTHON([2.2], [missing])
49
if test "x${PYTHON}" = "xmissing"; then
50
	PYTHON=
51
	AC_PATH_PROGS(PYTHON,
52
			  [python2.4 python2.3 python2.2 python2 python],
53
			  [/usr/bin/python])
54
	AX_WITH_PYTHON([2.2], [missing])
55
fi
56
if test "x${PYTHON}" = "xmissing"; then
57
	AC_MSG_ERROR([cannot find python version >= 2.2])
58
fi
59
60
AC_PATH_PROG(PERL, perl, [/usr/bin/perl])
61
AC_PROG_PERL_VERSION([5.6.0], , [PERL=])
62
if test "x${PERL}" = "x"; then
63
	AC_PATH_PROGS(PERL, [perl5.8.6 perl5.8.5 perl5.8.4 perl5.8.3 perl5.8.2 \
64
		perl5.8.1 perl5.8.0 perl5.8 perl5.6.1 perl5.6.0 perl5.6 perl5 perl],
65
		[/usr/bin/perl])
66
	AC_PROG_PERL_VERSION([5.6.0], ,
67
		[AC_MSG_ERROR([cannot find a perl version >= 5.6.0])]
68
	)
69
fi
70
71
AC_PATH_PROG(BASENAME, basename, /bin/basename)
72
AC_PATH_PROG(DIRNAME, dirname, /usr/bin/dirname)
73
AC_PATH_PROG(DIALOG, dialog, /usr/bin/dialog)
74
AC_PATH_PROG(WGET, wget, /usr/bin/wget)
75
AC_PATH_PROG(INSTALL_INFO, install-info, /usr/bin/install-info)
76
AC_PATH_PROG(SANDBOX, sandbox, /usr/bin/sandbox)
77
AC_PATH_PROG(PRELINK, prelink, /usr/sbin/prelink)
78
AC_PATH_PROG(RSYNC, rsync, /usr/bin/rsync)
79
AC_PATH_PROG(CVS, cvs, /usr/bin/cvs)
80
AC_PATH_PROGS(GPG, [gpg pgp], /usr/bin/gpg)
81
AC_PATH_PROG(INSTALL_INFO, install-info, /usr/bin/install-info)
82
AC_PATH_PROG(MD5SUM, md5sum, /usr/bin/md5sum)
83
AC_PATH_PROG(LOGGER, logger, /usr/bin/logger)
84
AC_PATH_PROG(FIND, find, /usr/bin/find)
85
AC_PATH_PROG(FILE, file, /usr/bin/file)
86
AC_PATH_PROG(READELF, readelf, /usr/bin/readelf)
87
AC_PATH_PROG(SETFILES, setfiles, /usr/sbin/setfiles)
88
AC_PATH_PROG(FAKEROOT, fakeroot, /usr/bin/fakeroot)
16
89
17
dnl Checks for libraries.
90
dnl Checks for libraries.
18
dnl Replace `main' with a function in -lc:
91
dnl Replace `main' with a function in -lc:
Lines 28-34 Link Here
28
AC_HEADER_DIRENT
101
AC_HEADER_DIRENT
29
AC_HEADER_STDC
102
AC_HEADER_STDC
30
AC_HEADER_SYS_WAIT
103
AC_HEADER_SYS_WAIT
31
AC_CHECK_HEADERS(fcntl.h limits.h strings.h sys/file.h sys/time.h unistd.h)
104
AC_CHECK_HEADERS(fcntl.h limits.h strings.h sys/file.h sys/time.h unistd.h getopt.h)
32
105
33
dnl Checks for typedefs, structures, and compiler characteristics.
106
dnl Checks for typedefs, structures, and compiler characteristics.
34
AC_C_CONST
107
AC_C_CONST
Lines 78-83 Link Here
78
esac],
151
esac],
79
[enable_py_sources=true])
152
[enable_py_sources=true])
80
153
154
AC_ARG_WITH(user,
155
AC_HELP_STRING([--with-user=me],[use user 'me' for portage to work as (default portage)]),
156
[case "${withval}" in
157
  ""|yes) AC_MSG_ERROR(bad value ${withval} for --with-user);;
158
  *) portageuser="${withval}";;
159
esac],
160
[portageuser="portage"])
161
162
AC_ARG_WITH(group,
163
AC_HELP_STRING([--with-group=mygroup],[use group 'mygroup' for portage to work as (default portage)]),
164
[case "${withval}" in
165
  ""|yes) AC_MSG_ERROR(bad value ${withval} for --with-group);;
166
  *) portagegroup="${withval}";;
167
esac],
168
[portagegroup="portage"])
169
170
AC_ARG_WITH(wheelgroup,
171
AC_HELP_STRING([--with-wheelgroup=wheelgroup],[let portage use 'wheelgroup' as wheel group (default wheel)]),
172
[case "${withval}" in
173
  ""|yes) AC_MSG_ERROR(bad value ${withval} for --with-wheelgroup);;
174
  *) wheelgroup="${withval}";;
175
esac],
176
[wheelgroup="wheel"])
177
178
AC_ARG_WITH(rootuser,
179
AC_HELP_STRING([--with-rootuser=me],[allows 'me' to do root tasks (default root)]),
180
[case "${withval}" in
181
  ""|yes) AC_MSG_ERROR(bad value ${withval} for --with-rootuser);;
182
  *) rootuser=${withval};;
183
esac],
184
[rootuser=root])
185
81
if test x$enable_missingos = xauto
186
if test x$enable_missingos = xauto
82
then
187
then
83
  pyver=[`python -c 'import sys;print sys.version[0:3]';`]
188
  pyver=[`python -c 'import sys;print sys.version[0:3]';`]
Lines 89-105 Link Here
89
  esac
194
  esac
90
fi
195
fi
91
196
197
dnl according to FHS:
198
dnl if prefix=/usr then '/'+affix = '/'
199
dnl else '/'+affix=prefix+'/'
200
dnl
201
dnl "${affix}" never starts with '/', but "/${affix}" always ends with '/'
202
AC_MSG_CHECKING([for affix to be used])
203
case "${prefix}" in
204
/usr|NONE) affix= ;;
205
*) affix=`echo "${prefix}" | cut -c2-`'/' ;;
206
esac
207
AC_MSG_RESULT(['${affix}'])
208
209
AC_MSG_CHECKING([for ARCH to be used])
210
dnl detect ARCH from target_cpu
211
case "${target_cpu}" in
212
i?86) ARCH=x86 ;;
213
sparc*) ARCH=sparc ;;
214
hppa*) ARCH=hppa ;;
215
powerpc*) ARCH=ppc ;;
216
dnl don't know more target_cpus yet...
217
*) AC_MSG_RESULT([unknown])
218
   AC_MSG_CHECKING([for default ARCH to be used])
219
   ARCH=${target_cpu} ;;
220
esac
221
AC_MSG_RESULT([${ARCH}])
222
92
AC_CONFIG_FILES([ Makefile ])
223
AC_CONFIG_FILES([ Makefile ])
224
AC_CONFIG_FILES([ subst-install ])
225
AC_CONFIG_FILES([ subst-install.vars.in ])
93
AC_CONFIG_FILES([ src/Makefile ])
226
AC_CONFIG_FILES([ src/Makefile ])
94
AC_CONFIG_FILES([ src/filter-env/Makefile ])
227
AC_CONFIG_FILES([ src/filter-env/Makefile ])
95
AC_CONFIG_FILES([ man/Makefile ])
228
AC_CONFIG_FILES([ man/Makefile ])
96
AC_CONFIG_FILES([ src/python-missingos/Makefile ])
229
AC_CONFIG_FILES([ src/python-missingos/Makefile ])
97
AC_CONFIG_FILES([ bin/Makefile ])
230
AC_CONFIG_FILES([ bin/Makefile ])
98
AC_CONFIG_FILES([ pym/Makefile ])
231
AC_CONFIG_FILES([ pym/Makefile ])
232
AC_CONFIG_FILES([ cnf/Makefile ])
99
233
100
AC_SUBST(PORTAGE_BASE,"/usr/lib/portage")
234
AC_SUBST(affix)
235
AC_SUBST(portageuser)
236
AC_SUBST(portagegroup)
237
AC_SUBST(wheelgroup)
238
AC_SUBST(rootuser)
239
AC_SUBST(ARCH)
240
AC_SUBST(PORTAGE_BASE,['${libdir}/portage'])
101
AM_CONDITIONAL(INSTALL_PYTHON_SOURCES, test x$enable_py_sources = xtrue)
241
AM_CONDITIONAL(INSTALL_PYTHON_SOURCES, test x$enable_py_sources = xtrue)
102
AM_CONDITIONAL(BUILD_TBZ2TOOL, test x$enable_tbz2tool = xtrue)
242
AM_CONDITIONAL(BUILD_TBZ2TOOL, test x$enable_tbz2tool = xtrue)
103
AM_CONDITIONAL(BUILD_MISSINGOS, test x$enable_missingos = xtrue)
243
AM_CONDITIONAL(BUILD_MISSINGOS, test x$enable_missingos = xtrue)
104
AM_CONDITIONAL(BUILD_FILTER_ENV, test x$enable_filter_env = xtrue)
244
AM_CONDITIONAL(BUILD_FILTER_ENV, test x$enable_filter_env = xtrue)
245
246
AC_MSG_CHECKING([for a list of variables known by configure])
247
rm -f subst-install.vars.in.in.tmp
248
pt_configvars=`grep '^s,@' ${srcdir}/configure | sed -e 's|^s,@\([[^@]][[^@]]*\)@.*$|\1|'`
249
{
250
	pt_all_configurevars=
251
	for pt_configvar in ${pt_configvars}
252
	do
253
		echo "${pt_configvar}=@${pt_configvar}@"
254
		pt_all_configurevars="${pt_all_configurevars} ${pt_configvar}"
255
	done
256
257
	echo "all_configurevars='${pt_all_configurevars}'"
258
259
} > subst-install.vars.in.in.tmp
260
diff ${srcdir}/subst-install.vars.in.in subst-install.vars.in.in.tmp >/dev/null
261
if [[ $? != 0 ]]
262
then
263
	rm -f ${srcdir}/subst-install.vars.in.in
264
	cp subst-install.vars.in.in.tmp ${srcdir}/subst-install.vars.in.in
265
fi
266
rm -f subst-install.vars.in.in.tmp
267
$as_unset pt_configvar pt_configvars pt_all_configurevars
268
AC_MSG_RESULT([ok])
269
105
AC_OUTPUT
270
AC_OUTPUT
(-)portage-cvs/man/Makefile.am (+2 lines)
Lines 11-13 Link Here
11
		repoman.1
11
		repoman.1
12
12
13
EXTRA_DIST = $(man_MANS)
13
EXTRA_DIST = $(man_MANS)
14
15
MAINTAINERCLEANFILES = Makefile.in
(-)portage-cvs/pym/Makefile.in (-21 / +70 lines)
Lines 1-24 Link Here
1
INSTALL    	= @INSTALL@
1
prefix = @prefix@
2
INSTALL_PY 	= @INSTALL_DATA@ -D -g portage -o 0
2
exec_prefix = @exec_prefix@
3
PORTAGE_PYM	= @PORTAGE_BASE@/pym
3
libdir = @libdir@
4
DESTDIR 	= @DESTDIR@
4
PYTHON = @PYTHON@
5
INSTALL_PYTHON_SOURCES = @INSTALL_PYTHON_SOURCES@
6
7
compile:
8
	python -c 'import compileall; compileall.compile_dir(".")' || exit 1
9
clean:
10
	find . -type f -name '*.pyc' -exec rm {} \;
11
12
install:	compile
13
	$(INSTALL) -d -m755 -o 0 -g portage $(DESTDIR)/$(PORTAGE_PYM) || exit 1
14
	if test -n "$(INSTALL_PYTHON_SOURCES)"; then \
15
		find . -type f -name '*.py' -exec $(INSTALL_PY) {} $(DESTDIR)/$(PORTAGE_PYM)/{} \; || exit 1; \
16
	fi
17
	find . -type f -name '*.pyc' -exec $(INSTALL_PY) {} $(DESTDIR)/$(PORTAGE_PYM)/{} \; || exit 1
18
5
19
all: 	compile
6
srcdir=@srcdir@
7
top_builddir=@top_builddir@
8
9
portageuser = @portageuser@
10
portagegroup = @portagegroup@
11
12
PORTAGE_PYM = @PORTAGE_BASE@/pym
13
INSTALL = @INSTALL@
14
INSTALL_PY = @INSTALL_DATA@ -o $(portageuser) -g $(portagegroup)
15
INSTALL_PYsubst = $(SHELL) ${top_builddir}/subst-install --installcmd='${INSTALL_PY}'
16
17
list_sourcedir_dirs = \
18
	  ( cd ${srcdir} \
19
	&& find . -name 'CVS' -prune \
20
		   -o -type d -print \
21
	 )
22
23
list_sourcedir = \
24
	  ( cd ${srcdir} \
25
	&& find . -name 'CVS' -prune \
26
		   -o -name '.\#*' -prune \
27
		   -o -type f -name '*.py' -print \
28
	 )
29
30
all:
31
32
install:
33
	$(INSTALL) -d -m755 -o $(portageuser) -g $(portagegroup) $(DESTDIR)$(PORTAGE_PYM)
34
	$(list_sourcedir_dirs) | while read f \
35
	; do echo $(INSTALL) -d -m755 -o $(portageuser) -g $(portagegroup) $(DESTDIR)$(PORTAGE_PYM)/$${f} \
36
	   ; $(INSTALL) -d -m755 -o $(portageuser) -g $(portagegroup) $(DESTDIR)$(PORTAGE_PYM)/$${f} \
37
	; done
38
	$(list_sourcedir) | while read f \
39
	; do echo $(INSTALL_PYsubst) ${srcdir}/$${f} $(DESTDIR)$(PORTAGE_PYM)/$${f} \
40
	   ; $(INSTALL_PYsubst) ${srcdir}/$${f} $(DESTDIR)$(PORTAGE_PYM)/$${f} \
41
	; done
42
	$(PYTHON) -c 'import compileall; compileall.compile_dir("$(DESTDIR)$(PORTAGE_PYM)")'
43
	$(PYTHON) -O -c 'import compileall; compileall.compile_dir("$(DESTDIR)$(PORTAGE_PYM)")'
44
@INSTALL_PYTHON_SOURCES_FALSE@	$(list_sourcedir) | while read f \
45
@INSTALL_PYTHON_SOURCES_FALSE@	; do rm -f $(DESTDIR)$(PORTAGE_PYM)/$${f} \
46
@INSTALL_PYTHON_SOURCES_FALSE@	; done
20
47
21
distdir:
48
distdir:
22
	find  -type f -name '*.py' -exec $(INSTALL) -D {} $(distdir)/{} \;
49
	$(list_sourcedir_dirs) | while read f \
23
		
50
	; do echo $(INSTALL) -d $(distdir)/$${f} \
24
.PHONY:	distdir install clean
51
	   ; $(INSTALL) -d $(distdir)/$${f} \
52
	; done
53
	$(list_sourcedir) | while read f \
54
	; do echo $(INSTALL) ${srcdir}/$${f} $(distdir)/$${f} \
55
	   ; $(INSTALL) ${srcdir}/$${f} $(distdir)/$${f} \
56
	; done
57
58
uninstall:
59
	$(list_sourcedir) | while read f \
60
	; do echo rm -f $(DESTDIR)$(PORTAGE_PYM)/$${f} \
61
	   ; rm -f $(DESTDIR)$(PORTAGE_PYM)/$${f} \
62
	   ; echo rm -f $(DESTDIR)$(PORTAGE_PYM)/$${f}c \
63
	   ; rm -f $(DESTDIR)$(PORTAGE_PYM)/$${f}c \
64
	   ; echo rm -f $(DESTDIR)$(PORTAGE_PYM)/$${f}o \
65
	   ; rm -f $(DESTDIR)$(PORTAGE_PYM)/$${f}o \
66
	; done 
67
	
68
all dvi check installcheck:
69
clean distclean maintainer-clean:
70
71
.PHONY:	all install distdir
72
.PHONY: dvi check installcheck
73
.PHONY: clean distclean maintainer-clean
(-)portage-cvs/pym/config.py (-23 / +30 lines)
Lines 1-14 Link Here
1
import os, copy, re
1
import os, copy, re
2
import portage_const
2
import portage_const
3
from portage_const import PROFILE_PATH,DEPCACHE_PATH,MODULES_FILE_PATH \
4
		,CUSTOM_PROFILE_PATH,USER_CONFIG_PATH,MYROOT,ROOT,MAKE_CONF_FILE
3
import sys #has a few daft sys.exit
5
import sys #has a few daft sys.exit
4
6
5
import portage_util, portage_versions, portage_dep
7
import portage_util, portage_versions, portage_dep
6
from portage_util import getconfig, grabfile, grab_multiple, grabfile_package, grabdict, writemsg, grabdict_package, \
8
from portage_util import getconfig, grabfile, grab_multiple, grabfile_package, grabdict, writemsg, grabdict_package, \
7
	abssymlink, flatten
9
	abssymlink, flatten
8
10
9
10
from portage_file import listdir
11
from portage_file import listdir
11
from portage_data import portage_gid
12
import portage_data
12
13
13
class config:
14
class config:
14
	def clone(self, clone):
15
	def clone(self, clone):
Lines 49-55 Link Here
49
		self.treeVirtuals = copy.deepcopy(clone.treeVirtuals)
50
		self.treeVirtuals = copy.deepcopy(clone.treeVirtuals)
50
		self.userVirtuals = copy.deepcopy(clone.userVirtuals)
51
		self.userVirtuals = copy.deepcopy(clone.userVirtuals)
51
52
52
	def __init__(self, clone=None, mycpv=None, config_profile_path=portage_const.PROFILE_PATH, config_incrementals=None):
53
	def __init__(self, clone=None, mycpv=None, config_profile_path=MYROOT(PROFILE_PATH), config_incrementals=None):
53
54
54
		self.already_in_regenerate = 0
55
		self.already_in_regenerate = 0
55
56
Lines 64-73 Link Here
64
		if clone:
65
		if clone:
65
			self.clone( clone )
66
			self.clone( clone )
66
		else:
67
		else:
67
			self.depcachedir = portage_const.DEPCACHE_PATH
68
			self.depcachedir = MYROOT(DEPCACHE_PATH)
68
			
69
			
69
			if not os.path.exists(config_profile_path):
70
			if not os.path.exists(config_profile_path):
70
				writemsg("config_profile_path not specified to class config\n")
71
				writemsg("config_profile_path '"+config_profile_path+"' not specified to class config\n")
71
				sys.exit(1)
72
				sys.exit(1)
72
			self.profile_path = config_profile_path
73
			self.profile_path = config_profile_path
73
74
Lines 81-87 Link Here
81
			
82
			
82
			self.module_priority    = ["user","default"]
83
			self.module_priority    = ["user","default"]
83
			self.modules            = {}
84
			self.modules            = {}
84
			self.modules["user"]    = getconfig(portage_const.MODULES_FILE_PATH)
85
			self.modules["user"]    = getconfig(MYROOT(MODULES_FILE_PATH))
85
			if self.modules["user"] == None:
86
			if self.modules["user"] == None:
86
				self.modules["user"] = {}
87
				self.modules["user"] = {}
87
			self.modules["default"] = {
88
			self.modules["default"] = {
Lines 112-119 Link Here
112
				pass
113
				pass
113
			else:
114
			else:
114
				# XXX: This should depend on ROOT?
115
				# XXX: This should depend on ROOT?
115
				if os.path.exists("/"+portage_const.CUSTOM_PROFILE_PATH):
116
				if os.path.exists(MYROOT(CUSTOM_PROFILE_PATH)):
116
					self.profiles.append("/"+portage_const.CUSTOM_PROFILE_PATH)
117
					self.profiles.append(MYROOT(CUSTOM_PROFILE_PATH))
117
118
118
			self.packages_list = grab_multiple("packages", self.profiles, grabfile_package)
119
			self.packages_list = grab_multiple("packages", self.profiles, grabfile_package)
119
			self.packages      = stack_lists(self.packages_list, incremental=1)
120
			self.packages      = stack_lists(self.packages_list, incremental=1)
Lines 138-144 Link Here
138
			del use_defs_lists
139
			del use_defs_lists
139
140
140
			try:
141
			try:
141
				mygcfg_dlists = grab_multiple("make.globals", self.profiles+["/etc"], getconfig)
142
				mygcfg_dlists = grab_multiple("make.globals", self.profiles+[MYROOT("etc")], getconfig)
142
				self.mygcfg   = stack_dicts(mygcfg_dlists, incrementals=portage_const.INCREMENTALS, ignore_none=1)
143
				self.mygcfg   = stack_dicts(mygcfg_dlists, incrementals=portage_const.INCREMENTALS, ignore_none=1)
143
144
144
				if self.mygcfg == None:
145
				if self.mygcfg == None:
Lines 165-171 Link Here
165
					raise
166
					raise
166
				except Exception, e:
167
				except Exception, e:
167
					writemsg("!!! %s\n" % (e))
168
					writemsg("!!! %s\n" % (e))
168
					writemsg("!!! 'rm -Rf /usr/portage/profiles; emerge sync' may fix this. If it does\n")
169
					writemsg("!!! 'rm -Rf @prefix@/portage/profiles; emerge sync' may fix this. If it does\n")
169
					writemsg("!!! not then please report this to bugs.gentoo.org and, if possible, a dev\n")
170
					writemsg("!!! not then please report this to bugs.gentoo.org and, if possible, a dev\n")
170
					writemsg("!!! on #gentoo (irc.freenode.org)\n")
171
					writemsg("!!! on #gentoo (irc.freenode.org)\n")
171
					sys.exit(1)
172
					sys.exit(1)
Lines 174-180 Link Here
174
175
175
			try:
176
			try:
176
				# XXX: Should depend on root?
177
				# XXX: Should depend on root?
177
				self.mygcfg=getconfig("/"+portage_const.MAKE_CONF_FILE)
178
				self.mygcfg=getconfig(MYROOT(MAKE_CONF_FILE))
178
				if self.mygcfg == None:
179
				if self.mygcfg == None:
179
					self.mygcfg = {}
180
					self.mygcfg = {}
180
			except SystemExit, e:
181
			except SystemExit, e:
Lines 217-229 Link Here
217
				self.pkeywordsdict = {}
218
				self.pkeywordsdict = {}
218
				self.punmaskdict = {}
219
				self.punmaskdict = {}
219
			else:
220
			else:
220
				locations = [self["PORTDIR"] + "/profiles", portage_const.USER_CONFIG_PATH]
221
				locations = [self["PORTDIR"] + "/profiles", MYROOT(USER_CONFIG_PATH)]
221
222
222
				# Never set anything in this. It's for non-originals.
223
				# Never set anything in this. It's for non-originals.
223
				self.pusedict=grabdict_package(portage_const.USER_CONFIG_PATH+"/package.use")
224
				self.pusedict=grabdict_package(MYROOT(USER_CONFIG_PATH+"/package.use"))
224
225
225
				#package.keywords
226
				#package.keywords
226
				pkgdict=grabdict_package(portage_const.USER_CONFIG_PATH+"/package.keywords")
227
				pkgdict=grabdict_package(MYROOT(USER_CONFIG_PATH+"/package.keywords"))
227
				self.pkeywordsdict = {}
228
				self.pkeywordsdict = {}
228
229
229
				for key in pkgdict.keys():
230
				for key in pkgdict.keys():
Lines 244-250 Link Here
244
					self.pkeywordsdict[cp][key] = pkgdict[key]
245
					self.pkeywordsdict[cp][key] = pkgdict[key]
245
246
246
				#package.unmask
247
				#package.unmask
247
				pkgunmasklines = grabfile_package(portage_const.USER_CONFIG_PATH+"/package.unmask")
248
				pkgunmasklines = grabfile_package(MYROOT(USER_CONFIG_PATH+"/package.unmask"))
248
				self.punmaskdict = {}
249
				self.punmaskdict = {}
249
				for x in pkgunmasklines:
250
				for x in pkgunmasklines:
250
					mycatpkg=portage_dep.dep_getkey(x)
251
					mycatpkg=portage_dep.dep_getkey(x)
Lines 257-263 Link Here
257
			del categories
258
			del categories
258
259
259
			# get virtuals -- needs categories
260
			# get virtuals -- needs categories
260
			self.loadVirtuals('/')
261
			self.loadVirtuals(MYROOT)
261
					
262
					
262
			#package.mask
263
			#package.mask
263
			# Don't enable per profile package.mask unless the profile
264
			# Don't enable per profile package.mask unless the profile
Lines 309-316 Link Here
309
				#prepend db to list to get correct order
310
				#prepend db to list to get correct order
310
				self.uvlist.insert(0,self.configdict[x])
311
				self.uvlist.insert(0,self.configdict[x])
311
312
312
		self.configdict["env"]["PORTAGE_GID"]=str(portage_gid)
313
		# set environment variables PORTAGE_UID, PORTAGE_GID, ...
313
		self.backupenv["PORTAGE_GID"]=str(portage_gid)
314
		# from portage_data.portage_uid, portage_data.portage_gid, ...
315
		for n in ["uid", "gid", "user", "group", "rootuser", "wheelgroup"]:
316
			nu = n.upper()
317
			exec('self.configdict["env"]["PORTAGE_'+nu
318
					+'"]=str(portage_data.portage_'+n+')')
319
			exec('self.backupenv["PORTAGE_'+nu
320
					+'"]=str(portage_data.portage_'+n+')')
314
321
315
		if self.has_key("PORT_LOGDIR") and not self["PORT_LOGDIR"]:
322
		if self.has_key("PORT_LOGDIR") and not self["PORT_LOGDIR"]:
316
			# port_logdir is defined, but empty.  this causes a traceback in doebuild.
323
			# port_logdir is defined, but empty.  this causes a traceback in doebuild.
Lines 589-595 Link Here
589
		# This breaks catalyst/portage when setting to a fresh/empty root.
596
		# This breaks catalyst/portage when setting to a fresh/empty root.
590
		# Virtuals cannot be calculated because there is nothing to work
597
		# Virtuals cannot be calculated because there is nothing to work
591
		# from. So the only ROOT prefixed dir should be local configs.
598
		# from. So the only ROOT prefixed dir should be local configs.
592
		#myvirtdirs  = prefix_array(self.profiles,myroot+"/")
599
		#myvirtdirs  = prefix_array(self.profiles,myroot("/"))
593
		myvirtdirs = copy.deepcopy(self.profiles)
600
		myvirtdirs = copy.deepcopy(self.profiles)
594
		
601
		
595
		self.treeVirtuals = {}
602
		self.treeVirtuals = {}
Lines 597-611 Link Here
597
		# Repoman should ignore these.
604
		# Repoman should ignore these.
598
		user_profile_dir = None
605
		user_profile_dir = None
599
		if os.environ.get("PORTAGE_CALLER","") != "repoman":
606
		if os.environ.get("PORTAGE_CALLER","") != "repoman":
600
			user_profile_dir = myroot+portage_const.USER_CONFIG_PATH
607
			user_profile_dir = myroot(USER_CONFIG_PATH)
601
		
608
		
602
		# XXX: Removing this as virtuals and profile/virtuals behave
609
		# XXX: Removing this as virtuals and profile/virtuals behave
603
		# differently. portage/profile/virtuals overrides the default
610
		# differently. portage/profile/virtuals overrides the default
604
		# virtuals but are overridden by installed virtuals whereas
611
		# virtuals but are overridden by installed virtuals whereas
605
		# portage/virtuals overrides everything.
612
		# portage/virtuals overrides everything.
606
		
613
		
607
		#if os.path.exists("/etc/portage/virtuals"):
614
		#if os.path.exists(MYROOT("etc/portage/virtuals")):
608
		#	writemsg("\n\n*** /etc/portage/virtuals should be moved to /etc/portage/profile/virtuals\n")
615
		#	writemsg("\n\n*** "+MYROOT("etc/portage/virtuals")+" should be moved to "MYROOT("etc/portage/profile/virtuals")+"\n")
609
		#	writemsg("*** Please correct this by merging or moving the file. (Deprecation notice)\n\n")
616
		#	writemsg("*** Please correct this by merging or moving the file. (Deprecation notice)\n\n")
610
		#	time.sleep(1)
617
		#	time.sleep(1)
611
		
618
		
Lines 669-675 Link Here
669
				pass
676
				pass
670
			
677
			
671
		elif mykey == "CONFIG_PROTECT_MASK":
678
		elif mykey == "CONFIG_PROTECT_MASK":
672
			match += " /etc/env.d"
679
			match += " "+MYROOT("etc/env.d")
673
680
674
		return match
681
		return match
675
682
(-)portage-cvs/pym/dcdialog.py (-1 / +1 lines)
Lines 69-75 Link Here
69
#
69
#
70
# Path of the dialog executable
70
# Path of the dialog executable
71
#
71
#
72
DIALOG="/usr/bin/dialog"
72
DIALOG="@DIALOG@"
73
73
74
74
75
class Dialog:
75
class Dialog:
(-)portage-cvs/pym/dispatch_conf.py (-4 / +5 lines)
Lines 10-17 Link Here
10
from stat import *
10
from stat import *
11
import os, sys, commands, shutil
11
import os, sys, commands, shutil
12
12
13
sys.path = ["/usr/lib/portage/pym"]+sys.path
13
sys.path = ["@PORTAGE_BASE@/pym"]+sys.path
14
import portage
14
import portage
15
from portage import MYROOT, ROOT
15
16
16
RCS_BRANCH = '1.1.1'
17
RCS_BRANCH = '1.1.1'
17
RCS_LOCK = 'rcs -ko -M -l'
18
RCS_LOCK = 'rcs -ko -M -l'
Lines 23-39 Link Here
23
24
24
def read_config(mandatory_opts):
25
def read_config(mandatory_opts):
25
    try:
26
    try:
26
        opts = portage.getconfig('/etc/dispatch-conf.conf')
27
        opts = portage.getconfig(MYROOT('etc/dispatch-conf.conf'))
27
    except:
28
    except:
28
        opts = None
29
        opts = None
29
30
30
    if not opts:
31
    if not opts:
31
        print >> sys.stderr, 'dispatch-conf: Error reading /etc/dispatch-conf.conf; fatal'
32
        print >> sys.stderr, 'dispatch-conf: Error reading '+MYROOT('etc/dispatch-conf.conf')+'; fatal'
32
        sys.exit(1)
33
        sys.exit(1)
33
34
34
    for key in mandatory_opts:
35
    for key in mandatory_opts:
35
        if not opts.has_key(key):
36
        if not opts.has_key(key):
36
            print >> sys.stderr, 'dispatch-conf: Missing option "%s" in /etc/dispatch-conf.conf; fatal' % (key,)
37
            print >> sys.stderr, 'dispatch-conf: Missing option "%s" in '+MYROOT('etc/dispatch-conf.conf')+'; fatal' % (key,)
37
38
38
    if not (os.path.exists(opts['archive-dir']) and os.path.isdir(opts['archive-dir'])):
39
    if not (os.path.exists(opts['archive-dir']) and os.path.isdir(opts['archive-dir'])):
39
        print >> sys.stderr, 'dispatch-conf: Config archive dir [%s] must exist; fatal' % (opts['archive-dir'],)
40
        print >> sys.stderr, 'dispatch-conf: Config archive dir [%s] must exist; fatal' % (opts['archive-dir'],)
(-)portage-cvs/pym/ebuild.py (-19 / +30 lines)
Lines 1-4 Link Here
1
#!/usr/bin/python
1
#! @PYTHON@
2
# ebuild.py; Ebuild classes/abstraction of phase processing, and communicating with a ebuild-daemon.sh instance
2
# ebuild.py; Ebuild classes/abstraction of phase processing, and communicating with a ebuild-daemon.sh instance
3
# Copyright 2004 Gentoo Foundation
3
# Copyright 2004 Gentoo Foundation
4
# Distributed under the terms of the GNU General Public License v2
4
# Distributed under the terms of the GNU General Public License v2
Lines 132-138 Link Here
132
		
132
		
133
		# since it's questionable which spawn method we'll use (if sandbox or fakeroot fex), 
133
		# since it's questionable which spawn method we'll use (if sandbox or fakeroot fex), 
134
		# we ensure the bashrc is invalid.
134
		# we ensure the bashrc is invalid.
135
		env={"BASHRC":"/etc/portage/spork/not/valid/ha/ha"}
135
		env={"BASHRC":ROOT(INVALID_ENV_FILE)
136
			,"PORTAGE_BASE":"@PORTAGE_BASE@"
137
		}
136
		args = []
138
		args = []
137
		if sandbox:
139
		if sandbox:
138
			if fakeroot:
140
			if fakeroot:
Lines 140-146 Link Here
140
				sys.exit(1)
142
				sys.exit(1)
141
			self.__sandbox = True
143
			self.__sandbox = True
142
			spawn_func = portage_exec.spawn_sandbox
144
			spawn_func = portage_exec.spawn_sandbox
143
			env.update({"SANDBOX_DEBUG":"1","SANDBOX_DEBUG_LOG":"/var/tmp/test"})
145
			env.update({"SANDBOX_DEBUG":"1"
146
					   ,"SANDBOX_DEBUG_LOG":ROOT("var/tmp/test")})
144
147
145
		elif fakeroot:
148
		elif fakeroot:
146
			self.__fakeroot = True
149
			self.__fakeroot = True
Lines 149-155 Link Here
149
		else:
152
		else:
150
			spawn_func = portage_exec.spawn
153
			spawn_func = portage_exec.spawn
151
154
152
		self.pid = spawn_func(self.ebd+" daemonize", fd_pipes={0:0, 1:1, 2:2, 3:cread, 4:dwrite},
155
		self.pid = spawn_func(self.ebd+" daemonize", fd_pipes={0:0, 1:1, 2:2, 3:3, 4:4, 5:cread, 6:dwrite},
153
			returnpid=True,env=env, *args, **spawn_opts)[0]
156
			returnpid=True,env=env, *args, **spawn_opts)[0]
154
157
155
		os.close(cread)
158
		os.close(cread)
Lines 336-342 Link Here
336
	# python with a basic bash wrapper that calls back to this.
339
	# python with a basic bash wrapper that calls back to this.
337
	# all credit for the approach goes to him, as stated, this is just an implementation of it.
340
	# all credit for the approach goes to him, as stated, this is just an implementation of it.
338
	# bugs should be thrown at ferringb.
341
	# bugs should be thrown at ferringb.
339
	def load_confcache(self,transfer_to,confcache=portage_const.CONFCACHE_FILE,
342
	def load_confcache(self,transfer_to,confcache=ROOT(CONFCACHE_FILE),
340
		confcache_list=portage_const.CONFCACHE_LIST):
343
		confcache_list=portage_const.CONFCACHE_LIST):
341
		"""verifys a requested conf cache, removing the global cache if it's stale.
344
		"""verifys a requested conf cache, removing the global cache if it's stale.
342
		The handler should be the only one to call this"""
345
		The handler should be the only one to call this"""
Lines 435-441 Link Here
435
			portage_locks.unlockfile(lock)
438
			portage_locks.unlockfile(lock)
436
		return valid
439
		return valid
437
440
438
	def update_confcache(self,settings,logfile,new_confcache, confcache=portage_const.CONFCACHE_FILE, \
441
	def update_confcache(self,settings,logfile,new_confcache, confcache=ROOT(CONFCACHE_FILE), \
439
		confcache_list=portage_const.CONFCACHE_LIST):
442
		confcache_list=portage_const.CONFCACHE_LIST):
440
		"""internal function called when a processor has finished a configure, and wishes its cache
443
		"""internal function called when a processor has finished a configure, and wishes its cache
441
		be transferred to the global cache
444
		be transferred to the global cache
Lines 504-510 Link Here
504
		self.__ebp.write("updated")
507
		self.__ebp.write("updated")
505
		return 0
508
		return 0
506
509
507
	def get_keys(self,myebuild,mysettings,myroot="/"):
510
	def get_keys(self,myebuild,mysettings,myroot=portage_const.MYROOT):
508
		"""request the auxdbkeys from an ebuild
511
		"""request the auxdbkeys from an ebuild
509
		returns a dict when successful, None when failed"""
512
		returns a dict when successful, None when failed"""
510
#		print "getting keys for %s" % myebuild
513
#		print "getting keys for %s" % myebuild
Lines 593-600 Link Here
593
			# due to how it's coded... Don't overwrite this so we can use it.
596
			# due to how it's coded... Don't overwrite this so we can use it.
594
			mysettings["PORTAGE_DEBUG"]=str(debug)
597
			mysettings["PORTAGE_DEBUG"]=str(debug)
595
	
598
	
596
		mysettings["ROOT"]     = myroot
599
		mysettings["ROOT"]     = myroot.root()
597
	
600
		mysettings["AFFIX"]    = myroot.affix()
601
		mysettings["PREFIX"]   = myroot.prefix()
602
598
		mysettings["EBUILD"]   = ebuild_path
603
		mysettings["EBUILD"]   = ebuild_path
599
		mysettings["O"]        = pkg_dir
604
		mysettings["O"]        = pkg_dir
600
		mysettings["CATEGORY"] = cat
605
		mysettings["CATEGORY"] = cat
Lines 603-609 Link Here
603
		
608
		
604
		mysettings["ECLASSDIR"]   = mysettings["PORTDIR"]+"/eclass"
609
		mysettings["ECLASSDIR"]   = mysettings["PORTDIR"]+"/eclass"
605
610
606
		mysettings["PROFILE_PATHS"] = PROFILE_PATH+"\n"+CUSTOM_PROFILE_PATH
611
		mysettings["PROFILE_PATHS"] = MYROOT(PROFILE_PATH)+"\n"+MYROOT(CUSTOM_PROFILE_PATH)
607
		mysettings["P"]  = mysplit[0]+"-"+mysplit[1]
612
		mysettings["P"]  = mysplit[0]+"-"+mysplit[1]
608
		mysettings["PN"] = mysplit[0]
613
		mysettings["PN"] = mysplit[0]
609
		mysettings["PV"] = mysplit[1]
614
		mysettings["PV"] = mysplit[1]
Lines 625-631 Link Here
625
630
626
		if mydo!="depend":
631
		if mydo!="depend":
627
			try:
632
			try:
628
				mysettings["INHERITED"],mysettings["RESTRICT"] = db[root][tree].dbapi.aux_get(
633
				mysettings["INHERITED"],mysettings["RESTRICT"] = db[root()][tree].dbapi.aux_get(
629
					mycpv,["INHERITED","RESTRICT"])
634
					mycpv,["INHERITED","RESTRICT"])
630
635
631
				mysettings["PORTAGE_RESTRICT"]=string.join(flatten(portage_dep.use_reduce(
636
				mysettings["PORTAGE_RESTRICT"]=string.join(flatten(portage_dep.use_reduce(
Lines 669-681 Link Here
669
			# if clean, just flat out skip the rest of this crap.
674
			# if clean, just flat out skip the rest of this crap.
670
			return 0			
675
			return 0			
671
	
676
	
672
		mysettings["PORTAGE_BASHRC"] = EBUILD_SH_ENV_FILE
677
		mysettings["PORTAGE_BASHRC"] = ROOT(EBUILD_SH_ENV_FILE)
673
	
678
	
674
		#set up KV variable -- DEP SPEEDUP :: Don't waste time. Keep var persistent.
679
		#set up KV variable -- DEP SPEEDUP :: Don't waste time. Keep var persistent.
675
680
676
		if mydo not in ["depend","fetch","digest","manifest"]:
681
		if mydo not in ["depend","fetch","digest","manifest"]:
677
			if not mysettings.has_key("KV"):
682
			if not mysettings.has_key("KV"):
678
				mykv,err1=ExtractKernelVersion(root+"usr/src/linux")
683
				mykv,err1=ExtractKernelVersion(root.root("usr/src/linux"))
679
				if mykv:
684
				if mykv:
680
					# Regular source tree
685
					# Regular source tree
681
					mysettings["KV"]=mykv
686
					mysettings["KV"]=mykv
Lines 708-715 Link Here
708
		#fetch/digest crap
713
		#fetch/digest crap
709
		if mydo not in ["prerm","postrm","preinst","postinst","config","help","setup","unmerge"]:
714
		if mydo not in ["prerm","postrm","preinst","postinst","config","help","setup","unmerge"]:
710
715
711
			newuris, alist = db["/"]["porttree"].dbapi.getfetchlist(mycpv,mysettings=mysettings)
716
			newuris, alist = db[MYROOT()]["porttree"].dbapi.getfetchlist(mycpv,mysettings=mysettings)
712
			alluris, aalist = db["/"]["porttree"].dbapi.getfetchlist(mycpv,mysettings=mysettings,all=1)
717
			alluris, aalist = db[MYROOT()]["porttree"].dbapi.getfetchlist(mycpv,mysettings=mysettings,all=1)
713
			mysettings["A"]=string.join(alist," ")
718
			mysettings["A"]=string.join(alist," ")
714
			mysettings["AA"]=string.join(aalist," ")
719
			mysettings["AA"]=string.join(aalist," ")
715
			if ("mirror" in features) or fetchall:
720
			if ("mirror" in features) or fetchall:
Lines 864-869 Link Here
864
				portage_exec.spawn("chown -R "+str(portage_uid)+":"+str(portage_gid)+" "+mysettings["CCACHE_DIR"])
869
				portage_exec.spawn("chown -R "+str(portage_uid)+":"+str(portage_gid)+" "+mysettings["CCACHE_DIR"])
865
				portage_exec.spawn("chmod -R g+rw "+mysettings["CCACHE_DIR"])
870
				portage_exec.spawn("chmod -R g+rw "+mysettings["CCACHE_DIR"])
866
		except (OSError, IOError):
871
		except (OSError, IOError):
872
			print "*** Error while adjusting "+mysettings["CCACHE_DIR"]+" ccache permissions for "+`portage_uid`+"/"+`portage_gid`+" user..."
867
			pass
873
			pass
868
				
874
				
869
		if "distcc" in features:
875
		if "distcc" in features:
Lines 901-907 Link Here
901
					os.chmod(mysettings["PORT_LOGDIR"],00770)
907
					os.chmod(mysettings["PORT_LOGDIR"],00770)
902
					if not mysettings.has_key("LOG_PF") or (mysettings["LOG_PF"] != mysettings["PF"]):
908
					if not mysettings.has_key("LOG_PF") or (mysettings["LOG_PF"] != mysettings["PF"]):
903
						mysettings["LOG_PF"]=mysettings["PF"]
909
						mysettings["LOG_PF"]=mysettings["PF"]
904
						mysettings["LOG_COUNTER"]=str(db[myroot]["vartree"].dbapi.get_counter_tick_core("/"))
910
						mysettings["LOG_COUNTER"]=str(db[myroot()]["vartree"].dbapi.get_counter_tick_core(MYROOT))
905
					mysettings["PORTAGE_LOGFILE"]="%s/%s-%s.log" % (mysettings["PORT_LOGDIR"],mysettings["LOG_COUNTER"],mysettings["LOG_PF"])
911
					mysettings["PORTAGE_LOGFILE"]="%s/%s-%s.log" % (mysettings["PORT_LOGDIR"],mysettings["LOG_COUNTER"],mysettings["LOG_PF"])
906
					if os.path.exists(mysettings["PORTAGE_LOGFILE"]):
912
					if os.path.exists(mysettings["PORTAGE_LOGFILE"]):
907
						os.chmod(mysettings["PORTAGE_LOGFILE"], 0664)
913
						os.chmod(mysettings["PORTAGE_LOGFILE"], 0664)
Lines 932-938 Link Here
932
#			return spawn(EBUILD_SH_BINARY+" "+mydo,mysettings,debug=debug,free=1,logfile=logfile)
938
#			return spawn(EBUILD_SH_BINARY+" "+mydo,mysettings,debug=debug,free=1,logfile=logfile)
933
	
939
	
934
		try: 
940
		try: 
935
			mysettings["SLOT"], mysettings["RESTRICT"] = db["/"]["porttree"].dbapi.aux_get(mycpv,["SLOT","RESTRICT"])
941
			mysettings["SLOT"], mysettings["RESTRICT"] = db[MYROOT()]["porttree"].dbapi.aux_get(mycpv,["SLOT","RESTRICT"])
936
		except (IOError,KeyError):
942
		except (IOError,KeyError):
937
			print red("doebuild():")+" aux_get() error reading "+mycpv+"; aborting."
943
			print red("doebuild():")+" aux_get() error reading "+mycpv+"; aborting."
938
			sys.exit(1)
944
			sys.exit(1)
Lines 1207-1215 Link Here
1207
		# to make the fakeroot (claimed) permissions/owners a reality.
1213
		# to make the fakeroot (claimed) permissions/owners a reality.
1208
		if use_fakeroot and os.path.exists(mysettings["T"]+"/fakeroot_db") and merging:
1214
		if use_fakeroot and os.path.exists(mysettings["T"]+"/fakeroot_db") and merging:
1209
			print "correcting fakeroot privs"
1215
			print "correcting fakeroot privs"
1210
			retval=portage_exec.spawn(("/usr/lib/portage/bin/affect-fakeroot-perms.sh", \
1216
			retval=portage_exec.spawn(("@PORTAGE_BASE@/bin/affect-fakeroot-perms.sh", \
1211
				mysettings["T"]+"/fakeroot_db", \
1217
				mysettings["T"]+"/fakeroot_db", \
1212
				mysettings["D"]),env={"BASHRC":portage_const.INVALID_ENV_FILE})
1218
				mysettings["D"])
1219
				,env={"BASHRC":MYROOT(INVALID_ENV_FILE)
1220
					 ,"AFFIX":ROOT.affix
1221
					 ,"PREFIX":ROOT.prefix
1222
					 ,"PORTAGE_BASE":"@PORTAGE_BASE@"
1223
				})
1213
			if retval or retval == None:
1224
			if retval or retval == None:
1214
				print red("!!!")+"affecting fakeroot perms after the fact failed"
1225
				print red("!!!")+"affecting fakeroot perms after the fact failed"
1215
				return retval
1226
				return retval
(-)portage-cvs/pym/emergehelp.py (-10 / +10 lines)
Lines 296-302 Link Here
296
		print bold("Usage: ")+turquoise("emerge")+" "+turquoise("--sync")
296
		print bold("Usage: ")+turquoise("emerge")+" "+turquoise("--sync")
297
		print
297
		print
298
		print "       'emerge --sync' tells emerge to update the Portage tree as specified in"
298
		print "       'emerge --sync' tells emerge to update the Portage tree as specified in"
299
		print "       The SYNC variable found in /etc/make.conf.  By default, SYNC instructs"
299
		print "       The SYNC variable found in /@affix@etc/make.conf.  By default, SYNC instructs"
300
		print "       emerge to perform an rsync-style update with rsync.gentoo.org."
300
		print "       emerge to perform an rsync-style update with rsync.gentoo.org."
301
		print
301
		print
302
		print "       'emerge-webrsync' exists as a helper app to emerge --sync, providing a"
302
		print "       'emerge-webrsync' exists as a helper app to emerge --sync, providing a"
Lines 329-338 Link Here
329
329
330
Portage has a special feature called "config file protection".  The purpose of
330
Portage has a special feature called "config file protection".  The purpose of
331
this feature is to prevent new package installs from clobbering existing
331
this feature is to prevent new package installs from clobbering existing
332
configuration files.  By default, config file protection is turned on for /etc
332
configuration files.  By default, config file protection is turned on for /@affix@etc
333
and the KDE configuration dirs; more may be added in the future.
333
and the KDE configuration dirs; more may be added in the future.
334
334
335
When Portage installs a file into a protected directory tree like /etc, any
335
When Portage installs a file into a protected directory tree like /@affix@etc, any
336
existing files will not be overwritten.  If a file of the same name already
336
existing files will not be overwritten.  If a file of the same name already
337
exists, Portage will change the name of the to-be- installed file from 'foo' to
337
exists, Portage will change the name of the to-be- installed file from 'foo' to
338
'._cfg0000_foo'.  If '._cfg0000_foo' already exists, this name becomes
338
'._cfg0000_foo'.  If '._cfg0000_foo' already exists, this name becomes
Lines 346-366 Link Here
346
deleted, which is of paramount importance.
346
deleted, which is of paramount importance.
347
347
348
Protected directories are set using the CONFIG_PROTECT variable, normally
348
Protected directories are set using the CONFIG_PROTECT variable, normally
349
defined in /etc/make.globals.  Directory exceptions to the CONFIG_PROTECTed
349
defined in /@affix@tc/make.globals.  Directory exceptions to the CONFIG_PROTECTed
350
directories can be specified using the CONFIG_PROTECT_MASK variable.  To find
350
directories can be specified using the CONFIG_PROTECT_MASK variable.  To find
351
files that need to be updated in /etc, type:
351
files that need to be updated in /@affix@etc, type:
352
352
353
# find /etc -iname '._cfg????_*'
353
# find /@affix@etc -iname '._cfg????_*'
354
354
355
You can disable this feature by setting CONFIG_PROTECT="-*" in /etc/make.conf.
355
You can disable this feature by setting CONFIG_PROTECT="-*" in /@affix@etc/make.conf.
356
Then, Portage will mercilessly auto-update your config files.  Alternatively,
356
Then, Portage will mercilessly auto-update your config files.  Alternatively,
357
you can leave Config File Protection on but tell Portage that it can overwrite
357
you can leave Config File Protection on but tell Portage that it can overwrite
358
files in certain specific /etc subdirectories.  For example, if you wanted
358
files in certain specific /@affix@etc subdirectories.  For example, if you wanted
359
Portage to automatically update your rc scripts and your wget configuration,
359
Portage to automatically update your rc scripts and your wget configuration,
360
but didn't want any other changes made without your explicit approval, you'd
360
but didn't want any other changes made without your explicit approval, you'd
361
add this to /etc/make.conf:
361
add this to /@affix@etc/make.conf:
362
362
363
CONFIG_PROTECT_MASK="/etc/wget /etc/rc.d"
363
CONFIG_PROTECT_MASK="/@affix@etc/wget /@affix@etc/rc.d"
364
364
365
etc-update is also available to aid in the merging of these files. It provides
365
etc-update is also available to aid in the merging of these files. It provides
366
a vimdiff interactive merging setup and can auto-merge trivial changes.
366
a vimdiff interactive merging setup and can auto-merge trivial changes.
(-)portage-cvs/pym/getbinpkg.py (-4 / +4 lines)
Lines 411-424 Link Here
411
		keepconnection = 1
411
		keepconnection = 1
412
412
413
	if makepickle == None:
413
	if makepickle == None:
414
		makepickle = "/var/cache/edb/metadata.idx.most_recent"
414
		makepickle = "/@affix@var/cache/edb/metadata.idx.most_recent"
415
415
416
	conn,protocol,address,params,headers = create_conn(baseurl, conn)
416
	conn,protocol,address,params,headers = create_conn(baseurl, conn)
417
417
418
	filedict = {}
418
	filedict = {}
419
419
420
	try:
420
	try:
421
		metadatafile = open("/var/cache/edb/remote_metadata.pickle")
421
		metadatafile = open("/@affix@var/cache/edb/remote_metadata.pickle")
422
		metadata = cPickle.load(metadatafile)
422
		metadata = cPickle.load(metadatafile)
423
		sys.stderr.write("Loaded metadata pickle.\n")
423
		sys.stderr.write("Loaded metadata pickle.\n")
424
		metadatafile.close()
424
		metadatafile.close()
Lines 492-498 Link Here
492
					sys.stderr.write("!!! Failed to read data from index: "+str(mfile)+"\n")
492
					sys.stderr.write("!!! Failed to read data from index: "+str(mfile)+"\n")
493
					sys.stderr.write("!!! "+str(e)+"\n")
493
					sys.stderr.write("!!! "+str(e)+"\n")
494
			try:
494
			try:
495
				metadatafile = open("/var/cache/edb/remote_metadata.pickle", "w+")
495
				metadatafile = open("/@affix@var/cache/edb/remote_metadata.pickle", "w+")
496
				cPickle.dump(metadata,metadatafile)
496
				cPickle.dump(metadata,metadatafile)
497
				metadatafile.close()
497
				metadatafile.close()
498
			except SystemExit, e:
498
			except SystemExit, e:
Lines 522-528 Link Here
522
	try:
522
	try:
523
		if metadata[baseurl].has_key("modified") and metadata[baseurl]["modified"]:
523
		if metadata[baseurl].has_key("modified") and metadata[baseurl]["modified"]:
524
			metadata[baseurl]["timestamp"] = int(time.time())
524
			metadata[baseurl]["timestamp"] = int(time.time())
525
			metadatafile = open("/var/cache/edb/remote_metadata.pickle", "w+")
525
			metadatafile = open("/@affix@var/cache/edb/remote_metadata.pickle", "w+")
526
			cPickle.dump(metadata,metadatafile)
526
			cPickle.dump(metadata,metadatafile)
527
			metadatafile.close()
527
			metadatafile.close()
528
		if makepickle:
528
		if makepickle:
(-)portage-cvs/pym/orig_dict_cache.py (-1 / +1 lines)
Lines 1-4 Link Here
1
#!/usr/bin/python
1
#! @PYTHON@
2
# orig_dict_cache.py; older listdir caching implementation
2
# orig_dict_cache.py; older listdir caching implementation
3
# Copyright 1999-2004 Gentoo Foundation
3
# Copyright 1999-2004 Gentoo Foundation
4
# Distributed under the terms of the GNU General Public License v2
4
# Distributed under the terms of the GNU General Public License v2
(-)portage-cvs/pym/portage.py (-190 / +195 lines)
Lines 91-97 Link Here
91
	  MOVE_BINARY, PRELINK_BINARY, WORLD_FILE, MAKE_CONF_FILE, MAKE_DEFAULTS_FILE, \
91
	  MOVE_BINARY, PRELINK_BINARY, WORLD_FILE, MAKE_CONF_FILE, MAKE_DEFAULTS_FILE, \
92
	  DEPRECATED_PROFILE_FILE, USER_VIRTUALS_FILE, EBUILD_SH_ENV_FILE, \
92
	  DEPRECATED_PROFILE_FILE, USER_VIRTUALS_FILE, EBUILD_SH_ENV_FILE, \
93
	  INVALID_ENV_FILE, CUSTOM_MIRRORS_FILE, SANDBOX_PIDS_FILE, CONFIG_MEMORY_FILE,\
93
	  INVALID_ENV_FILE, CUSTOM_MIRRORS_FILE, SANDBOX_PIDS_FILE, CONFIG_MEMORY_FILE,\
94
	  INCREMENTALS, STICKIES
94
	  INCREMENTALS, STICKIES, MYROOT, ROOT
95
95
96
	from portage_data import ostype, lchown, userland, secpass, uid, wheelgid, \
96
	from portage_data import ostype, lchown, userland, secpass, uid, wheelgid, \
97
	                         portage_uid, portage_gid
97
	                         portage_uid, portage_gid
Lines 115-125 Link Here
115
except SystemExit, e:
115
except SystemExit, e:
116
	raise
116
	raise
117
except Exception, e:
117
except Exception, e:
118
	raise
118
	sys.stderr.write("\n\n")
119
	sys.stderr.write("\n\n")
119
	sys.stderr.write("!!! Failed to complete portage imports. There are internal modules for\n")
120
	sys.stderr.write("!!! Failed to complete portage imports. There are internal modules for\n")
120
	sys.stderr.write("!!! portage and failure here indicates that you have a problem with your\n")
121
	sys.stderr.write("!!! portage and failure here indicates that you have a problem with your\n")
121
	sys.stderr.write("!!! installation of portage. Please try a rescue portage located in the\n")
122
	sys.stderr.write("!!! installation of portage. Please try a rescue portage located in the\n")
122
	sys.stderr.write("!!! portage tree under '/usr/portage/sys-apps/portage/files/' (default).\n")
123
	sys.stderr.write("!!! portage tree under '@prefix@/portage/sys-apps/portage/files/' (default).\n")
123
	sys.stderr.write("!!! There is a README.RESCUE file that details the steps required to perform\n")
124
	sys.stderr.write("!!! There is a README.RESCUE file that details the steps required to perform\n")
124
	sys.stderr.write("!!! a recovery of portage.\n")
125
	sys.stderr.write("!!! a recovery of portage.\n")
125
	
126
	
Lines 374-384 Link Here
374
375
375
#move this to config.
376
#move this to config.
376
def env_update(root,makelinks=1):
377
def env_update(root,makelinks=1):
377
	if not os.path.exists(root+"etc/env.d"):
378
	if not os.path.exists(root("etc/env.d")):
378
		prevmask=os.umask(0)
379
		prevmask=os.umask(0)
379
		os.makedirs(root+"etc/env.d",0755)
380
		os.makedirs(root("etc/env.d"),0755)
380
		os.umask(prevmask)
381
		os.umask(prevmask)
381
	fns=listdir(root+"etc/env.d")
382
	fns=listdir(root("etc/env.d"))
382
	fns.sort()
383
	fns.sort()
383
	pos=0
384
	pos=0
384
	while (pos<len(fns)):
385
	while (pos<len(fns)):
Lines 409-415 Link Here
409
		# don't process backup files
410
		# don't process backup files
410
		if x[-1]=='~' or x[-4:]==".bak":
411
		if x[-1]=='~' or x[-4:]==".bak":
411
			continue
412
			continue
412
		myconfig=getconfig(root+"etc/env.d/"+x)
413
		myconfig=getconfig(root("etc/env.d/"+x))
413
		if myconfig==None:
414
		if myconfig==None:
414
			writemsg("!!! Parsing error in "+str(root)+"etc/env.d/"+str(x)+"\n")
415
			writemsg("!!! Parsing error in "+str(root)+"etc/env.d/"+str(x)+"\n")
415
			#parse error
416
			#parse error
Lines 426-433 Link Here
426
		for myenv in myconfig.keys():
427
		for myenv in myconfig.keys():
427
			env[myenv]=varexpand(myconfig[myenv])
428
			env[myenv]=varexpand(myconfig[myenv])
428
			
429
			
429
	if os.path.exists(root+"etc/ld.so.conf"):
430
	if os.path.exists(root("etc/ld.so.conf")):
430
		myld=open(root+"etc/ld.so.conf")
431
		myld=open(root("etc/ld.so.conf"))
431
		myldlines=myld.readlines()
432
		myldlines=myld.readlines()
432
		myld.close()
433
		myld.close()
433
		oldld=[]
434
		oldld=[]
Lines 436-442 Link Here
436
			if x[0]=="#":
437
			if x[0]=="#":
437
				continue
438
				continue
438
			oldld.append(x[:-1])
439
			oldld.append(x[:-1])
439
	#	os.rename(root+"etc/ld.so.conf",root+"etc/ld.so.conf.bak")
440
	#	os.rename(root("etc/ld.so.conf"),root("etc/ld.so.conf.bak"))
440
	# Where is the new ld.so.conf generated? (achim)
441
	# Where is the new ld.so.conf generated? (achim)
441
	else:
442
	else:
442
		oldld=None
443
		oldld=None
Lines 449-457 Link Here
449
	newld=specials["LDPATH"]
450
	newld=specials["LDPATH"]
450
	if (oldld!=newld):
451
	if (oldld!=newld):
451
		#ld.so.conf needs updating and ldconfig needs to be run
452
		#ld.so.conf needs updating and ldconfig needs to be run
452
		myfd=open(root+"etc/ld.so.conf","w")
453
		myfd=open(root("etc/ld.so.conf"),"w")
453
		myfd.write("# ld.so.conf autogenerated by env-update; make all changes to\n")
454
		myfd.write("# ld.so.conf autogenerated by env-update; make all changes to\n")
454
		myfd.write("# contents of /etc/env.d directory\n")
455
		myfd.write("# contents of "+root("etc/env.d")+" directory\n")
455
		for x in specials["LDPATH"]:
456
		for x in specials["LDPATH"]:
456
			myfd.write(x+"\n")
457
			myfd.write(x+"\n")
457
		myfd.close()
458
		myfd.close()
Lines 459-469 Link Here
459
460
460
	# Update prelink.conf if we are prelink-enabled
461
	# Update prelink.conf if we are prelink-enabled
461
	if prelink_capable:
462
	if prelink_capable:
462
		newprelink=open(root+"etc/prelink.conf","w")
463
		newprelink=open(root("etc/prelink.conf"),"w")
463
		newprelink.write("# prelink.conf autogenerated by env-update; make all changes to\n")
464
		newprelink.write("# prelink.conf autogenerated by env-update; make all changes to\n")
464
		newprelink.write("# contents of /etc/env.d directory\n")
465
		newprelink.write("# contents of "+root("etc/env.d")+" directory\n")
465
	
466
	
466
		for x in ["/bin","/sbin","/usr/bin","/usr/sbin","/lib","/usr/lib"]:
467
		for x in [MYROOT("bin"),MYROOT("sbin"),MYROOT.prefix("/bin"),MYROOT.prefix("/sbin"),MYROOT("lib"),MYROOT.prefix("/lib")]:
467
			newprelink.write("-l "+x+"\n");
468
			newprelink.write("-l "+x+"\n");
468
		for x in specials["LDPATH"]+specials["PATH"]+specials["PRELINK_PATH"]:
469
		for x in specials["LDPATH"]+specials["PATH"]+specials["PRELINK_PATH"]:
469
			if not x:
470
			if not x:
Lines 486-492 Link Here
486
	if not mtimedb.has_key("ldpath"):
487
	if not mtimedb.has_key("ldpath"):
487
		mtimedb["ldpath"]={}
488
		mtimedb["ldpath"]={}
488
489
489
	for x in specials["LDPATH"]+['/usr/lib','/lib']:
490
	for x in specials["LDPATH"]+[MYROOT.prefix('/lib'),MYROOT('lib'),'/usr/lib','/lib']:
490
		try:
491
		try:
491
			newldpathtime=os.stat(x)[stat.ST_MTIME]
492
			newldpathtime=os.stat(x)[stat.ST_MTIME]
492
		except SystemExit, e:
493
		except SystemExit, e:
Lines 508-521 Link Here
508
		# an older package installed ON TOP of a newer version will cause ldconfig
509
		# an older package installed ON TOP of a newer version will cause ldconfig
509
		# to overwrite the symlinks we just made. -X means no links. After 'clean'
510
		# to overwrite the symlinks we just made. -X means no links. After 'clean'
510
		# we can safely create links.
511
		# we can safely create links.
511
		writemsg(">>> Regenerating "+str(root)+"etc/ld.so.cache...\n")
512
		writemsg(">>> Regenerating "+root("etc/ld.so.cache")+"...\n")
512
		cwd="/"
513
		cwd="/"
513
		try:	cwd=os.getcwd()
514
		try:	cwd=os.getcwd()
514
		except (OSError, IOError): pass
515
		except (OSError, IOError): pass
515
		if makelinks:
516
		if makelinks:
516
			portage_exec.spawn("/sbin/ldconfig -r "+root)
517
			portage_exec.spawn("/sbin/ldconfig -r "+root())
517
		else:
518
		else:
518
			portage_exec.spawn("/sbin/ldconfig -X -r "+root)
519
			portage_exec.spawn("/sbin/ldconfig -X -r "+root())
519
		try:	os.chdir(cwd)
520
		try:	os.chdir(cwd)
520
		except OSError: pass
521
		except OSError: pass
521
			
522
			
Lines 524-534 Link Here
524
	penvnotice  = "# THIS FILE IS AUTOMATICALLY GENERATED BY env-update.\n"
525
	penvnotice  = "# THIS FILE IS AUTOMATICALLY GENERATED BY env-update.\n"
525
	penvnotice += "# DO NOT EDIT THIS FILE. CHANGES TO STARTUP PROFILES\n"
526
	penvnotice += "# DO NOT EDIT THIS FILE. CHANGES TO STARTUP PROFILES\n"
526
	cenvnotice  = penvnotice
527
	cenvnotice  = penvnotice
527
	penvnotice += "# GO INTO /etc/profile NOT /etc/profile.env\n\n"
528
	penvnotice += "# GO INTO "+root("etc/profile")+" NOT "+root("etc/profile.env")+"\n\n"
528
	cenvnotice += "# GO INTO /etc/csh.cshrc NOT /etc/csh.env\n\n"
529
	cenvnotice += "# GO INTO "+root("etc/csh.cshrc")+" NOT "+root("etc/csh.env")+"\n\n"
529
530
530
	#create /etc/profile.env for bash support
531
	#create /etc/profile.env for bash support
531
	outfile=open(root+"/etc/profile.env","w")
532
	outfile=open(root("etc/profile.env"),"w")
532
	outfile.write(penvnotice)
533
	outfile.write(penvnotice)
533
534
534
	for path, values in specials.items():
535
	for path, values in specials.items():
Lines 549-555 Link Here
549
	outfile.close()
550
	outfile.close()
550
	
551
	
551
	#create /etc/csh.env for (t)csh support
552
	#create /etc/csh.env for (t)csh support
552
	outfile=open(root+"/etc/csh.env","w")
553
	outfile=open(root("etc/csh.env"),"w")
553
	outfile.write(cenvnotice)
554
	outfile.write(cenvnotice)
554
	
555
	
555
	for path, values in specials.items():
556
	for path, values in specials.items():
Lines 758-764 Link Here
758
	if not isinstance(mysettings, config):
759
	if not isinstance(mysettings, config):
759
		raise TypeError, "Invalid type for config object: %s" % mysettings.__class_
760
		raise TypeError, "Invalid type for config object: %s" % mysettings.__class_
760
761
761
	custommirrors=grabdict(CUSTOM_MIRRORS_FILE)
762
	custommirrors=grabdict(MYROOT(CUSTOM_MIRRORS_FILE))
762
763
763
	mymirrors=[]
764
	mymirrors=[]
764
	
765
	
Lines 1327-1333 Link Here
1327
			"!!! Most likely a temporary problem. Try 'emerge sync' again later.\n"+
1328
			"!!! Most likely a temporary problem. Try 'emerge sync' again later.\n"+
1328
			"!!! If you are certain of the authenticity of the file then you may type\n"+
1329
			"!!! If you are certain of the authenticity of the file then you may type\n"+
1329
			"!!! the following to generate a new digest:\n"+
1330
			"!!! the following to generate a new digest:\n"+
1330
			"!!!   ebuild /usr/portage/category/package/package-version.ebuild digest\n",
1331
			"!!!   ebuild @prefix@/portage/category/package/package-version.ebuild digest\n",
1331
			verbosity)
1332
			verbosity)
1332
			return 0
1333
			return 0
1333
		myfile=os.path.normpath(basedir+"/"+x)
1334
		myfile=os.path.normpath(basedir+"/"+x)
Lines 1410-1416 Link Here
1410
					return 0
1411
					return 0
1411
1412
1412
		if manifest_files and strict:
1413
		if manifest_files and strict:
1413
			for x in grabfile(USER_CONFIG_PATH+"/manifest_excludes"):
1414
			for x in grabfile(MYROOT(USER_CONFIG_PATH+"/manifest_excludes")):
1414
				if x in manifest_files:
1415
				if x in manifest_files:
1415
					#writemsg(yellow(">>>")+" md5-ignore: "+x,verbosity)
1416
					#writemsg(yellow(">>>")+" md5-ignore: "+x,verbosity)
1416
					manifest_files.remove(x)
1417
					manifest_files.remove(x)
Lines 1437-1449 Link Here
1437
# setup
1438
# setup
1438
def doebuild(myebuild,mydo,myroot,mysettings,debug=0,listonly=0,fetchonly=0,cleanup=0,dbkey=None,use_cache=1,\
1439
def doebuild(myebuild,mydo,myroot,mysettings,debug=0,listonly=0,fetchonly=0,cleanup=0,dbkey=None,use_cache=1,\
1439
	fetchall=0,tree="porttree",allstages=True,use_info_env=True,verbosity=0):
1440
	fetchall=0,tree="porttree",allstages=True,use_info_env=True,verbosity=0):
1440
1441
	retval = ebuild.ebuild_handler().process_phase(mydo,mysettings,myebuild,myroot, debug=debug, listonly=listonly, \
1441
	retval = ebuild.ebuild_handler().process_phase(mydo,mysettings,myebuild,myroot, debug=debug, listonly=listonly, \
1442
	fetchonly=fetchonly, cleanup=cleanup, use_cache=use_cache, fetchall=fetchall, tree=tree, allstages=allstages, \
1442
	fetchonly=fetchonly, cleanup=cleanup, use_cache=use_cache, fetchall=fetchall, tree=tree, allstages=allstages, \
1443
	use_info_env=use_info_env,verbosity=verbosity)
1443
	use_info_env=use_info_env,verbosity=verbosity)
1444
1444
1445
	#def doebuild(myebuild,mydo,myroot,mysettings,debug=0,listonly=0,fetchonly=0,cleanup=0,dbkey=None,use_cache=1,fetchall=0,tree="porttree",allstages=True,use_info_env=True):
1446
#	retval=ebuild.ebuild_handler().process_phase(mydo, mysettings,myebuild,myroot,debug=debug,listonly=listonly,fetchonly=fetchonly,cleanup=cleanup,dbkey=None,use_cache=1,fetchall=0,tree="porttree",allstages=allstages,use_info_env=use_info_env)
1447
	return retval
1445
	return retval
1448
1446
1449
	
1447
	
Lines 1647-1662 Link Here
1647
			##if vardbapi:
1645
			##if vardbapi:
1648
			##	mydbapi=vardbapi
1646
			##	mydbapi=vardbapi
1649
			##else:
1647
			##else:
1650
			##	mydbapi=db[root]["vartree"].dbapi
1648
			##	mydbapi=db[root()]["vartree"].dbapi
1651
			mydbapi=db[root]["vartree"].dbapi
1649
			mydbapi=db[root()]["vartree"].dbapi
1652
1650
1653
			if db["/"].has_key("porttree"):
1651
			if db[MYROOT()].has_key("porttree"):
1654
				myportapi=db["/"]["porttree"].dbapi
1652
				myportapi=db[MYROOT()]["porttree"].dbapi
1655
			else:
1653
			else:
1656
				myportapi=None
1654
				myportapi=None
1657
1655
1658
			if use_binaries and db["/"].has_key("bintree"):
1656
			if use_binaries and db[MYROOT()].has_key("bintree"):
1659
				mybinapi=db["/"]["bintree"].dbapi
1657
				mybinapi=db[MYROOT()]["bintree"].dbapi
1660
				writemsg("Using bintree...\n",2)
1658
				writemsg("Using bintree...\n",2)
1661
			else:
1659
			else:
1662
				mybinapi=None
1660
				mybinapi=None
Lines 2163-2169 Link Here
2163
2161
2164
	def counter_tick_core(self,myroot,incrementing=1,mycpv=None):
2162
	def counter_tick_core(self,myroot,incrementing=1,mycpv=None):
2165
		"This method will grab the next COUNTER value and record it back to the global file.  Returns new counter value."
2163
		"This method will grab the next COUNTER value and record it back to the global file.  Returns new counter value."
2166
		cpath=myroot+"var/cache/edb/counter"
2164
		cpath=myroot(CACHE_PATH+"/counter")
2167
		changed=0
2165
		changed=0
2168
		min_counter = 0
2166
		min_counter = 0
2169
		if mycpv:
2167
		if mycpv:
Lines 2191-2197 Link Here
2191
				counter=long(cfile.readline())
2189
				counter=long(cfile.readline())
2192
			except (ValueError,OverflowError):
2190
			except (ValueError,OverflowError):
2193
				try:
2191
				try:
2194
					counter=long(portage_exec.spawn_get_output("for FILE in $(find /"+VDB_PATH+" -type f -name COUNTER); do echo $(<${FILE}); done | sort -n | tail -n1 | tr -d '\n'",spawn_type=portage_exec.spawn_bash)[1])
2192
					counter=long(portage_exec.spawn_get_output("for FILE in $(find "+MYROOT(VDB_PATH)+" -type f -name COUNTER); do echo $(<${FILE}); done | sort -n | tail -n1 | tr -d '\n'",spawn_type=portage_exec.spawn_bash)[1])
2195
					writemsg("!!! COUNTER was corrupted; resetting to value of %d\n" % counter)
2193
					writemsg("!!! COUNTER was corrupted; resetting to value of %d\n" % counter)
2196
					changed=1
2194
					changed=1
2197
				except (ValueError,OverflowError):
2195
				except (ValueError,OverflowError):
Lines 2202-2208 Link Here
2202
			cfile.close()
2200
			cfile.close()
2203
		else:
2201
		else:
2204
			try:
2202
			try:
2205
				counter=long(portage_exec.spawn_get_output("for FILE in $(find /"+VDB_PATH+" -type f -name COUNTER); do echo $(<${FILE}); done | sort -n | tail -n1 | tr -d '\n'",spawn_type=portage_exec.spawn_bash)[1])
2203
				counter=long(portage_exec.spawn_get_output("for FILE in $(find "+MYROOT(VDB_PATH)+" -type f -name COUNTER); do echo $(<${FILE}); done | sort -n | tail -n1 | tr -d '\n'",spawn_type=portage_exec.spawn_bash)[1])
2206
				writemsg("!!! Global counter missing. Regenerated from counter files to: %s\n" % counter)
2204
				writemsg("!!! Global counter missing. Regenerated from counter files to: %s\n" % counter)
2207
			except SystemExit, e:
2205
			except SystemExit, e:
2208
				raise
2206
				raise
Lines 2338-2349 Link Here
2338
2336
2339
	def cpv_exists(self,mykey):
2337
	def cpv_exists(self,mykey):
2340
		"Tells us whether an actual ebuild exists on disk (no masking)"
2338
		"Tells us whether an actual ebuild exists on disk (no masking)"
2341
		return os.path.exists(self.root+VDB_PATH+"/"+mykey)
2339
		return os.path.exists(self.root(VDB_PATH+"/"+mykey))
2342
2340
2343
	def cpv_counter(self,mycpv):
2341
	def cpv_counter(self,mycpv):
2344
		"This method will grab the COUNTER. Returns a counter value."
2342
		"This method will grab the COUNTER. Returns a counter value."
2345
		cdir=self.root+VDB_PATH+"/"+mycpv
2343
		cdir=self.root(VDB_PATH+"/"+mycpv)
2346
		cpath=self.root+VDB_PATH+"/"+mycpv+"/COUNTER"
2344
		cpath=self.root(VDB_PATH+"/"+mycpv+"/COUNTER")
2347
2345
2348
		# We write our new counter value to a new file that gets moved into
2346
		# We write our new counter value to a new file that gets moved into
2349
		# place to avoid filesystem corruption on XFS (unexpected reboot.)
2347
		# place to avoid filesystem corruption on XFS (unexpected reboot.)
Lines 2372-2387 Link Here
2372
				except SystemExit, e:
2370
				except SystemExit, e:
2373
					raise
2371
					raise
2374
				except Exception, e:
2372
				except Exception, e:
2375
					writemsg("!!! COUNTER file is missing for "+str(mycpv)+" in /var/db.\n")
2373
					writemsg("!!! COUNTER file is missing for "+str(mycpv)+" in "+MYROOT("var/db")+".\n")
2376
					writemsg("!!! Please run /usr/lib/portage/bin/fix-db.pl or\n")
2374
					writemsg("!!! Please run @PORTAGE_BASE@/bin/fix-db.pl or\n")
2377
					writemsg("!!! Please run /usr/lib/portage/bin/fix-db.py or\n")
2375
					writemsg("!!! Please run @PORTAGE_BASE@/bin/fix-db.py or\n")
2378
					writemsg("!!! unmerge this exact version.\n")
2376
					writemsg("!!! unmerge this exact version.\n")
2379
					writemsg("!!! %s\n" % e)
2377
					writemsg("!!! %s\n" % e)
2380
					sys.exit(1)
2378
					sys.exit(1)
2381
			else:
2379
			else:
2382
				writemsg("!!! COUNTER file is missing for "+str(mycpv)+" in /var/db.\n")
2380
				writemsg("!!! COUNTER file is missing for "+str(mycpv)+" in "+MYROOT("var/db")+".\n")
2383
				writemsg("!!! Please run /usr/lib/portage/bin/fix-db.pl or\n")
2381
				writemsg("!!! Please run @PORTAGE_BASE@/bin/fix-db.pl or\n")
2384
				writemsg("!!! Please run /usr/lib/portage/bin/fix-db.py or\n")
2382
				writemsg("!!! Please run @PORTAGE_BASE@/bin/fix-db.py or\n")
2385
				writemsg("!!! remerge the package.\n")
2383
				writemsg("!!! remerge the package.\n")
2386
				sys.exit(1)
2384
				sys.exit(1)
2387
		else:
2385
		else:
Lines 2398-2415 Link Here
2398
	
2396
	
2399
	def cpv_inject(self,mycpv):
2397
	def cpv_inject(self,mycpv):
2400
		"injects a real package into our on-disk database; assumes mycpv is valid and doesn't already exist"
2398
		"injects a real package into our on-disk database; assumes mycpv is valid and doesn't already exist"
2401
		os.makedirs(self.root+VDB_PATH+"/"+mycpv)	
2399
		os.makedirs(self.root(VDB_PATH+"/"+mycpv))
2402
		counter=db[self.root]["vartree"].dbapi.counter_tick(self.root,mycpv=mycpv)
2400
		counter=db[self.root()]["vartree"].dbapi.counter_tick(self.root,mycpv=mycpv)
2403
		# write local package counter so that emerge clean does the right thing
2401
		# write local package counter so that emerge clean does the right thing
2404
		lcfile=open(self.root+VDB_PATH+"/"+mycpv+"/COUNTER","w")
2402
		lcfile=open(self.root(VDB_PATH+"/"+mycpv+"/COUNTER"),"w")
2405
		lcfile.write(str(counter))
2403
		lcfile.write(str(counter))
2406
		lcfile.close()
2404
		lcfile.close()
2407
2405
2408
	def isInjected(self,mycpv):
2406
	def isInjected(self,mycpv):
2409
		if self.cpv_exists(mycpv):
2407
		if self.cpv_exists(mycpv):
2410
			if os.path.exists(self.root+VDB_PATH+"/"+mycpv+"/INJECTED"):
2408
			if os.path.exists(self.root(VDB_PATH+"/"+mycpv+"/INJECTED")):
2411
				return True
2409
				return True
2412
			if not os.path.exists(self.root+VDB_PATH+"/"+mycpv+"/CONTENTS"):
2410
			if not os.path.exists(self.root(VDB_PATH+"/"+mycpv+"/CONTENTS")):
2413
				return True
2411
				return True
2414
		return False
2412
		return False
2415
2413
Lines 2426-2439 Link Here
2426
			if mycpsplit[3]!="r0":
2424
			if mycpsplit[3]!="r0":
2427
				mynewcpv += "-"+mycpsplit[3]
2425
				mynewcpv += "-"+mycpsplit[3]
2428
			mycpsplit_new = portage_versions.catpkgsplit(mynewcpv)
2426
			mycpsplit_new = portage_versions.catpkgsplit(mynewcpv)
2429
			origpath=self.root+VDB_PATH+"/"+mycpv
2427
			origpath=self.root(VDB_PATH+"/"+mycpv)
2430
			if not os.path.exists(origpath):
2428
			if not os.path.exists(origpath):
2431
				continue
2429
				continue
2432
			writemsg("@")
2430
			writemsg("@")
2433
			if not os.path.exists(self.root+VDB_PATH+"/"+mynewcat):
2431
			if not os.path.exists(self.root(VDB_PATH+"/"+mynewcat)):
2434
				#create the directory
2432
				#create the directory
2435
				os.makedirs(self.root+VDB_PATH+"/"+mynewcat)	
2433
				os.makedirs(self.root(VDB_PATH+"/"+mynewcat))
2436
			newpath=self.root+VDB_PATH+"/"+mynewcpv
2434
			newpath=self.root(VDB_PATH+"/"+mynewcpv)
2437
			if os.path.exists(newpath):
2435
			if os.path.exists(newpath):
2438
				#dest already exists; keep this puppy where it is.
2436
				#dest already exists; keep this puppy where it is.
2439
				continue
2437
				continue
Lines 2452-2458 Link Here
2452
			catfile.write(mynewcat+"\n")
2450
			catfile.write(mynewcat+"\n")
2453
			catfile.close()
2451
			catfile.close()
2454
2452
2455
		dbdir = self.root+VDB_PATH
2453
		dbdir = self.root(VDB_PATH)
2456
		for catdir in listdir(dbdir):
2454
		for catdir in listdir(dbdir):
2457
			catdir = dbdir+"/"+catdir
2455
			catdir = dbdir+"/"+catdir
2458
			if os.path.isdir(catdir):
2456
			if os.path.isdir(catdir):
Lines 2470-2476 Link Here
2470
		if not origmatches:
2468
		if not origmatches:
2471
			return
2469
			return
2472
		for mycpv in origmatches:
2470
		for mycpv in origmatches:
2473
			origpath=self.root+VDB_PATH+"/"+mycpv
2471
			origpath=self.root(VDB_PATH+"/"+mycpv)
2474
			if not os.path.exists(origpath):
2472
			if not os.path.exists(origpath):
2475
				continue
2473
				continue
2476
2474
Lines 2491-2504 Link Here
2491
		if mysplit[0] == '*':
2489
		if mysplit[0] == '*':
2492
			mysplit[0] = mysplit[0][1:]
2490
			mysplit[0] = mysplit[0][1:]
2493
		try:
2491
		try:
2494
			mystat=os.stat(self.root+VDB_PATH+"/"+mysplit[0])[stat.ST_MTIME]
2492
			mystat=os.stat(self.root(VDB_PATH+"/"+mysplit[0]))[stat.ST_MTIME]
2495
		except OSError:
2493
		except OSError:
2496
			mystat=0
2494
			mystat=0
2497
		if use_cache and self.cpcache.has_key(mycp):
2495
		if use_cache and self.cpcache.has_key(mycp):
2498
			cpc=self.cpcache[mycp]
2496
			cpc=self.cpcache[mycp]
2499
			if cpc[0]==mystat:
2497
			if cpc[0]==mystat:
2500
				return cpc[1]
2498
				return cpc[1]
2501
		list=listdir(self.root+VDB_PATH+"/"+mysplit[0])
2499
		list=listdir(self.root(VDB_PATH+"/"+mysplit[0]))
2502
2500
2503
		if (list==None):
2501
		if (list==None):
2504
			return []
2502
			return []
Lines 2509-2515 Link Here
2509
				continue
2507
				continue
2510
			ps=portage_versions.pkgsplit(x)
2508
			ps=portage_versions.pkgsplit(x)
2511
			if not ps:
2509
			if not ps:
2512
				self.invalidentry(self.root+VDB_PATH+"/"+mysplit[0]+"/"+x)
2510
				self.invalidentry(self.root(VDB_PATH+"/"+mysplit[0]+"/"+x))
2513
				continue
2511
				continue
2514
			if len(mysplit) > 1:
2512
			if len(mysplit) > 1:
2515
				if ps[0]==mysplit[1]:
2513
				if ps[0]==mysplit[1]:
Lines 2524-2530 Link Here
2524
		return list(self.iter_cpv_all(use_cache=use_cache))
2522
		return list(self.iter_cpv_all(use_cache=use_cache))
2525
2523
2526
	def iter_cpv_all(self,use_cache=1):
2524
	def iter_cpv_all(self,use_cache=1):
2527
		basepath = self.root+VDB_PATH+"/"
2525
		basepath = self.root(VDB_PATH+"/")
2528
		
2526
		
2529
		mycats = self.categories
2527
		mycats = self.categories
2530
		if mycats == None:
2528
		if mycats == None:
Lines 2546-2552 Link Here
2546
				y = y[1:]
2544
				y = y[1:]
2547
			mysplit=portage_versions.catpkgsplit(y)
2545
			mysplit=portage_versions.catpkgsplit(y)
2548
			if not mysplit:
2546
			if not mysplit:
2549
				self.invalidentry(self.root+VDB_PATH+"/"+y)
2547
				self.invalidentry(self.root(VDB_PATH+"/"+y))
2550
				continue
2548
				continue
2551
			mykey=mysplit[0]+"/"+mysplit[1]
2549
			mykey=mysplit[0]+"/"+mysplit[1]
2552
			d[mysplit[0]+"/"+mysplit[1]] = None
2550
			d[mysplit[0]+"/"+mysplit[1]] = None
Lines 2566-2572 Link Here
2566
				del self.matchcache[mycat]
2564
				del self.matchcache[mycat]
2567
			return portage_dep.match_from_list(mydep,self.cp_list(mykey,use_cache=use_cache))
2565
			return portage_dep.match_from_list(mydep,self.cp_list(mykey,use_cache=use_cache))
2568
		try:
2566
		try:
2569
			curmtime=os.stat(self.root+VDB_PATH+"/"+mycat)[stat.ST_MTIME]
2567
			curmtime=os.stat(self.root(VDB_PATH+"/"+mycat))[stat.ST_MTIME]
2570
		except SystemExit, e:
2568
		except SystemExit, e:
2571
			raise
2569
			raise
2572
		except:
2570
		except:
Lines 2587-2593 Link Here
2587
		if not self.cpv_exists(mycpv):
2585
		if not self.cpv_exists(mycpv):
2588
			return []
2586
			return []
2589
		for x in wants:
2587
		for x in wants:
2590
			myfn = self.root+VDB_PATH+"/"+str(mycpv)+"/"+str(x)
2588
			myfn = self.root(VDB_PATH+"/"+str(mycpv)+"/"+str(x))
2591
			if os.access(myfn,os.R_OK):
2589
			if os.access(myfn,os.R_OK):
2592
				myf = open(myfn, "r")
2590
				myf = open(myfn, "r")
2593
				myd = myf.read()
2591
				myd = myf.read()
Lines 2622-2630 Link Here
2622
	def get_provide(self,mycpv):
2620
	def get_provide(self,mycpv):
2623
		myprovides=[]
2621
		myprovides=[]
2624
		try:
2622
		try:
2625
			mylines = grabfile(self.root+VDB_PATH+"/"+mycpv+"/PROVIDE")
2623
			mylines = grabfile(self.root(VDB_PATH+"/"+mycpv+"/PROVIDE"))
2626
			if mylines:
2624
			if mylines:
2627
				myuse = grabfile(self.root+VDB_PATH+"/"+mycpv+"/USE")
2625
				myuse = grabfile(self.root(VDB_PATH+"/"+mycpv+"/USE"))
2628
				myuse = " ".join(myuse).split()
2626
				myuse = " ".join(myuse).split()
2629
				mylines = " ".join(mylines)
2627
				mylines = " ".join(mylines)
2630
				mylines = flatten(portage_dep.use_reduce(portage_dep.paren_reduce(mylines), uselist=myuse))
2628
				mylines = flatten(portage_dep.use_reduce(portage_dep.paren_reduce(mylines), uselist=myuse))
Lines 2638-2644 Link Here
2638
			raise
2636
			raise
2639
		except Exception, e:
2637
		except Exception, e:
2640
			print
2638
			print
2641
			print "Check " + self.root+VDB_PATH+"/"+mycpv+"/PROVIDE and USE."
2639
			print "Check " + self.root(VDB_PATH+"/"+mycpv+"/")+"PROVIDE and USE."
2642
			print "Possibly Invalid: " + str(mylines)
2640
			print "Possibly Invalid: " + str(mylines)
2643
			print "Exception: "+str(e)
2641
			print "Exception: "+str(e)
2644
			print
2642
			print
Lines 2690-2700 Link Here
2690
		a=portage_versions.catpkgsplit(cpv)
2688
		a=portage_versions.catpkgsplit(cpv)
2691
		if not a:
2689
		if not a:
2692
			return 0
2690
			return 0
2693
		mylist=listdir(self.root+VDB_PATH+"/"+a[0])
2691
		mylist=listdir(self.root(VDB_PATH+"/"+a[0]))
2694
		for x in mylist:
2692
		for x in mylist:
2695
			b=portage_versions.pkgsplit(x)
2693
			b=portage_versions.pkgsplit(x)
2696
			if not b:
2694
			if not b:
2697
				self.dbapi.invalidentry(self.root+VDB_PATH+"/"+a[0]+"/"+x)
2695
				self.dbapi.invalidentry(self.root(VDB_PATH+"/"+a[0]+"/"+x))
2698
				continue
2696
				continue
2699
			if a[1]==b[0]:
2697
			if a[1]==b[0]:
2700
				return 1
2698
				return 1
Lines 2702-2720 Link Here
2702
			
2700
			
2703
	def getebuildpath(self,fullpackage):
2701
	def getebuildpath(self,fullpackage):
2704
		cat,package=fullpackage.split("/")
2702
		cat,package=fullpackage.split("/")
2705
		return self.root+VDB_PATH+"/"+fullpackage+"/"+package+".ebuild"
2703
		return self.root(VDB_PATH+"/"+fullpackage+"/"+package+".ebuild")
2706
2704
2707
	def getnode(self,mykey,use_cache=1):
2705
	def getnode(self,mykey,use_cache=1):
2708
		mykey=key_expand(mykey,mydb=self.dbapi,use_cache=use_cache)
2706
		mykey=key_expand(mykey,mydb=self.dbapi,use_cache=use_cache)
2709
		if not mykey:
2707
		if not mykey:
2710
			return []
2708
			return []
2711
		mysplit=mykey.split("/")
2709
		mysplit=mykey.split("/")
2712
		mydirlist=listdir(self.root+VDB_PATH+"/"+mysplit[0])
2710
		mydirlist=listdir(self.root(VDB_PATH+"/"+mysplit[0]))
2713
		returnme=[]
2711
		returnme=[]
2714
		for x in mydirlist:
2712
		for x in mydirlist:
2715
			mypsplit=portage_versions.pkgsplit(x)
2713
			mypsplit=portage_versions.pkgsplit(x)
2716
			if not mypsplit:
2714
			if not mypsplit:
2717
				self.dbapi.invalidentry(self.root+VDB_PATH+"/"+mysplit[0]+"/"+x)
2715
				self.dbapi.invalidentry(self.root(VDB_PATH+"/"+mysplit[0]+"/"+x))
2718
				continue
2716
				continue
2719
			if mypsplit[0]==mysplit[1]:
2717
			if mypsplit[0]==mysplit[1]:
2720
				appendme=[mysplit[0]+"/"+x,[mysplit[0],mypsplit[0],mypsplit[1],mypsplit[2]]]
2718
				appendme=[mysplit[0]+"/"+x,[mysplit[0],mypsplit[0],mypsplit[1],mypsplit[2]]]
Lines 2726-2732 Link Here
2726
		"Get a slot for a catpkg; assume it exists."
2724
		"Get a slot for a catpkg; assume it exists."
2727
		myslot = ""
2725
		myslot = ""
2728
		try:
2726
		try:
2729
			myslot=" ".join(grabfile(self.root+VDB_PATH+"/"+mycatpkg+"/SLOT"))
2727
			myslot=" ".join(grabfile(self.root(VDB_PATH+"/"+mycatpkg+"/SLOT")))
2730
		except SystemExit, e:
2728
		except SystemExit, e:
2731
			raise
2729
			raise
2732
		except Exception, e:
2730
		except Exception, e:
Lines 2737-2747 Link Here
2737
		"""Does the particular node (cat/pkg key) exist?"""
2735
		"""Does the particular node (cat/pkg key) exist?"""
2738
		mykey=key_expand(mykey,mydb=self.dbapi,use_cache=use_cache)
2736
		mykey=key_expand(mykey,mydb=self.dbapi,use_cache=use_cache)
2739
		mysplit=mykey.split("/")
2737
		mysplit=mykey.split("/")
2740
		mydirlist=listdir(self.root+VDB_PATH+"/"+mysplit[0])
2738
		mydirlist=listdir(self.root(VDB_PATH+"/"+mysplit[0]))
2741
		for x in mydirlist:
2739
		for x in mydirlist:
2742
			mypsplit=portage_versions.pkgsplit(x)
2740
			mypsplit=portage_versions.pkgsplit(x)
2743
			if not mypsplit:
2741
			if not mypsplit:
2744
				self.dbapi.invalidentry(self.root+VDB_PATH+"/"+mysplit[0]+"/"+x)
2742
				self.dbapi.invalidentry(self.root(VDB_PATH+"/"+mysplit[0]+"/"+x))
2745
				continue
2743
				continue
2746
			if mypsplit[0]==mysplit[1]:
2744
			if mypsplit[0]==mysplit[1]:
2747
				return 1
2745
				return 1
Lines 2813-2819 Link Here
2813
		self.auxdbmodule  = self.mysettings.load_best_module("portdbapi.auxdbmodule")
2811
		self.auxdbmodule  = self.mysettings.load_best_module("portdbapi.auxdbmodule")
2814
		self.auxdb        = {}
2812
		self.auxdb        = {}
2815
		for x in self.porttrees:
2813
		for x in self.porttrees:
2816
			self.auxdb[x] = self.auxdbmodule(x, filtered_auxdbkeys, basepath=portage_const.DEPCACHE_PATH, 
2814
			self.auxdb[x] = self.auxdbmodule(x, filtered_auxdbkeys, basepath=MYROOT(DEPCACHE_PATH),
2817
				gid=portage_gid)
2815
				gid=portage_gid)
2818
2816
2819
2817
Lines 3386-3392 Link Here
3386
			#we need to update this next line when we have fully integrated the new db api
3384
			#we need to update this next line when we have fully integrated the new db api
3387
			auxerr=0
3385
			auxerr=0
3388
			try:
3386
			try:
3389
				myaux=db["/"]["porttree"].dbapi.aux_get(mycpv, ["KEYWORDS"])
3387
				myaux=db[MYROOT()]["porttree"].dbapi.aux_get(mycpv, ["KEYWORDS"])
3390
			except (KeyError,IOError,TypeError):
3388
			except (KeyError,IOError,TypeError):
3391
				continue
3389
				continue
3392
			if not myaux[0]:
3390
			if not myaux[0]:
Lines 3716-3722 Link Here
3716
		self.mysplit = portage_versions.pkgsplit(self.mycpv)
3714
		self.mysplit = portage_versions.pkgsplit(self.mycpv)
3717
		self.treetype = treetype
3715
		self.treetype = treetype
3718
3716
3719
		self.dbroot   = os.path.normpath(myroot+VDB_PATH)
3717
		self.dbroot   = os.path.normpath(myroot(VDB_PATH))
3720
		self.dbcatdir = self.dbroot+"/"+cat
3718
		self.dbcatdir = self.dbroot+"/"+cat
3721
		self.dbpkgdir = self.dbcatdir+"/"+pkg
3719
		self.dbpkgdir = self.dbcatdir+"/"+pkg
3722
		self.dbtmpdir = self.dbcatdir+"/-MERGING-"+pkg
3720
		self.dbtmpdir = self.dbcatdir+"/-MERGING-"+pkg
Lines 3755-3761 Link Here
3755
		return os.path.exists(self.dbdir)
3753
		return os.path.exists(self.dbdir)
3756
	
3754
	
3757
	def create(self):
3755
	def create(self):
3758
		"create the skeleton db directory structure.  No contents, virtuals, provides or anything.  Also will create /var/db/pkg if necessary."
3756
		"create the skeleton db directory structure.  No contents, virtuals, provides or anything.  Also will create "+MYROOT("var/db/pkg")+" if necessary."
3759
		# XXXXX Delete this eventually
3757
		# XXXXX Delete this eventually
3760
		raise Exception, "This is bad. Don't use it."
3758
		raise Exception, "This is bad. Don't use it."
3761
		if not os.path.exists(self.dbdir):
3759
		if not os.path.exists(self.dbdir):
Lines 3797-3803 Link Here
3797
			# we do this so we can remove from non-root filesystems
3795
			# we do this so we can remove from non-root filesystems
3798
			# (use the ROOT var to allow maintenance on other partitions)
3796
			# (use the ROOT var to allow maintenance on other partitions)
3799
			try:
3797
			try:
3800
				mydat[1]=os.path.normpath(root+mydat[1][1:])
3798
				mydat[1]=os.path.normpath(root.root(mydat[1][1:]))
3801
				if mydat[0]=="obj":
3799
				if mydat[0]=="obj":
3802
					#format: type, mtime, md5sum
3800
					#format: type, mtime, md5sum
3803
					pkgfiles[" ".join(mydat[1:-2])]=[mydat[0], mydat[-1], mydat[-2]]
3801
					pkgfiles[" ".join(mydat[1:-2])]=[mydat[0], mydat[-1], mydat[-2]]
Lines 3838-3853 Link Here
3838
		#do some config file management prep
3836
		#do some config file management prep
3839
		self.protect=[]
3837
		self.protect=[]
3840
		for x in self.settings["CONFIG_PROTECT"].split():
3838
		for x in self.settings["CONFIG_PROTECT"].split():
3841
			ppath=normpath(self.myroot+x)+"/"
3839
			for ppath in [ normpath(self.myroot.root(x))+"/"
3842
			if os.path.isdir(ppath):
3840
						 , normpath(self.myroot(x))+"/"
3843
				self.protect.append(ppath)
3841
						 ]:
3842
				if os.path.isdir(ppath):
3843
					self.protect.append(ppath)
3844
			
3844
			
3845
		self.protectmask=[]
3845
		self.protectmask=[]
3846
		for x in self.settings["CONFIG_PROTECT_MASK"].split():
3846
		for x in self.settings["CONFIG_PROTECT_MASK"].split():
3847
			ppath=normpath(self.myroot+x)+"/"
3847
			for ppath in [ normpath(self.myroot.root(x))+"/"
3848
			if os.path.isdir(ppath):
3848
						 , normpath(self.myroot(x))+"/"
3849
				self.protectmask.append(ppath)
3849
						 ]:
3850
			#if it doesn't exist, silently skip it
3850
				if os.path.isdir(ppath):
3851
					self.protectmask.append(ppath)
3852
				#if it doesn't exist, silently skip it
3851
3853
3852
	def isprotected(self,obj):
3854
	def isprotected(self,obj):
3853
		"""Checks if obj is in the current protect/mask directories. Returns
3855
		"""Checks if obj is in the current protect/mask directories. Returns
Lines 4060-4075 Link Here
4060
		#step 5: well, removal of package objects is complete, now for package *meta*-objects....
4062
		#step 5: well, removal of package objects is complete, now for package *meta*-objects....
4061
4063
4062
		#remove self from vartree database so that our own virtual gets zapped if we're the last node
4064
		#remove self from vartree database so that our own virtual gets zapped if we're the last node
4063
		db[self.myroot]["vartree"].zap(self.mycpv)
4065
		db[self.myroot()]["vartree"].zap(self.mycpv)
4064
4066
4065
		# New code to remove stuff from the world and virtuals files when unmerged.
4067
		# New code to remove stuff from the world and virtuals files when unmerged.
4066
		if trimworld:
4068
		if trimworld:
4067
			worldlist=grabfile(self.myroot+WORLD_FILE)
4069
			worldlist=grabfile(self.myroot(WORLD_FILE))
4068
			mykey=cpv_getkey(self.mycpv)
4070
			mykey=cpv_getkey(self.mycpv)
4069
			newworldlist=[]
4071
			newworldlist=[]
4070
			for x in worldlist:
4072
			for x in worldlist:
4071
				if portage_dep.dep_getkey(x)==mykey:
4073
				if portage_dep.dep_getkey(x)==mykey:
4072
					matches=db[self.myroot]["vartree"].dbapi.match(x,use_cache=0)
4074
					matches=db[self.myroot()]["vartree"].dbapi.match(x,use_cache=0)
4073
					if not matches:
4075
					if not matches:
4074
						#zap our world entry
4076
						#zap our world entry
4075
						pass
4077
						pass
Lines 4087-4099 Link Here
4087
			# (spanky noticed bug)
4089
			# (spanky noticed bug)
4088
			# XXX: dumb question, but abstracting the root uid might be wise/useful for
4090
			# XXX: dumb question, but abstracting the root uid might be wise/useful for
4089
			# 2nd pkg manager installation setups.
4091
			# 2nd pkg manager installation setups.
4090
			if not os.path.exists(os.path.dirname(self.myroot+WORLD_FILE)):
4092
			if not os.path.exists(os.path.dirname(self.myroot(WORLD_FILE))):
4091
				pdir = os.path.dirname(self.myroot + WORLD_FILE)
4093
				pdir = os.path.dirname(self.myroot(WORLD_FILE))
4092
				os.makedirs(pdir, mode=0755)
4094
				os.makedirs(pdir, mode=0755)
4093
				os.chown(pdir, 0, portage_gid)
4095
				os.chown(pdir, 0, portage_gid)
4094
				os.chmod(pdir, 02770)
4096
				os.chmod(pdir, 02770)
4095
4097
4096
			myworld=open(self.myroot+WORLD_FILE,"w")
4098
			myworld=open(self.myroot(WORLD_FILE),"w")
4097
			for x in newworldlist:
4099
			for x in newworldlist:
4098
				myworld.write(x+"\n")
4100
				myworld.write(x+"\n")
4099
			myworld.close()
4101
			myworld.close()
Lines 4153-4159 Link Here
4153
			
4155
			
4154
		# check for package collisions
4156
		# check for package collisions
4155
		otherversions=[]
4157
		otherversions=[]
4156
		for v in db[self.myroot]["vartree"].dbapi.cp_list(self.mysplit[0]):
4158
		for v in db[self.myroot()]["vartree"].dbapi.cp_list(self.mysplit[0]):
4157
			otherversions.append(v.split("/")[1])
4159
			otherversions.append(v.split("/")[1])
4158
4160
4159
		if self.pkg in otherversions:
4161
		if self.pkg in otherversions:
Lines 4266-4291 Link Here
4266
4268
4267
			# Step2: filter out libs from the packages states RDEPEND
4269
			# Step2: filter out libs from the packages states RDEPEND
4268
			if len(checklist):
4270
			if len(checklist):
4269
				rdep=portage_dep.paren_reduce(db[self.myroot][self.treetype].dbapi.aux_get( \
4271
				rdep=portage_dep.paren_reduce(db[self.myroot()][self.treetype].dbapi.aux_get( \
4270
					self.mycpv,["RDEPEND"])[0])
4272
					self.mycpv,["RDEPEND"])[0])
4271
				rdep=portage_util.unique_array(flatten(portage_dep.use_reduce(rdep, \
4273
				rdep=portage_util.unique_array(flatten(portage_dep.use_reduce(rdep, \
4272
					uselist=self.settings["USE"],matchall=False)))
4274
					uselist=self.settings["USE"],matchall=False)))
4273
			
4275
			
4274
				r=[]
4276
				r=[]
4275
				for x in rdep:
4277
				for x in rdep:
4276
					r.extend(db[self.myroot]["vartree"].dbapi.match(x))
4278
					r.extend(db[self.myroot()]["vartree"].dbapi.match(x))
4277
			
4279
			
4278
				rdep=r
4280
				rdep=r
4279
4281
4280
				# filter first package rdeps, then virtual/.?libc, then gcc
4282
				# filter first package rdeps, then virtual/.?libc, then gcc
4281
4283
4282
				lm = db[self.myroot]["vartree"].dbapi.match("virtual/glibc")
4284
				lm = db[self.myroot()]["vartree"].dbapi.match("virtual/glibc")
4283
				lm.extend(db[self.myroot]["vartree"].dbapi.match("virtual/libc"))
4285
				lm.extend(db[self.myroot()]["vartree"].dbapi.match("virtual/libc"))
4284
				lm = portage_util.unique_array(lm)
4286
				lm = portage_util.unique_array(lm)
4285
				
4287
				
4286
				for rd,msg in [(r,"%s/%s's RDEPEND" % (self.cat,self.pkg)), \
4288
				for rd,msg in [(r,"%s/%s's RDEPEND" % (self.cat,self.pkg)), \
4287
					(lm, "virtual/glibc, virtual/libc"), \
4289
					(lm, "virtual/glibc, virtual/libc"), \
4288
					(db[self.myroot]["vartree"].dbapi.match("gcc"), "gcc")]:
4290
					(db[self.myroot()]["vartree"].dbapi.match("gcc"), "gcc")]:
4289
4291
4290
					print green("*")+" Parsing %s contents" % msg
4292
					print green("*")+" Parsing %s contents" % msg
4291
4293
Lines 4351-4362 Link Here
4351
4353
4352
				if len(checklist):
4354
				if len(checklist):
4353
					# append this nodes rdepend.
4355
					# append this nodes rdepend.
4354
					rdep,u=db[self.myroot]["vartree"].dbapi.aux_get(r,["RDEPEND","USE"])
4356
					rdep,u=db[self.myroot()]["vartree"].dbapi.aux_get(r,["RDEPEND","USE"])
4355
					pd=flatten(portage_dep.use_reduce(portage_dep.paren_reduce(rdep),\
4357
					pd=flatten(portage_dep.use_reduce(portage_dep.paren_reduce(rdep),\
4356
						uselist=u,matchall=False))
4358
						uselist=u,matchall=False))
4357
					pd=portage_util.unique_array(pd)
4359
					pd=portage_util.unique_array(pd)
4358
					for x in pd:
4360
					for x in pd:
4359
						for y in db["/"]["vartree"].dbapi.match(x):
4361
						for y in db[MYROOT()]["vartree"].dbapi.match(x):
4360
							if y not in candidates_checked:
4362
							if y not in candidates_checked:
4361
								candidate.append(y)
4363
								candidate.append(y)
4362
					candidate=portage_util.unique_array(flatten(candidate))
4364
					candidate=portage_util.unique_array(flatten(candidate))
Lines 4435-4441 Link Here
4435
		# get current counter value (counter_tick also takes care of incrementing it)
4437
		# get current counter value (counter_tick also takes care of incrementing it)
4436
		# XXX Need to make this destroot, but it needs to be initialized first. XXX
4438
		# XXX Need to make this destroot, but it needs to be initialized first. XXX
4437
		# XXX bis: leads to some invalidentry() call through cp_all().
4439
		# XXX bis: leads to some invalidentry() call through cp_all().
4438
		counter = db["/"]["vartree"].dbapi.counter_tick(self.myroot,mycpv=self.mycpv)
4440
		counter = db[MYROOT()]["vartree"].dbapi.counter_tick(self.myroot,mycpv=self.mycpv)
4439
		# write local package counter for recording
4441
		# write local package counter for recording
4440
		lcfile = open(self.dbtmpdir+"/COUNTER","w")
4442
		lcfile = open(self.dbtmpdir+"/COUNTER","w")
4441
		lcfile.write(str(counter))
4443
		lcfile.write(str(counter))
Lines 4447-4454 Link Here
4447
		self.updateprotect()
4449
		self.updateprotect()
4448
4450
4449
		#if we have a file containing previously-merged config file md5sums, grab it.
4451
		#if we have a file containing previously-merged config file md5sums, grab it.
4450
		if os.path.exists(destroot+CONFIG_MEMORY_FILE):
4452
		if os.path.exists(destroot(CONFIG_MEMORY_FILE)):
4451
			cfgfiledict=grabdict(destroot+CONFIG_MEMORY_FILE)
4453
			cfgfiledict=grabdict(destroot(CONFIG_MEMORY_FILE))
4452
		else:
4454
		else:
4453
			cfgfiledict={}
4455
			cfgfiledict={}
4454
		if self.settings.has_key("NOCONFMEM"):
4456
		if self.settings.has_key("NOCONFMEM"):
Lines 4463-4469 Link Here
4463
4465
4464
		# we do a first merge; this will recurse through all files in our srcroot but also build up a
4466
		# we do a first merge; this will recurse through all files in our srcroot but also build up a
4465
		# "second hand" of symlinks to merge later
4467
		# "second hand" of symlinks to merge later
4466
		if self.mergeme(srcroot,destroot,outfile,secondhand,"",cfgfiledict,mymtime):
4468
		if self.mergeme(srcroot,destroot.root(),outfile,secondhand,"",cfgfiledict,mymtime):
4467
			return 1
4469
			return 1
4468
4470
4469
		# now, it's time for dealing our second hand; we'll loop until we can't merge anymore.	The rest are
4471
		# now, it's time for dealing our second hand; we'll loop until we can't merge anymore.	The rest are
Lines 4474-4480 Link Here
4474
			# couldn't get merged will be added to thirdhand.
4476
			# couldn't get merged will be added to thirdhand.
4475
4477
4476
			thirdhand=[]
4478
			thirdhand=[]
4477
			self.mergeme(srcroot,destroot,outfile,thirdhand,secondhand,cfgfiledict,mymtime)
4479
			self.mergeme(srcroot,destroot.root(),outfile,thirdhand,secondhand,cfgfiledict,mymtime)
4478
4480
4479
			#swap hands
4481
			#swap hands
4480
			lastlen=len(secondhand)
4482
			lastlen=len(secondhand)
Lines 4486-4492 Link Here
4486
4488
4487
		if len(secondhand):
4489
		if len(secondhand):
4488
			# force merge of remaining symlinks (broken or circular; oh well)
4490
			# force merge of remaining symlinks (broken or circular; oh well)
4489
			self.mergeme(srcroot,destroot,outfile,None,secondhand,cfgfiledict,mymtime)
4491
			self.mergeme(srcroot,destroot.root(),outfile,None,secondhand,cfgfiledict,mymtime)
4490
		
4492
		
4491
		#restore umask
4493
		#restore umask
4492
		os.umask(prevmask)
4494
		os.umask(prevmask)
Lines 4514-4524 Link Here
4514
			del cfgfiledict["IGNORE"]
4516
			del cfgfiledict["IGNORE"]
4515
4517
4516
		# XXXX: HACK! PathSpec is very necessary here.
4518
		# XXXX: HACK! PathSpec is very necessary here.
4517
		if not os.path.exists(destroot+PRIVATE_PATH):
4519
		if not os.path.exists(destroot(PRIVATE_PATH)):
4518
			os.makedirs(destroot+PRIVATE_PATH)
4520
			os.makedirs(destroot(PRIVATE_PATH))
4519
			os.chown(destroot+PRIVATE_PATH,os.getuid(),portage_gid)
4521
			os.chown(destroot(PRIVATE_PATH),os.getuid(),portage_gid)
4520
			os.chmod(destroot+PRIVATE_PATH,02770)
4522
			os.chmod(destroot(PRIVATE_PATH),02770)
4521
			dirlist = prefix_array(listdir(destroot+PRIVATE_PATH),destroot+PRIVATE_PATH+"/")
4523
			dirlist = prefix_array(listdir(destroot(PRIVATE_PATH)),destroot(PRIVATE_PATH+"/"))
4522
			while dirlist:
4524
			while dirlist:
4523
				dirlist.sort()
4525
				dirlist.sort()
4524
				dirlist.reverse() # Gets them in file-before basedir order
4526
				dirlist.reverse() # Gets them in file-before basedir order
Lines 4526-4535 Link Here
4526
				if os.path.isdir(x):
4528
				if os.path.isdir(x):
4527
					dirlist += prefix_array(listdir(x),x+"/")
4529
					dirlist += prefix_array(listdir(x),x+"/")
4528
					continue
4530
					continue
4529
				os.unlink(destroot+PRIVATE_PATH+"/"+x)
4531
				os.unlink(destroot(PRIVATE_PATH+"/"+x))
4530
4532
4531
		mylock = portage_locks.lockfile(destroot+CONFIG_MEMORY_FILE)
4533
		mylock = portage_locks.lockfile(destroot(CONFIG_MEMORY_FILE))
4532
		writedict(cfgfiledict,destroot+CONFIG_MEMORY_FILE)
4534
		writedict(cfgfiledict,destroot(CONFIG_MEMORY_FILE))
4533
		portage_locks.unlockfile(mylock)
4535
		portage_locks.unlockfile(mylock)
4534
		
4536
		
4535
		#do postinst script
4537
		#do postinst script
Lines 4970-5023 Link Here
4970
	cleanup_pkgmerge(mypkg,origdir)
4972
	cleanup_pkgmerge(mypkg,origdir)
4971
	return returnme
4973
	return returnme
4972
4974
4975
# for pym's not yet using portage.ROOT
4976
root = ROOT
4973
4977
4974
if os.environ.has_key("ROOT"):
4978
def check_root(root=MYROOT):
4975
	root=os.environ["ROOT"]
4979
	mroot = root()
4976
	if not len(root):
4980
	if mroot != "/":
4977
		root="/"
4981
		if not os.path.exists(mroot[:-1]):
4978
	elif root[-1]!="/":
4982
			writemsg("!!! Error: ROOT "+mroot+" does not exist.  Please correct this.\n")
4979
		root=root+"/"
4983
			writemsg("!!! Exiting.\n\n")
4980
else:
4984
			sys.exit(1)
4981
	root="/"
4985
		elif not os.path.isdir(mroot[:-1]):
4982
if root != "/":
4986
			writemsg("!!! Error: ROOT "+mroot[:-1]+" is not a directory. Please correct this.\n")
4983
	if not os.path.exists(root[:-1]):
4987
			writemsg("!!! Exiting.\n\n")
4984
		writemsg("!!! Error: ROOT "+root+" does not exist.  Please correct this.\n")
4988
			sys.exit(1)
4985
		writemsg("!!! Exiting.\n\n")
4989
4986
		sys.exit(1)
4990
	#create tmp and var/tmp if they don't exist; read config
4987
	elif not os.path.isdir(root[:-1]):
4991
	checkdirs={ "tmp": 01777
4988
		writemsg("!!! Error: ROOT "+root[:-1]+" is not a directory. Please correct this.\n")
4992
			  , "var": 0755
4989
		writemsg("!!! Exiting.\n\n")
4993
			  , "var/tmp": 01777
4990
		sys.exit(1)
4994
			  , "var/log": 0755
4991
4995
			  , "var/lib": 0755
4992
#create tmp and var/tmp if they don't exist; read config
4996
			  , "var/lib/portage": 0755
4993
os.umask(0)
4997
			  }
4994
if not os.path.exists(root+"tmp"):
4998
	os.umask(0)
4995
	writemsg(">>> "+root+"tmp doesn't exist, creating it...\n")
4999
	# hash array does not keep ordering, so list explicit
4996
	os.mkdir(root+"tmp",01777)
5000
	for d in ["tmp","var","var/tmp","var/log","var/lib","var/lib/portage"]:
4997
if not os.path.exists(root+"var/tmp"):
5001
		dir=os.path.join(mroot,d)
4998
	writemsg(">>> "+root+"var/tmp doesn't exist, creating it...\n")
5002
		if not os.path.exists(dir):
4999
	try:
5003
			writemsg(">>> "+dir+" doesn't exist, creating it...\n")
5000
		os.mkdir(root+"var",0755)
5004
			try:
5001
	except (OSError,IOError):
5005
				os.mkdir(dir, checkdirs[d])
5002
		pass
5006
			except SystemExit, e:
5003
	try:
5007
				raise
5004
		os.mkdir(root+"var/tmp",01777)
5008
			except:
5005
	except SystemExit, e:
5009
				writemsg("portage: could not create "+dir+"; exiting.\n")
5006
		raise
5010
				sys.exit(1)
5007
	except:
5011
		elif not os.path.isdir(dir):
5008
		writemsg("portage: couldn't create /var/tmp; exiting.\n")
5012
			writemsg("portage: "+dir+" is not a directory; exiting.\n")
5009
		sys.exit(1)
5013
			sys.exit(1)
5010
5014
5015
check_root(ROOT)
5011
5016
5012
#####################################
5017
#####################################
5013
# Deprecation Checks
5018
# Deprecation Checks
5014
5019
5015
os.umask(022)
5020
os.umask(022)
5016
profiledir=None
5021
profiledir=None
5017
if os.path.isdir(PROFILE_PATH):
5022
if os.path.isdir(MYROOT(PROFILE_PATH)):
5018
	profiledir = PROFILE_PATH
5023
	profiledir = MYROOT(PROFILE_PATH)
5019
	if os.access(DEPRECATED_PROFILE_FILE, os.R_OK):
5024
	if os.access(MYROOT(DEPRECATED_PROFILE_FILE), os.R_OK):
5020
		deprecatedfile = open(DEPRECATED_PROFILE_FILE, "r")
5025
		deprecatedfile = open(MYROOT(DEPRECATED_PROFILE_FILE), "r")
5021
		dcontent = deprecatedfile.readlines()
5026
		dcontent = deprecatedfile.readlines()
5022
		deprecatedfile.close()
5027
		deprecatedfile.close()
5023
		newprofile = dcontent[0]
5028
		newprofile = dcontent[0]
Lines 5030-5038 Link Here
5030
				writemsg(myline)
5035
				writemsg(myline)
5031
			writemsg("\n\n")
5036
			writemsg("\n\n")
5032
5037
5033
if os.path.exists(USER_VIRTUALS_FILE):
5038
if os.path.exists(MYROOT(USER_VIRTUALS_FILE)):
5034
	writemsg(red("\n!!! /etc/portage/virtuals is deprecated in favor of\n"))
5039
	writemsg(red("\n!!! "+MYROOT(USER_VIRTUALS_FILE)+" is deprecated in favor of\n"))
5035
	writemsg(red("!!! /etc/portage/profile/virtuals. Please move it to\n"))
5040
	writemsg(red("!!! "+MYROOT(CUSTOM_PROFILE_PATH+"/virtuals")+". Please move it to\n"))
5036
	writemsg(red("!!! this new location.\n\n"))
5041
	writemsg(red("!!! this new location.\n\n"))
5037
5042
5038
#
5043
#
Lines 5045-5051 Link Here
5045
# -----------------------------------------------------------------------------
5050
# -----------------------------------------------------------------------------
5046
# We're going to lock the global config to prevent changes, but we need
5051
# We're going to lock the global config to prevent changes, but we need
5047
# to ensure the global settings are right.
5052
# to ensure the global settings are right.
5048
settings=config(config_profile_path=PROFILE_PATH,config_incrementals=portage_const.INCREMENTALS)
5053
settings=config(config_profile_path=MYROOT(PROFILE_PATH),config_incrementals=portage_const.INCREMENTALS)
5049
5054
5050
# useful info
5055
# useful info
5051
settings["PORTAGE_MASTER_PID"]=str(os.getpid())
5056
settings["PORTAGE_MASTER_PID"]=str(os.getpid())
Lines 5053-5059 Link Here
5053
5058
5054
def do_vartree(mysettings):
5059
def do_vartree(mysettings):
5055
	global virts, virts_p, db
5060
	global virts, virts_p, db
5056
	virts=mysettings.getvirtuals("/")
5061
	virts=mysettings.getvirtuals(MYROOT)
5057
	virts_p={}
5062
	virts_p={}
5058
5063
5059
	if virts:
5064
	if virts:
Lines 5062-5074 Link Here
5062
			vkeysplit=x.split("/")
5067
			vkeysplit=x.split("/")
5063
			if not virts_p.has_key(vkeysplit[1]):
5068
			if not virts_p.has_key(vkeysplit[1]):
5064
				virts_p[vkeysplit[1]]=virts[x]
5069
				virts_p[vkeysplit[1]]=virts[x]
5065
	db["/"]={
5070
	db[MYROOT()]={
5066
		"virtuals":virts,
5071
		"virtuals":virts,
5067
		"vartree":vartree("/",virts),
5072
		"vartree":vartree(MYROOT,virts),
5068
		}
5073
		}
5069
	if root!="/":
5074
	if ROOT()!=MYROOT():
5070
		virts=mysettings.getvirtuals(root)
5075
		virts=mysettings.getvirtuals(root)
5071
		db[root]={
5076
		db[root()]={
5072
			"virtuals":virts,
5077
			"virtuals":virts,
5073
			"vartree":vartree(root,virts)}
5078
			"vartree":vartree(root,virts)}
5074
	#We need to create the vartree first, then load our settings, and then set up our other trees
5079
	#We need to create the vartree first, then load our settings, and then set up our other trees
Lines 5105-5113 Link Here
5105
else:
5110
else:
5106
	selinux_enabled=0
5111
	selinux_enabled=0
5107
5112
5108
cachedirs=[CACHE_PATH]
5113
cachedirs=[MYROOT(CACHE_PATH)]
5109
if root!="/":
5114
if ROOT()!=MYROOT():
5110
	cachedirs.append(root+CACHE_PATH)
5115
	cachedirs.append(root(CACHE_PATH))
5111
if not os.environ.has_key("SANDBOX_ACTIVE"):
5116
if not os.environ.has_key("SANDBOX_ACTIVE"):
5112
	for cachedir in cachedirs:
5117
	for cachedir in cachedirs:
5113
		if not os.path.exists(cachedir):
5118
		if not os.path.exists(cachedir):
Lines 5146-5152 Link Here
5146
"version", "starttime",
5151
"version", "starttime",
5147
"resume", "ldpath"
5152
"resume", "ldpath"
5148
]
5153
]
5149
mtimedbfile=root+"var/cache/edb/mtimedb"
5154
mtimedbfile=root(CACHE_PATH+"/mtimedb")
5150
try:
5155
try:
5151
	mypickle=cPickle.Unpickler(open(mtimedbfile))
5156
	mypickle=cPickle.Unpickler(open(mtimedbfile))
5152
	mypickle.find_global=None
5157
	mypickle.find_global=None
Lines 5176-5182 Link Here
5176
	writemsg("\n\n")
5181
	writemsg("\n\n")
5177
	writemsg(green("Performing Global Updates: ")+bold(mykey)+"\n")
5182
	writemsg(green("Performing Global Updates: ")+bold(mykey)+"\n")
5178
	writemsg("(Could take a couple of minutes if you have a lot of binary packages.)\n")
5183
	writemsg("(Could take a couple of minutes if you have a lot of binary packages.)\n")
5179
	writemsg("  "+bold(".")+"='update pass'  "+bold("*")+"='binary update'  "+bold("@")+"='/var/db move'\n"+"  "+bold("s")+"='/var/db SLOT move' "+bold("S")+"='binary SLOT move' "+bold("p")+"='update /etc/portage/package.*'\n")
5184
	writemsg("  "+bold(".")+"='update pass'  "+bold("*")+"='binary update'  "+bold("@")+"='/var/db move'\n"+"  "+bold("s")+"='/var/db SLOT move' "+bold("S")+"='binary SLOT move' "+bold("p")+"='update "+MYROOT(USER_CONFIG_PATH)+"/package.*'\n")
5180
	processed=1
5185
	processed=1
5181
	#remove stale virtual entries (mappings for packages that no longer exist)
5186
	#remove stale virtual entries (mappings for packages that no longer exist)
5182
	
5187
	
Lines 5186-5192 Link Here
5186
	myxfiles = myxfiles + prefix_array(myxfiles, "profile/")
5191
	myxfiles = myxfiles + prefix_array(myxfiles, "profile/")
5187
	for x in myxfiles:
5192
	for x in myxfiles:
5188
		try:
5193
		try:
5189
			myfile = open("/etc/portage/"+x,"r")
5194
			myfile = open(MYROOT("etc/portage/"+x),"r")
5190
			file_contents[x] = myfile.readlines()
5195
			file_contents[x] = myfile.readlines()
5191
			myfile.close()
5196
			myfile.close()
5192
		except IOError:
5197
		except IOError:
Lines 5194-5202 Link Here
5194
				del file_contents[x]
5199
				del file_contents[x]
5195
			continue
5200
			continue
5196
5201
5197
	worldlist=grabfile("/"+WORLD_FILE)
5202
	worldlist=grabfile(MYROOT(WORLD_FILE))
5198
	myupd=grabfile(mykey)
5203
	myupd=grabfile(mykey)
5199
	db["/"]["bintree"]=binarytree("/",settings["PKGDIR"],virts)
5204
	db[MYROOT()]["bintree"]=binarytree(MYROOT,settings["PKGDIR"],virts)
5200
	for myline in myupd:
5205
	for myline in myupd:
5201
		mysplit=myline.split()
5206
		mysplit=myline.split()
5202
		if not len(mysplit):
5207
		if not len(mysplit):
Lines 5217-5224 Link Here
5217
		sys.stdout.flush()
5222
		sys.stdout.flush()
5218
5223
5219
		if mysplit[0]=="move":
5224
		if mysplit[0]=="move":
5220
			db["/"]["vartree"].dbapi.move_ent(mysplit)
5225
			db[MYROOT()]["vartree"].dbapi.move_ent(mysplit)
5221
			db["/"]["bintree"].move_ent(mysplit)
5226
			db[MYROOT()]["bintree"].move_ent(mysplit)
5222
			#update world entries:
5227
			#update world entries:
5223
			for x in range(0,len(worldlist)):
5228
			for x in range(0,len(worldlist)):
5224
				#update world entries, if any.
5229
				#update world entries, if any.
Lines 5238-5252 Link Here
5238
						sys.stdout.flush()
5243
						sys.stdout.flush()
5239
5244
5240
		elif mysplit[0]=="slotmove":
5245
		elif mysplit[0]=="slotmove":
5241
			db["/"]["vartree"].dbapi.move_slot_ent(mysplit)
5246
			db[MYROOT()]["vartree"].dbapi.move_slot_ent(mysplit)
5242
			db["/"]["bintree"].move_slot_ent(mysplit,settings["PORTAGE_TMPDIR"]+"/tbz2")
5247
			db[MYROOT()]["bintree"].move_slot_ent(mysplit,settings["PORTAGE_TMPDIR"]+"/tbz2")
5243
5248
5244
	for x in update_files:
5249
	for x in update_files:
5245
		mydblink = dblink('','','/',settings)
5250
		mydblink = dblink('','','/',settings)
5246
		if mydblink.isprotected("/etc/portage/"+x):
5251
		if mydblink.isprotected(MYROOT("etc/portage/"+x)):
5247
			updating_file=new_protect_filename("/etc/portage/"+x)[0]
5252
			updating_file=new_protect_filename(MYROOT("etc/portage/"+x))[0]
5248
		else:
5253
		else:
5249
			updating_file="/etc/portage/"+x
5254
			updating_file=MYROOT("etc/portage/"+x)
5250
		try:
5255
		try:
5251
			myfile=open(updating_file,"w")
5256
			myfile=open(updating_file,"w")
5252
			myfile.writelines(file_contents[x])
5257
			myfile.writelines(file_contents[x])
Lines 5257-5270 Link Here
5257
	# We gotta do the brute force updates for these now.
5262
	# We gotta do the brute force updates for these now.
5258
	if (settings["PORTAGE_CALLER"] in ["fixpackages"]) or \
5263
	if (settings["PORTAGE_CALLER"] in ["fixpackages"]) or \
5259
	   ("fixpackages" in features):
5264
	   ("fixpackages" in features):
5260
		db["/"]["bintree"].update_ents(myupd,settings["PORTAGE_TMPDIR"]+"/tbz2")
5265
		db[MYROOT()]["bintree"].update_ents(myupd,settings["PORTAGE_TMPDIR"]+"/tbz2")
5261
	else:
5266
	else:
5262
		do_upgrade_packagesmessage = 1
5267
		do_upgrade_packagesmessage = 1
5263
	
5268
	
5264
	if processed:
5269
	if processed:
5265
		#update our internal mtime since we processed all our directives.
5270
		#update our internal mtime since we processed all our directives.
5266
		mtimedb["updates"][mykey]=os.stat(mykey)[stat.ST_MTIME]
5271
		mtimedb["updates"][mykey]=os.stat(mykey)[stat.ST_MTIME]
5267
	myworld=open("/"+WORLD_FILE,"w")
5272
	myworld=open(MYROOT(WORLD_FILE),"w")
5268
	for x in worldlist:
5273
	for x in worldlist:
5269
		myworld.write(x+"\n")
5274
		myworld.write(x+"\n")
5270
	myworld.close()
5275
	myworld.close()
Lines 5378-5396 Link Here
5378
5383
5379
5384
5380
#continue setting up other trees
5385
#continue setting up other trees
5381
db["/"]["porttree"]=portagetree("/",virts)
5386
db[MYROOT()]["porttree"]=portagetree(MYROOT,virts)
5382
db["/"]["bintree"]=binarytree("/",settings["PKGDIR"],virts)
5387
db[MYROOT()]["bintree"]=binarytree(MYROOT,settings["PKGDIR"],virts)
5383
if root!="/":
5388
if ROOT()!=MYROOT():
5384
	db[root]["porttree"]=portagetree(root,virts)
5389
	db[root()]["porttree"]=portagetree(root,virts)
5385
	db[root]["bintree"]=binarytree(root,settings["PKGDIR"],virts)
5390
	db[root()]["bintree"]=binarytree(root,settings["PKGDIR"],virts)
5386
thirdpartymirrors=grabdict(settings["PORTDIR"]+"/profiles/thirdpartymirrors")
5391
thirdpartymirrors=grabdict(settings["PORTDIR"]+"/profiles/thirdpartymirrors")
5387
5392
5388
if not os.path.exists(settings["PORTAGE_TMPDIR"]):
5393
if not os.path.exists(settings["PORTAGE_TMPDIR"]):
5389
	writemsg("portage: the directory specified in your PORTAGE_TMPDIR variable, \""+settings["PORTAGE_TMPDIR"]+",\"\n")
5394
	writemsg("portage: the directory specified in your PORTAGE_TMPDIR variable, \""+settings["PORTAGE_TMPDIR"]+"\",\n")
5390
	writemsg("does not exist.  Please create this directory or correct your PORTAGE_TMPDIR setting.\n")
5395
	writemsg("does not exist.  Please create this directory or correct your PORTAGE_TMPDIR setting.\n")
5391
	sys.exit(1)
5396
	sys.exit(1)
5392
if not os.path.isdir(settings["PORTAGE_TMPDIR"]):
5397
if not os.path.isdir(settings["PORTAGE_TMPDIR"]):
5393
	writemsg("portage: the directory specified in your PORTAGE_TMPDIR variable, \""+settings["PORTAGE_TMPDIR"]+",\"\n")
5398
	writemsg("portage: the directory specified in your PORTAGE_TMPDIR variable, \""+settings["PORTAGE_TMPDIR"]+"\",\n")
5394
	writemsg("is not a directory.  Please correct your PORTAGE_TMPDIR setting.\n")
5399
	writemsg("is not a directory.  Please correct your PORTAGE_TMPDIR setting.\n")
5395
	sys.exit(1)
5400
	sys.exit(1)
5396
5401
Lines 5453-5460 Link Here
5453
		return fetcher
5458
		return fetcher
5454
	return transports.bundled_lib.BundledConnection()
5459
	return transports.bundled_lib.BundledConnection()
5455
5460
5456
if not os.path.islink(PROFILE_PATH) and os.path.exists(settings["PORTDIR"]+"/profiles"):
5461
if not os.path.islink(MYROOT(PROFILE_PATH)) and os.path.exists(settings["PORTDIR"]+"/profiles"):
5457
	writemsg(red("\a\n\n!!! "+PROFILE_PATH+" is not a symlink and will probably prevent most merges.\n"))
5462
	writemsg(red("\a\n\n!!! "+MYROOT(PROFILE_PATH)+" is not a symlink and will probably prevent most merges.\n"))
5458
	writemsg(red("!!! It should point into a profile within %s/profiles/\n" % settings["PORTDIR"]))
5463
	writemsg(red("!!! It should point into a profile within %s/profiles/\n" % settings["PORTDIR"]))
5459
	writemsg(red("!!! (You can safely ignore this message when syncing. It's harmless.)\n\n\n"))
5464
	writemsg(red("!!! (You can safely ignore this message when syncing. It's harmless.)\n\n\n"))
5460
	time.sleep(3)
5465
	time.sleep(3)
(-)portage-cvs/pym/portage_checksum.py (-2 / +2 lines)
Lines 4-16 Link Here
4
# $Header$
4
# $Header$
5
cvs_id_string="$Id$"[5:-2]
5
cvs_id_string="$Id$"[5:-2]
6
6
7
from portage_const import PRIVATE_PATH,PRELINK_BINARY
8
import os
7
import os
9
import shutil
8
import shutil
10
import stat
9
import stat
11
import portage_exec
10
import portage_exec
12
import portage_util
11
import portage_util
13
import portage_locks
12
import portage_locks
13
from portage_const import MYROOT,PRIVATE_PATH,PRELINK_BINARY
14
import sha
14
import sha
15
15
16
prelink_capable = False
16
prelink_capable = False
Lines 103-109 Link Here
103
103
104
def perform_checksum(filename, hash_function=md5hash, calc_prelink=0):
104
def perform_checksum(filename, hash_function=md5hash, calc_prelink=0):
105
	myfilename      = filename[:]
105
	myfilename      = filename[:]
106
	prelink_tmpfile = PRIVATE_PATH+"/prelink-checksum.tmp."+str(os.getpid())
106
	prelink_tmpfile = MYROOT(PRIVATE_PATH+"/prelink-checksum.tmp."+str(os.getpid()))
107
	mylock          = None
107
	mylock          = None
108
	
108
	
109
	if calc_prelink and prelink_capable:
109
	if calc_prelink and prelink_capable:
(-)portage-cvs/pym/portage_const.py (-16 / +78 lines)
Lines 4-52 Link Here
4
# $Header$
4
# $Header$
5
cvs_id_string="$Id$"[5:-2]
5
cvs_id_string="$Id$"[5:-2]
6
6
7
import os,sys
8
7
# ===========================================================================
9
# ===========================================================================
8
# START OF CONSTANTS -- START OF CONSTANTS -- START OF CONSTANTS -- START OF
10
# START OF CONSTANTS -- START OF CONSTANTS -- START OF CONSTANTS -- START OF
9
# ===========================================================================
11
# ===========================================================================
10
12
13
root_instances_ = {}
14
15
class Root:
16
	def __init__(self, root, affix, prefix):
17
		self.root_ = root
18
		self.iroot_ = affix
19
		self.prefix_ = prefix
20
		self.dir_ = root+affix
21
		root_instances_[self.dir_] = self
22
	def root(self, path=""):
23
		return self.root_ + path
24
	def affix(self, path = ""):
25
		return self.iroot_ + path
26
	def prefix(self, path = ""):
27
		return self.prefix_ + path
28
	def dir(self, path = ""):
29
		return self.dir_ + path
30
	def __str__(self, path = ""):
31
		return self.dir_
32
	def __call__(self, path = ""):
33
		return self.dir_ + path
34
35
def find_root_instance(name):
36
	return root_instances_[name]
37
38
def _make_root():
39
	if os.environ.has_key("ROOT"):
40
		root=os.environ["ROOT"]
41
		if not len(root):
42
			root="/"
43
		elif root[-1]!="/":
44
			root=root+"/"
45
	else:
46
		root="/"
47
48
	if os.environ.has_key("PREFIX"):
49
		prefix=os.environ["PREFIX"]
50
		if len(prefix) and prefix[0] != "/":
51
			prefix = "/"+prefix
52
		# enforce prefix not to end with '/' and not to be just '/'
53
		while len(prefix) and prefix[-1] == "/":
54
			prefix = prefix[:-1]
55
		if not len(prefix):
56
			prefix = "@prefix@"
57
	else:
58
		prefix="@prefix@"
59
60
	# according to FHS:
61
	# when installing with prefix /usr, '/'+affix is '/'
62
	# when installing with prefix /usr/local, '/'+affix is '/usr/local'
63
	if prefix == '/usr':
64
		affix = ''
65
	else:
66
		affix = prefix[1:]+'/'
67
68
	return Root(root, affix, prefix)
69
70
MYROOT = Root("/", "@affix@", "@prefix@")
71
ROOT = _make_root()
72
11
VDB_PATH                = "var/db/pkg"
73
VDB_PATH                = "var/db/pkg"
12
PRIVATE_PATH            = "/var/lib/portage"
74
PRIVATE_PATH            = "var/lib/portage"
13
CACHE_PATH              = "/var/cache/edb"
75
CACHE_PATH              = "var/cache/edb"
14
DEPCACHE_PATH           = CACHE_PATH+"/dep"
76
DEPCACHE_PATH           = CACHE_PATH+"/dep"
15
77
16
USER_CONFIG_PATH        = "/etc/portage"
78
USER_CONFIG_PATH        = "etc/portage"
17
MODULES_FILE_PATH       = USER_CONFIG_PATH+"/modules"
79
MODULES_FILE_PATH       = USER_CONFIG_PATH+"/modules"
18
CUSTOM_PROFILE_PATH     = USER_CONFIG_PATH+"/profile"
80
CUSTOM_PROFILE_PATH     = USER_CONFIG_PATH+"/profile"
19
81
20
PORTAGE_BASE_PATH       = "/usr/lib/portage"
82
PORTAGE_BASE_PATH       = "@PORTAGE_BASE@"
21
PORTAGE_BIN_PATH        = PORTAGE_BASE_PATH+"/bin"
83
PORTAGE_BIN_PATH        = PORTAGE_BASE_PATH+"/bin"
22
PORTAGE_PYM_PATH        = PORTAGE_BASE_PATH+"/pym"
84
PORTAGE_PYM_PATH        = PORTAGE_BASE_PATH+"/pym"
23
PROFILE_PATH            = "/etc/make.profile"
85
PROFILE_PATH            = "etc/make.profile"
24
LOCALE_DATA_PATH        = PORTAGE_BASE_PATH+"/locale"
86
LOCALE_DATA_PATH        = PORTAGE_BASE_PATH+"/locale"
25
87
26
EBUILD_SH_BINARY        = PORTAGE_BIN_PATH+"/ebuild.sh"
88
EBUILD_SH_BINARY        = PORTAGE_BIN_PATH+"/ebuild.sh"
27
EBUILD_DAEMON_PATH      = PORTAGE_BIN_PATH+"/ebuild-daemon.sh"
89
EBUILD_DAEMON_PATH      = PORTAGE_BIN_PATH+"/ebuild-daemon.sh"
28
90
29
SANDBOX_BINARY          = "/usr/bin/sandbox"
91
SANDBOX_BINARY          = "@SANDBOX@"
30
# XXX compatibility hack.  this shouldn't ever hit a stable release.
92
# XXX compatibility hack.  this shouldn't ever hit a stable release.
31
import os
93
import os
32
if not os.path.exists(SANDBOX_BINARY):
94
if not os.path.exists(SANDBOX_BINARY):
33
	if os.path.exists(PORTAGE_BIN_PATH+"/sandbox"):
95
	if os.path.exists(PORTAGE_BIN_PATH+"/sandbox"):
34
		SANDBOX_BINARY=PORTAGE_BIN_PATH+"/sandbox"
96
		SANDBOX_BINARY=PORTAGE_BIN_PATH+"/sandbox"
35
97
36
DEPSCAN_SH_BINARY       = "/sbin/depscan.sh"
98
DEPSCAN_SH_BINARY       = "sbin/depscan.sh"
37
BASH_BINARY             = "/bin/bash"
99
BASH_BINARY             = "@BASH@"
38
MOVE_BINARY             = "/bin/mv"
100
MOVE_BINARY             = "@MV@"
39
PRELINK_BINARY          = "/usr/sbin/prelink"
101
PRELINK_BINARY          = "@PRELINK@"
40
102
41
WORLD_FILE              = PRIVATE_PATH+"/world"
103
WORLD_FILE              = PRIVATE_PATH+"/world"
42
MAKE_CONF_FILE          = "/etc/make.conf"
104
MAKE_CONF_FILE          = "etc/make.conf"
43
MAKE_DEFAULTS_FILE      = PROFILE_PATH + "/make.defaults"
105
MAKE_DEFAULTS_FILE      = PROFILE_PATH + "/make.defaults"
44
DEPRECATED_PROFILE_FILE = PROFILE_PATH+"/deprecated"
106
DEPRECATED_PROFILE_FILE = PROFILE_PATH+"/deprecated"
45
USER_VIRTUALS_FILE      = USER_CONFIG_PATH+"/virtuals"
107
USER_VIRTUALS_FILE      = USER_CONFIG_PATH+"/virtuals"
46
EBUILD_SH_ENV_FILE      = USER_CONFIG_PATH+"/bashrc"
108
EBUILD_SH_ENV_FILE      = USER_CONFIG_PATH+"/bashrc"
47
INVALID_ENV_FILE        = "/etc/spork/is/not/valid/profile.env"
109
INVALID_ENV_FILE        = "etc/spork/is/not/valid/profile.env"
48
CUSTOM_MIRRORS_FILE     = USER_CONFIG_PATH+"/mirrors"
110
CUSTOM_MIRRORS_FILE     = USER_CONFIG_PATH+"/mirrors"
49
SANDBOX_PIDS_FILE       = "/tmp/sandboxpids.tmp"
111
SANDBOX_PIDS_FILE       = "tmp/sandboxpids.tmp"
50
CONFIG_MEMORY_FILE      = PRIVATE_PATH + "/config"
112
CONFIG_MEMORY_FILE      = PRIVATE_PATH + "/config"
51
113
52
INCREMENTALS=["USE","FEATURES","ACCEPT_KEYWORDS","ACCEPT_LICENSE","CONFIG_PROTECT_MASK","CONFIG_PROTECT","PRELINK_PATH","PRELINK_PATH_MASK"]
114
INCREMENTALS=["USE","FEATURES","ACCEPT_KEYWORDS","ACCEPT_LICENSE","CONFIG_PROTECT_MASK","CONFIG_PROTECT","PRELINK_PATH","PRELINK_PATH_MASK"]
Lines 56-66 Link Here
56
CONFCACHE_LIST          = CACHE_PATH+"/confcache_files.anydbm"
118
CONFCACHE_LIST          = CACHE_PATH+"/confcache_files.anydbm"
57
119
58
LIBFAKEROOT_PATH        = "/usr/lib/libfakeroot.so"
120
LIBFAKEROOT_PATH        = "/usr/lib/libfakeroot.so"
59
FAKEROOT_PATH           = "/usr/bin/fakeroot"
121
FAKEROOT_PATH           = "@FAKEROOT@"
60
122
61
RSYNC_BIN               = "/usr/bin/rsync"
123
RSYNC_BIN               = "@RSYNC@"
62
RSYNC_HOST              = "rsync.gentoo.org/gentoo-portage"
124
RSYNC_HOST              = "rsync.gentoo.org/gentoo-portage"
63
125
64
CVS_BIN                 = "/usr/bin/cvs"
126
CVS_BIN                 = "@CVS@"
65
127
66
EBUILD_PHASES			= "setup unpack compile test install preinst postinst prerm postrm"
128
EBUILD_PHASES			= "setup unpack compile test install preinst postinst prerm postrm"
(-)portage-cvs/pym/portage_contents.py (-6 / +7 lines)
Lines 7-12 Link Here
7
import os,string,types,sys,copy
7
import os,string,types,sys,copy
8
import portage_exception
8
import portage_exception
9
import portage_const
9
import portage_const
10
from portage_const import MYROOT
10
11
11
#import gettext
12
#import gettext
12
#gettext_t = gettext.translation('portage.contents', portage_const.LOCALE_DATA_PATH)
13
#gettext_t = gettext.translation('portage.contents', portage_const.LOCALE_DATA_PATH)
Lines 150-161 Link Here
150
def test():
151
def test():
151
	import os
152
	import os
152
	plt = PathLookupTable("spork")
153
	plt = PathLookupTable("spork")
153
	for x in os.listdir("/var/db/pkg"):
154
	for x in os.listdir(MYROOT(VDB_PATH)):
154
		for y in os.listdir("/var/db/pkg/"+x):
155
		for y in os.listdir(MYROOT(VDB_PATH+"/"+x)):
155
			c_path = "/var/db/pkg/"+x+"/"+y+"/CONTENTS"
156
			c_path = MYROOT(VDB_PATH+"/"+x+"/"+y+"/CONTENTS")
156
			if os.path.exists(c_path):
157
			if os.path.exists(c_path):
157
				plt.addFromFile(c_path, ContentsHandler)
158
				plt.addFromFile(c_path, ContentsHandler)
158
	print "/bin/bash:",    plt.whoProvides("/bin/bash")
159
	print "@BASH@:",    plt.whoProvides("@BASH@")
159
	print "/var/spool:",   plt.whoProvides("/var/spool")
160
	print MYROOT("var/spool")+":",   plt.whoProvides(MYROOT("var/spool"))
160
	print "/etc/init.d",   plt.whoProvides("/etc/init.d")
161
	print MYROOT("etc/init.d")+":",   plt.whoProvides(MYROOT("etc/init.d"))
161
	return plt
162
	return plt
(-)portage-cvs/pym/portage_data.py (-20 / +56 lines)
Lines 4-10 Link Here
4
# $Header$
4
# $Header$
5
cvs_id_string="$Id$"[5:-2]
5
cvs_id_string="$Id$"[5:-2]
6
6
7
import os,pwd,grp
7
import os,pwd,grp,sys
8
from portage_util import writemsg
8
from portage_util import writemsg
9
from output import green,red
9
from output import green,red
10
10
Lines 19-24 Link Here
19
		lchown=os.chown
19
		lchown=os.chown
20
	userland="BSD"
20
	userland="BSD"
21
	os.environ["XARGS"]="xargs"	
21
	os.environ["XARGS"]="xargs"	
22
elif ostype in ["SunOS"]:
23
	userland="UNIX"
24
	os.environ["XARGS"]="xargs"
22
else:
25
else:
23
	writemsg(red("Operating system")+" \""+ostype+"\" "+red("currently unsupported. Exiting.")+"\n")
26
	writemsg(red("Operating system")+" \""+ostype+"\" "+red("currently unsupported. Exiting.")+"\n")
24
	sys.exit(1)
27
	sys.exit(1)
Lines 41-84 Link Here
41
uid=os.getuid()
44
uid=os.getuid()
42
wheelgid=0
45
wheelgid=0
43
46
44
if uid==0:
47
portage_rootuser = "@rootuser@"
48
49
if portage_rootuser == "root":
50
	rootuid = 0
51
else:
52
	try:
53
		rootuid = pwd.getpwnam(portage_rootuser)[2]
54
	except KeyError:
55
		writemsg("portage initialization: your system doesn't have a user "+portage_rootuser+".\n")
56
		writemsg("Will let do only user 'root' the root-action.\n")
57
		rootuid=0
58
		portage_rootuser = "root"
59
60
if "/@affix@" != "/":
61
	portage_wheelgroup="@wheelgroup@"
62
	default_wheelgid_str='unknown'
63
elif userland in ["GNU", "BSD"]:
64
	portage_wheelgroup='wheel'
65
	default_wheelgid_str='10'
66
elif userland in ["UNIX"]:
67
	portage_wheelgroup='bin'
68
	default_wheelgid_str='2'
69
70
if uid==0 or uid==rootuid:
45
	secpass=2
71
	secpass=2
46
try:
72
try:
47
	wheelgid=grp.getgrnam("wheel")[2]
73
	wheelgid=grp.getgrnam(portage_wheelgroup)[2]
48
	if (not secpass) and (wheelgid in os.getgroups()):
74
	if (not secpass) and (wheelgid in os.getgroups()):
49
		secpass=1
75
		secpass=1
50
except KeyError:
76
except KeyError:
51
	writemsg("portage initialization: your system doesn't have a 'wheel' group.\n")
77
	writemsg("portage initialization: your system doesn't have a '"+portage_wheelgroup+"' group.\n")
52
	writemsg("Please fix this as it is a normal system requirement. 'wheel' is GID 10\n")
78
	writemsg("Please fix this as it is a normal system requirement.")
53
	writemsg("'emerge baselayout' and an 'etc-update' should remedy this problem.\n")
79
	if "/@affix@" == "/":
80
		writemsg(" '"+portage_wheelgroup+"' GID is "+default_wheelgid_str+"\n")
81
		writemsg("'emerge baselayout' and an 'etc-update' should remedy this problem.\n")
54
	pass
82
	pass
55
83
56
#Discover the uid and gid of the portage user/group
84
#Discover the uid and gid of the portage user/group
85
portage_user = "@portageuser@"
86
portage_group = "@portagegroup@"
87
57
try:
88
try:
58
	portage_uid=pwd.getpwnam("portage")[2]
89
	portage_uid=pwd.getpwnam(portage_user)[2]
59
	portage_gid=grp.getgrnam("portage")[2]
90
	portage_gid=grp.getgrnam(portage_group)[2]
60
	if (secpass==0):
91
	if (secpass==0):
61
		secpass=1
92
		secpass=1
62
except KeyError:
93
except KeyError:
63
	portage_uid=0
94
	portage_uid=0
64
	portage_gid=wheelgid
95
	portage_gid=wheelgid
65
	writemsg("\n")
96
	writemsg("\n")
66
	writemsg(  red("portage: 'portage' user or group missing. Please update baselayout\n"))
97
	writemsg(  red("portage: '"+portage_user+"' user or '"+portage_group+"' group missing."))
67
	writemsg(  red("         and merge portage user(250) and group(250) into your passwd\n"))
98
	if (portage_user == "portage" 
68
	writemsg(  red("         and group files. Non-root compilation is disabled until then.\n"))
99
	and portage_group == "portage"
69
	writemsg(      "         Also note that non-root/wheel users will need to be added to\n")
100
	and "/@affix@" == "/"
70
	writemsg(      "         the portage group to do portage commands.\n")
101
	):
71
	writemsg("\n")
102
		writemsg(red("Please update baselayout\n"))
72
	writemsg(      "         For the defaults, line 1 goes into passwd, and 2 into group.\n")
103
		writemsg(  red("         and merge portage user(250) and group(250) into your passwd\n"))
73
	writemsg(green("         portage:x:250:250:portage:/var/tmp/portage:/bin/false\n"))
104
		writemsg(  red("         and group files. Non-root compilation is disabled until then.\n"))
74
	writemsg(green("         portage::250:portage\n"))
105
		writemsg(      "         Also note that non-root/wheel users will need to be added to\n")
75
	writemsg("\n")
106
		writemsg(      "         the portage group to do portage commands.\n")
107
		writemsg("\n")
108
		writemsg(      "         For the defaults, line 1 goes into passwd, and 2 into group.\n")
109
		writemsg(green("         portage:x:250:250:portage:/var/tmp/portage:/bin/false\n"))
110
		writemsg(green("         portage::250:portage"))
111
	writemsg("\n\n")
76
112
77
if (uid!=0) and (portage_gid not in os.getgroups()):
113
if (uid!=0) and (portage_gid not in os.getgroups()):
78
	if not os.environ.has_key("PORTAGE_SCRIPT"):
114
	if not os.environ.has_key("PORTAGE_SCRIPT"):
79
		writemsg("\n")
115
		writemsg("\n")
80
		writemsg(red("*** You are not in the portage group. You may experience cache problems\n"))
116
		writemsg(red("*** You are not in the @portagegroup@ group. You may experience cache problems\n"))
81
		writemsg(red("*** due to permissions preventing the creation of the on-disk cache.\n"))
117
		writemsg(red("*** due to permissions preventing the creation of the on-disk cache.\n"))
82
		writemsg(red("*** Please add this user to the portage group if you wish to use portage.\n"))
118
		writemsg(red("*** Please add this user to the @portagegroup@ group if you wish to use portage.\n"))
83
		writemsg("\n")
119
		writemsg("\n")
84
120
(-)portage-cvs/pym/portage_dep.py (+1 lines)
Lines 21-26 Link Here
21
import os,string,types,sys,copy
21
import os,string,types,sys,copy
22
import portage_exception
22
import portage_exception
23
import portage_versions
23
import portage_versions
24
from portage_util import writemsg
24
25
25
OPERATORS="*<=>~!"
26
OPERATORS="*<=>~!"
26
ENDVERSION_KEYS = ["pre", "p", "alpha", "beta", "rc"]
27
ENDVERSION_KEYS = ["pre", "p", "alpha", "beta", "rc"]
(-)portage-cvs/pym/portage_exec.py (-3 / +4 lines)
Lines 9-14 Link Here
9
import portage_data
9
import portage_data
10
import portage_util
10
import portage_util
11
import portage_const
11
import portage_const
12
from portage_const import MYROOT, INVALID_ENV_FILE
12
13
13
selinux_capable = False
14
selinux_capable = False
14
sandbox_capable = os.path.exists(portage_const.SANDBOX_BINARY)
15
sandbox_capable = os.path.exists(portage_const.SANDBOX_BINARY)
Lines 62-68 Link Here
62
	if not opt_name:
63
	if not opt_name:
63
		opt_name=mycommand.split()[0]
64
		opt_name=mycommand.split()[0]
64
	if not env.has_key("BASH_ENV"):
65
	if not env.has_key("BASH_ENV"):
65
		env["BASH_ENV"] = "/etc/spork/is/not/valid/profile.env"
66
		env["BASH_ENV"] = MYROOT(INVALID_ENV_FILE)
66
	if debug:
67
	if debug:
67
		args.append("-x")
68
		args.append("-x")
68
	args.append("-c")
69
	args.append("-c")
Lines 79-86 Link Here
79
	if not uid:
80
	if not uid:
80
		uid=os.getuid()
81
		uid=os.getuid()
81
	try:
82
	try:
82
		os.chown(SANDBOX_PIDS_FILE,uid,portage_data.portage_gid)
83
		os.chown(MYROOT(SANDBOX_PIDS_FILE),uid,portage_data.portage_gid)
83
		os.chmod(SANDBOX_PIDS_FILE,0664)
84
		os.chmod(MYROOT(SANDBOX_PIDS_FILE),0664)
84
	except SystemExit, e:
85
	except SystemExit, e:
85
		raise
86
		raise
86
	except:
87
	except:
(-)portage-cvs/pym/portage_gpg.py (-1 / +1 lines)
Lines 11-17 Link Here
11
import portage_checksum
11
import portage_checksum
12
import portage_exec
12
import portage_exec
13
13
14
GPG_BINARY       = "/usr/bin/gpg"
14
GPG_BINARY       = "@GPG@"
15
GPG_OPTIONS      = ["--lock-never","--no-random-seed-file",
15
GPG_OPTIONS      = ["--lock-never","--no-random-seed-file",
16
                    "--no-greeting", "--no-sig-cache"]
16
                    "--no-greeting", "--no-sig-cache"]
17
GPG_VERIFY_FLAGS = ["--verify"]
17
GPG_VERIFY_FLAGS = ["--verify"]
(-)portage-cvs/pym/portage_locks.py (-1 / +1 lines)
Lines 284-290 Link Here
284
			print
284
			print
285
			print "Waiting on (hardlink) lockfile: (one '.' per 3 seconds)"
285
			print "Waiting on (hardlink) lockfile: (one '.' per 3 seconds)"
286
			print "This is a feature to prevent distfiles corruption."
286
			print "This is a feature to prevent distfiles corruption."
287
			print "/usr/lib/portage/bin/clean_locks can fix stuck locks."
287
			print "@PORTAGE_BASE@/bin/clean_locks can fix stuck locks."
288
			print "Lockfile: " + lockfilename
288
			print "Lockfile: " + lockfilename
289
		time.sleep(0.1)
289
		time.sleep(0.1)
290
	
290
	
(-)portage-cvs/pym/portage_metadata.py (-1 / +1 lines)
Lines 1-4 Link Here
1
#!/usr/bin/python -O
1
#! @PYTHON@ -O
2
# Copyright 1999-2004 Gentoo Foundation
2
# Copyright 1999-2004 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
(-)portage-cvs/pym/portageq.py (-3 / +4 lines)
Lines 1-4 Link Here
1
#!/usr/bin/python -O
1
#! @PYTHON@ -O
2
# Copyright 1999-2003 Gentoo Technologies, Inc.
2
# Copyright 1999-2003 Gentoo Technologies, Inc.
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header$
4
# $Header$
Lines 8-13 Link Here
8
# duplication.
8
# duplication.
9
9
10
import portage,types,string
10
import portage,types,string
11
from portage_const import MYROOT, ROOT, VDB_PATH
11
12
12
13
13
#-----------------------------------------------------------------------------
14
#-----------------------------------------------------------------------------
Lines 144-150 Link Here
144
	Returns the path used for the var(installed) package database for the
145
	Returns the path used for the var(installed) package database for the
145
	set environment/configuration options.
146
	set environment/configuration options.
146
	"""
147
	"""
147
	return 0, portage.root+portage.VDB_PATH+"\n"
148
	return 0, ROOT(VDB_PATH)+"\n"
148
149
149
def gentoo_mirrors(argv):
150
def gentoo_mirrors(argv):
150
	"""
151
	"""
Lines 198-204 Link Here
198
def envvar(argv):
199
def envvar(argv):
199
	"""<variable>
200
	"""<variable>
200
	Returns a specific environment variable as exists prior to ebuild.sh.
201
	Returns a specific environment variable as exists prior to ebuild.sh.
201
	Similar to: emerge --verbose --info | egrep '^<variable>='
202
	Similar to: emerge --verbose --info | @EGREP@ '^<variable>='
202
	"""
203
	"""
203
	return 0, portage.settings[argv[0]]+"\n"
204
	return 0, portage.settings[argv[0]]+"\n"
204
205
(-)portage-cvs/src/Makefile.am (+3 lines)
Lines 1-6 Link Here
1
SUBDIRS 	=
1
SUBDIRS 	=
2
2
3
bin_PROGRAMS	=
3
bin_PROGRAMS	=
4
bindir = @PORTAGE_BASE@/bin
4
if BUILD_TBZ2TOOL
5
if BUILD_TBZ2TOOL
5
bin_PROGRAMS += tbz2tool
6
bin_PROGRAMS += tbz2tool
6
endif
7
endif
Lines 14-16 Link Here
14
endif
15
endif
15
16
16
tbz2tool_SOURCES = tbz2tool.c
17
tbz2tool_SOURCES = tbz2tool.c
18
19
MAINTAINERCLEANFILES = Makefile.in
(-)portage-cvs/src/filter-env/Makefile.am (+2 lines)
Lines 1-3 Link Here
1
bin_PROGRAMS		= filter-env
1
bin_PROGRAMS		= filter-env
2
bindir = @PORTAGE_BASE@/bin
2
filter_env_SOURCES	= posix.c bmh_search.c bmh_search.h
3
filter_env_SOURCES	= posix.c bmh_search.c bmh_search.h
3
4
5
MAINTAINERCLEANFILES = Makefile.in
(-)portage-cvs/src/filter-env/posix.c (+2 lines)
Lines 4-10 Link Here
4
#include <stdlib.h>
4
#include <stdlib.h>
5
#include <string.h>
5
#include <string.h>
6
#include <fcntl.h>
6
#include <fcntl.h>
7
#ifdef HAVE_GETOPT_H
7
#include <getopt.h>
8
#include <getopt.h>
9
#endif /* HAVE_GETOPT_H */
8
#include <regex.h>
10
#include <regex.h>
9
#include <unistd.h>
11
#include <unistd.h>
10
#include <ctype.h>
12
#include <ctype.h>
(-)portage-cvs/src/python-missingos/Makefile.in (-9 / +29 lines)
Lines 1-10 Link Here
1
INSTALL	= @INSTALL@
1
srcdir = @srcdir@
2
2
abs_builddir = @abs_builddir@
3
all:
3
abs_srcdir = @abs_srcdir@
4
	setup.py build
5
4
6
install:
5
INSTALL	= @INSTALL@
7
	setup.py install --root $(DESTDIR)
8
6
9
DISTFILES = 	setup.py 	\
7
DISTFILES = 	setup.py 	\
10
		Makefile.in	\
8
		Makefile.in	\
Lines 13-25 Link Here
13
		missingos.c	\
11
		missingos.c	\
14
		setup.cfg	\
12
		setup.cfg	\
15
		ChangeLog	
13
		ChangeLog	
14
15
all: builddir
16
	setup.py build
17
18
builddir:
19
	test "${abs_builddir}" != "${abs_srcdir}" \
20
	&& for x in $(DISTFILES) \
21
	 ; do $(INSTALL) ${abs_srcdir}/$${x} ${abs_builddir}/$${x} \
22
	 ; done
23
24
clean-builddir:
25
	if test "${abs_builddir}" != "${abs_srcdir}" \
26
	 ; then for x in $(DISTFILES) \
27
	      ; do rm -f ${abs_builddir}/$${x} \
28
	      ; done \
29
	 ; fi
30
31
install: builddir
32
	setup.py install --root $(DESTDIR)/
33
16
distdir:
34
distdir:
17
	for x in $(DISTFILES); do \
35
	for x in $(DISTFILES); do \
18
		$(INSTALL) -D $$x $(distdir)/$$x; \
36
		$(INSTALL) -D ${srcdir}/$${x} $(distdir)/$${x}; \
19
	done
37
	done
20
	chmod 755 $(distdir)/setup.py
38
	chmod 755 $(distdir)/setup.py
21
39
40
distclean: clean-builddir
22
41
23
clean:
42
clean maintainer-clean:
24
.PHONY:	clean install all distdir
43
.PHONY:	all install distdir builddir
44
.PHONY: distclean clean maintainer-clean clean-builddir
25
45
(-)portage-cvs/subst-install.in (+72 lines)
Line 0 Link Here
1
#! @SHELL@
2
3
SED="@SED@"
4
RM="@RM@"
5
BASENAME="@BASENAME@"
6
DIRNAME="@DIRNAME@"
7
8
case "${SED}" in ""|@*@) SED=sed ;; esac
9
case "${RM}" in ""|@*@) RM=rm ;; esac
10
case "${BASENAME}" in ""|@*@) BASENAME=basename ;; esac
11
case "${DIRNAME}" in ""|@*@) DIRNAME=dirname ;; esac
12
13
mydir=`${DIRNAME} $0`
14
myname=`${BASENAME} $0`
15
mydir=`cd ${mydir};pwd`
16
me=${mydir}/${myname}
17
18
. ${mydir}/subst-install.vars
19
20
substinstall_tmpdir=${TMP-/tmp}/${myname}.$$
21
trap "${RM} -rf \${substinstall_tmpdir}" "0"
22
mkdir -p ${substinstall_tmpdir} \
23
|| { echo "cannot create directory ${substinstall_tmpdir}" >&2 ; exit 1 ; }
24
25
substinstall_tmpsed=${substinstall_tmpdir}/sedscript
26
27
{	for v in ${all_configurevars}
28
	do
29
		eval "echo \"s,@${v}@,\${${v}},g;\""
30
	done
31
} | ${SED} 's/^s,@/s@@/; s/@,/@@/; s/,g;$/@;/; s/[\\&,]/\\&/g;
32
   s/^s@@/s,@/; s/@@/@,/; s/@;$/,g;/' > ${substinstall_tmpsed}
33
34
substinstall_installcmd=
35
substinstall_sources=
36
substinstall_target=
37
38
while [ "$1" ]
39
do
40
	substinstall_arg=$1
41
	shift
42
	case "${substinstall_arg}" in
43
	--installcmd=*)
44
		substinstall_installcmd=`echo ${substinstall_arg} | ${SED} -e 's,^--installcmd=,,'`
45
		;;
46
	*)
47
		substinstall_sources="${substinstall_sources} ${substinstall_target}"
48
		substinstall_target=${substinstall_arg}
49
		;;
50
	esac
51
done
52
53
[ -n "${substinstall_installcmd}" ] || { echo "missing --installcmd=" ; exit 1 ; }
54
55
substinstall_tmpsources=
56
57
for substinstall_s in ${substinstall_sources}
58
do
59
	[ -r ${substinstall_s} ] || { echo "cannot read ${substinstall_s}" >&2 ; exit 1 ; }
60
	tmpsource=${substinstall_tmpdir}/`basename ${substinstall_s}`.subst
61
	${SED} -f ${substinstall_tmpsed} < ${substinstall_s} > ${tmpsource} \
62
	|| { echo "cannot sed from ${substinstall_s} to ${tmpsource}" >&2 ; exit 1 ; }
63
	substinstall_tmpsources="${substinstall_tmpsources} ${tmpsource}"
64
done
65
66
${substinstall_installcmd} ${substinstall_tmpsources} ${substinstall_target}
67
68
substinstall_installrv=$?
69
70
${RM} -rf ${substinstall_tmpdir}
71
72
exit ${substinstall_installrv}

Return to bug 87877