1 |
commit: 5b6156b085ab5ae518fa6c4ed9b2e2c5b75fd184 |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Aug 29 18:56:30 2011 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Aug 29 18:56:30 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=5b6156b0 |
7 |
|
8 |
Merge remote-tracking branch 'overlays-gentoo-org/master' into prefix |
9 |
|
10 |
Conflicts: |
11 |
bin/dispatch-conf |
12 |
bin/repoman |
13 |
pym/portage/__init__.py |
14 |
pym/portage/tests/runTests |
15 |
pym/portage/util/env_update.py |
16 |
runtests.sh |
17 |
|
18 |
|
19 |
bin/dispatch-conf | 6 +- |
20 |
bin/ebuild.sh | 37 +---- |
21 |
bin/egencache | 12 ++- |
22 |
bin/repoman | 23 ++- |
23 |
cnf/metadata.dtd | 99 +++++++++++ |
24 |
man/emerge.1 | 14 +- |
25 |
pym/_emerge/AsynchronousLock.py | 13 ++ |
26 |
pym/_emerge/BinpkgEnvExtractor.py | 2 +- |
27 |
pym/_emerge/EbuildPhase.py | 7 +- |
28 |
pym/_emerge/PipeReader.py | 1 + |
29 |
pym/_emerge/PollScheduler.py | 3 + |
30 |
pym/_emerge/Scheduler.py | 2 +- |
31 |
pym/_emerge/SpawnProcess.py | 10 +- |
32 |
pym/_emerge/actions.py | 3 +- |
33 |
pym/_emerge/depgraph.py | 153 +++++++---------- |
34 |
pym/_emerge/help.py | 18 +- |
35 |
pym/portage/__init__.py | 10 +- |
36 |
pym/portage/data.py | 3 + |
37 |
pym/portage/dbapi/vartree.py | 21 ++- |
38 |
pym/portage/elog/messages.py | 6 +- |
39 |
pym/portage/package/ebuild/doebuild.py | 90 ++++++++++- |
40 |
pym/portage/package/ebuild/prepare_build_dirs.py | 4 + |
41 |
pym/portage/tests/__init__.py | 34 +++- |
42 |
.../tests/ebuild/test_array_fromfile_eof.py | 1 + |
43 |
pym/portage/tests/{dbapi => emerge}/__init__.py | 0 |
44 |
pym/portage/tests/{bin => emerge}/__test__ | 0 |
45 |
pym/portage/tests/emerge/test_simple.py | 143 ++++++++++++++++ |
46 |
.../test_lazy_import_portage_baseline.py | 2 +- |
47 |
pym/portage/tests/process/test_poll.py | 10 +- |
48 |
pym/portage/tests/{dbapi => repoman}/__init__.py | 0 |
49 |
pym/portage/tests/{bin => repoman}/__test__ | 0 |
50 |
pym/portage/tests/repoman/test_simple.py | 174 ++++++++++++++++++++ |
51 |
pym/portage/tests/resolver/ResolverPlayground.py | 25 +++- |
52 |
pym/portage/tests/resolver/test_rebuild.py | 65 ++++---- |
53 |
pym/portage/update.py | 9 +- |
54 |
pym/portage/util/ExtractKernelVersion.py | 2 + |
55 |
pym/portage/util/_dyn_libs/LinkageMapELF.py | 1 + |
56 |
pym/portage/util/_pty.py | 1 + |
57 |
pym/portage/util/env_update.py | 59 +++---- |
58 |
pym/portage/xml/metadata.py | 2 + |
59 |
pym/portage/xpak.py | 4 +- |
60 |
runtests.sh | 2 +- |
61 |
42 files changed, 817 insertions(+), 254 deletions(-) |
62 |
|
63 |
diff --cc bin/dispatch-conf |
64 |
index 6ce255e,497927d..fe85c54 |
65 |
--- a/bin/dispatch-conf |
66 |
+++ b/bin/dispatch-conf |
67 |
@@@ -1,5 -1,5 +1,5 @@@ |
68 |
-#!/usr/bin/python -O |
69 |
+#!@PREFIX_PORTAGE_PYTHON@ -O |
70 |
- # Copyright 1999-2006 Gentoo Foundation |
71 |
+ # Copyright 1999-2011 Gentoo Foundation |
72 |
# Distributed under the terms of the GNU General Public License v2 |
73 |
|
74 |
# |
75 |
diff --cc bin/repoman |
76 |
index d58c52f,d9ecfc4..ed62fa1 |
77 |
--- a/bin/repoman |
78 |
+++ b/bin/repoman |
79 |
@@@ -99,7 -96,8 +99,10 @@@ os.umask(0o22 |
80 |
# behave incrementally. |
81 |
repoman_incrementals = tuple(x for x in \ |
82 |
portage.const.INCREMENTALS if x != 'ACCEPT_KEYWORDS') |
83 |
- repoman_settings = portage.config(local_config=False, _eprefix=EPREFIX) |
84 |
+ eprefix = os.environ.get("__REPOMAN_TEST_EPREFIX") |
85 |
++if not eprefix: |
86 |
++ eprefix = EPREFIX |
87 |
+ repoman_settings = portage.config(local_config=False, _eprefix=eprefix) |
88 |
repoman_settings.lock() |
89 |
|
90 |
if repoman_settings.get("NOCOLOR", "").lower() in ("yes", "true") or \ |
91 |
diff --cc pym/portage/__init__.py |
92 |
index 4ce9efe,72cdf2d..8b5426b |
93 |
--- a/pym/portage/__init__.py |
94 |
+++ b/pym/portage/__init__.py |
95 |
@@@ -473,8 -472,9 +473,11 @@@ def create_trees(config_root=None, targ |
96 |
portdbapi.portdbapi_instances.remove(portdb) |
97 |
del trees[myroot]["porttree"], myroot, portdb |
98 |
|
99 |
+ eprefix = os.environ.get("__PORTAGE_TEST_EPREFIX") |
100 |
++ if not eprefix: |
101 |
++ eprefix = EPREFIX |
102 |
settings = config(config_root=config_root, target_root=target_root, |
103 |
- config_incrementals=portage.const.INCREMENTALS, _eprefix=EPREFIX) |
104 |
+ config_incrementals=portage.const.INCREMENTALS, _eprefix=eprefix) |
105 |
settings.lock() |
106 |
|
107 |
myroots = [(settings["ROOT"], settings)] |
108 |
diff --cc pym/portage/data.py |
109 |
index 0c0e320,c496c0b..354fc9c |
110 |
--- a/pym/portage/data.py |
111 |
+++ b/pym/portage/data.py |
112 |
@@@ -67,8 -63,11 +67,11 @@@ secpass= |
113 |
uid=os.getuid() |
114 |
wheelgid=0 |
115 |
|
116 |
-if uid==0: |
117 |
+if uid==rootuid: |
118 |
secpass=2 |
119 |
+ elif "__PORTAGE_TEST_EPREFIX" in os.environ: |
120 |
+ secpass = 2 |
121 |
+ |
122 |
try: |
123 |
wheelgid=grp.getgrnam("wheel")[2] |
124 |
except KeyError: |
125 |
diff --cc pym/portage/util/env_update.py |
126 |
index 2650f15,1731663..d4f3787 |
127 |
--- a/pym/portage/util/env_update.py |
128 |
+++ b/pym/portage/util/env_update.py |
129 |
@@@ -47,8 -46,13 +46,15 @@@ def env_update(makelinks=1, target_root |
130 |
if prev_mtimes is None: |
131 |
prev_mtimes = portage.mtimedb["ldpath"] |
132 |
if env is None: |
133 |
- env = os.environ |
134 |
- envd_dir = os.path.join(target_root, EPREFIX_LSTRIP, "etc", "env.d") |
135 |
+ settings = os.environ |
136 |
++ if 'EPREFIX' not in settings: |
137 |
++ settings['EPREFIX'] = portage.const.EPREFIX |
138 |
+ else: |
139 |
+ settings = env |
140 |
+ |
141 |
+ eprefix = settings.get("EPREFIX", "") |
142 |
+ eprefix_lstrip = eprefix.lstrip(os.sep) |
143 |
+ envd_dir = os.path.join(target_root, eprefix_lstrip, "etc", "env.d") |
144 |
ensure_dirs(envd_dir, mode=0o755) |
145 |
fns = listdir(envd_dir, EmptyOnError=1) |
146 |
fns.sort() |
147 |
@@@ -279,12 -271,12 +273,12 @@@ |
148 |
penvnotice = "# THIS FILE IS AUTOMATICALLY GENERATED BY env-update.\n" |
149 |
penvnotice += "# DO NOT EDIT THIS FILE. CHANGES TO STARTUP PROFILES\n" |
150 |
cenvnotice = penvnotice[:] |
151 |
- penvnotice += "# GO INTO " + EPREFIX + "/etc/profile NOT /etc/profile.env\n\n" |
152 |
- cenvnotice += "# GO INTO " + EPREFIX + "/etc/csh.cshrc NOT /etc/csh.env\n\n" |
153 |
- penvnotice += "# GO INTO /etc/profile NOT /etc/profile.env\n\n" |
154 |
- cenvnotice += "# GO INTO /etc/csh.cshrc NOT /etc/csh.env\n\n" |
155 |
++ penvnotice += "# GO INTO " + eprefix + "/etc/profile NOT /etc/profile.env\n\n" |
156 |
++ cenvnotice += "# GO INTO " + eprefix + "/etc/csh.cshrc NOT /etc/csh.env\n\n" |
157 |
|
158 |
#create /etc/profile.env for bash support |
159 |
- outfile = atomic_ofstream(os.path.join(target_root, EPREFIX_LSTRIP, "etc", "profile.env")) |
160 |
+ outfile = atomic_ofstream(os.path.join( |
161 |
+ target_root, eprefix_lstrip, "etc", "profile.env")) |
162 |
outfile.write(penvnotice) |
163 |
|
164 |
env_keys = [ x for x in env if x != "LDPATH" ] |
165 |
diff --cc runtests.sh |
166 |
index dadd32d,981fa1e..52f7bb0 |
167 |
--- a/runtests.sh |
168 |
+++ b/runtests.sh |
169 |
@@@ -26,9 -26,9 +26,9 @@@ trap interrupted SIGIN |
170 |
|
171 |
exit_status="0" |
172 |
for version in ${PYTHON_VERSIONS}; do |
173 |
- if [[ -x /usr/bin/python${version} ]]; then |
174 |
+ if [[ -x @PREFIX_PORTAGE_PYTHON@${version} ]]; then |
175 |
echo -e "${GOOD}Testing with Python ${version}...${NORMAL}" |
176 |
- if ! @PREFIX_PORTAGE_PYTHON@${version} pym/portage/tests/runTests "$@" ; then |
177 |
- if ! /usr/bin/python${version} -Wd pym/portage/tests/runTests "$@" ; then |
178 |
++ if ! @PREFIX_PORTAGE_PYTHON@${version} -Wd pym/portage/tests/runTests "$@" ; then |
179 |
echo -e "${BAD}Testing with Python ${version} failed${NORMAL}" |
180 |
exit_status="1" |
181 |
fi |