Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:prefix commit in: /
Date: Mon, 27 Aug 2012 06:44:55
Message-Id: 1346049825.a7eefaa55f54e73995e5e0b893b285f905177a40.grobian@gentoo
1 commit: a7eefaa55f54e73995e5e0b893b285f905177a40
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Mon Aug 27 06:43:45 2012 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Mon Aug 27 06:43:45 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=a7eefaa5
7
8 Merge remote-tracking branch 'overlays-gentoo-org/master' into prefix
9
10 Conflicts:
11 bin/dispatch-conf
12 bin/ebuild-helpers/doins
13 bin/ebuild-helpers/newbin
14 bin/ebuild-helpers/newconfd
15 bin/ebuild-helpers/newdoc
16 bin/ebuild-helpers/newenvd
17 bin/ebuild-helpers/newexe
18 bin/ebuild-helpers/newinitd
19 bin/ebuild-helpers/newins
20 bin/ebuild-helpers/newlib.a
21 bin/ebuild-helpers/newlib.so
22 bin/ebuild-helpers/newman
23 bin/ebuild-helpers/newsbin
24 bin/emerge-webrsync
25 bin/isolated-functions.sh
26 bin/phase-helpers.sh
27
28
29 bin/dispatch-conf | 10 +-
30 bin/ebuild-helpers/doins | 4 +-
31 bin/ebuild-helpers/newbin | 23 +-
32 bin/ebuild-helpers/newconfd | 23 +-
33 bin/ebuild-helpers/newdoc | 23 +-
34 bin/ebuild-helpers/newenvd | 23 +-
35 bin/ebuild-helpers/newexe | 23 +-
36 bin/ebuild-helpers/newinitd | 23 +-
37 bin/ebuild-helpers/newins | 73 ++-
38 bin/ebuild-helpers/newlib.a | 23 +-
39 bin/ebuild-helpers/newlib.so | 23 +-
40 bin/ebuild-helpers/newman | 23 +-
41 bin/ebuild-helpers/newsbin | 23 +-
42 bin/ebuild-helpers/prepstrip | 30 +-
43 bin/ebuild.sh | 4 +-
44 bin/egencache | 2 +-
45 bin/emerge-webrsync | 127 +++--
46 bin/isolated-functions.sh | 4 +-
47 bin/phase-functions.sh | 12 +-
48 bin/phase-helpers.sh | 4 +-
49 cnf/metadata.dtd | 7 +-
50 man/make.conf.5 | 24 +-
51 misc/emerge-delta-webrsync | 613 ++++++++++++++++++++
52 mkrelease.sh | 2 +-
53 pym/_emerge/BinpkgFetcher.py | 10 +-
54 pym/_emerge/EbuildFetcher.py | 6 +-
55 pym/_emerge/EbuildMetadataPhase.py | 13 +-
56 pym/_emerge/Package.py | 19 +-
57 pym/_emerge/PollScheduler.py | 18 +-
58 pym/_emerge/Scheduler.py | 9 +-
59 pym/_emerge/SpawnProcess.py | 17 +-
60 pym/portage/checksum.py | 58 ++
61 pym/portage/dbapi/__init__.py | 16 +-
62 pym/portage/dbapi/bintree.py | 7 +-
63 pym/portage/dbapi/porttree.py | 4 +-
64 pym/portage/dbapi/virtual.py | 4 +-
65 pym/portage/dep/dep_check.py | 19 +-
66 pym/portage/eapi.py | 11 +-
67 pym/portage/getbinpkg.py | 8 +-
68 pym/portage/manifest.py | 15 +-
69 .../package/ebuild/_config/KeywordsManager.py | 42 ++-
70 pym/portage/package/ebuild/_config/UseManager.py | 79 +++-
71 .../package/ebuild/_config/special_env_vars.py | 1 +
72 pym/portage/package/ebuild/config.py | 21 +-
73 pym/portage/package/ebuild/digestcheck.py | 15 +-
74 pym/portage/package/ebuild/doebuild.py | 18 +-
75 pym/portage/package/ebuild/fetch.py | 23 +-
76 pym/portage/package/ebuild/getmaskingstatus.py | 7 +-
77 pym/portage/process.py | 6 +-
78 pym/portage/tests/ebuild/test_doebuild_spawn.py | 2 +
79 pym/portage/tests/lint/test_bash_syntax.py | 12 +-
80 pym/portage/util/__init__.py | 7 +
81 pym/portage/util/_desktop_entry.py | 60 ++-
82 pym/portage/util/_eventloop/EventLoop.py | 65 ++-
83 pym/portage/versions.py | 27 +-
84 55 files changed, 1295 insertions(+), 470 deletions(-)
85
86 diff --cc bin/dispatch-conf
87 index de8d85d,35979db..d671873
88 --- a/bin/dispatch-conf
89 +++ b/bin/dispatch-conf
90 @@@ -1,5 -1,5 +1,5 @@@
91 -#!/usr/bin/python -O
92 +#!@PREFIX_PORTAGE_PYTHON@ -O
93 - # Copyright 1999-2011 Gentoo Foundation
94 + # Copyright 1999-2012 Gentoo Foundation
95 # Distributed under the terms of the GNU General Public License v2
96
97 #
98 diff --cc bin/ebuild-helpers/doins
99 index b9c95ed,fd77934..ca6b0ba
100 --- a/bin/ebuild-helpers/doins
101 +++ b/bin/ebuild-helpers/doins
102 @@@ -1,8 -1,8 +1,8 @@@
103 -#!/bin/bash
104 +#!@PORTAGE_BASH@
105 - # Copyright 1999-2011 Gentoo Foundation
106 + # Copyright 1999-2012 Gentoo Foundation
107 # Distributed under the terms of the GNU General Public License v2
108
109 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
110 +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
111
112 if [[ ${0##*/} == dodoc ]] ; then
113 if [ $# -eq 0 ] ; then
114 @@@ -38,18 -38,9 +38,18 @@@ if [[ ${INSDESTTREE#${ED}} != "${INSDES
115 helpers_die "${0##*/} used with \${D} or \${ED}"
116 exit 1
117 fi
118 +# PREFIX LOCAL: check for usage with EPREFIX
119 +if [[ ${INSDESTTREE#${EPREFIX}} != "${INSDESTTREE}" ]]; then
120 + vecho "-------------------------------------------------------" 1>&2
121 + vecho "You should not use \${EPREFIX} with helpers." 1>&2
122 + vecho " --> ${INSDESTTREE}" 1>&2
123 + vecho "-------------------------------------------------------" 1>&2
124 + exit 1
125 +fi
126 +# END PREFIX LOCAL
127
128 case "$EAPI" in
129 - 0|1|2|3|3_pre2)
130 + 0|1|2|3)
131 PRESERVE_SYMLINKS=n
132 ;;
133 *)
134 diff --cc bin/ebuild-helpers/newins
135 index 45c3e18,2dc041d..e9bf34b
136 --- a/bin/ebuild-helpers/newins
137 +++ b/bin/ebuild-helpers/newins
138 @@@ -1,16 -1,13 +1,14 @@@
139 +#!@PORTAGE_BASH@
140 - # Copyright 1999-2011 Gentoo Foundation
141 + #!/bin/bash
142 + # Copyright 1999-2012 Gentoo Foundation
143 # Distributed under the terms of the GNU General Public License v2
144
145 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
146 +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
147
148 - if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
149 - helpers_die "${0##*/}: Need two arguments, old file and new file"
150 - exit 1
151 - fi
152 + helper=${0##*/}
153
154 - if [ ! -e "$1" ] ; then
155 - helpers_die "!!! ${0##*/}: $1 does not exist"
156 + if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
157 + helpers_die "${helper}: Need two arguments, old file and new file"
158 exit 1
159 fi
160
161 diff --cc bin/emerge-webrsync
162 index 581dc54,a962ab5..cdcf716
163 --- a/bin/emerge-webrsync
164 +++ b/bin/emerge-webrsync
165 @@@ -1,5 -1,5 +1,6 @@@
166 +#!@PORTAGE_BASH@
167 - # Copyright 1999-2011 Gentoo Foundation
168 + #!/bin/bash
169 + # Copyright 1999-2012 Gentoo Foundation
170 # Distributed under the terms of the GNU General Public License v2
171 # Author: Karl Trygve Kalleberg <karltk@g.o>
172 # Rewritten from the old, Perl-based emerge-webrsync script
173 @@@ -39,19 -39,14 +40,20 @@@ els
174 eecho "could not find 'portageq'; aborting"
175 exit 1
176 fi
177 - eval $("${portageq}" envvar -v FEATURES FETCHCOMMAND GENTOO_MIRRORS \
178 - PORTAGE_BIN_PATH PORTAGE_GPG_DIR \
179 - PORTAGE_NICENESS PORTAGE_RSYNC_EXTRA_OPTS PORTAGE_TMPDIR PORTDIR \
180 - SYNC http_proxy ftp_proxy \
181 - EPREFIX PORTAGE_USER PORTAGE_GROUP)
182 - DISTDIR="${PORTAGE_TMPDIR}/emerge-webrsync"
183 + eval $("${portageq}" envvar -v DISTDIR EPREFIX FEATURES \
184 + FETCHCOMMAND GENTOO_MIRRORS \
185 + PORTAGE_BIN_PATH PORTAGE_CONFIGROOT PORTAGE_GPG_DIR \
186 + PORTAGE_NICENESS PORTAGE_RSYNC_EXTRA_OPTS \
187 + PORTAGE_RSYNC_OPTS PORTAGE_TMPDIR PORTDIR \
188 - SYNC USERLAND http_proxy ftp_proxy)
189 ++ SYNC USERLAND http_proxy ftp_proxy \
190 ++ PORTAGE_USER PORTAGE_GROUP)
191 export http_proxy ftp_proxy
192
193 +# PREFIX LOCAL: use Prefix servers, just because we want this and infra
194 - # just can't support us yet
195 - GENTOO_MIRRORS="http://gentoo-mirror1.prefix.freens.org http://gentoo-mirror2.prefix.freens.org"
196 ++# can't support us yet
197 ++GENTOO_MIRRORS="http://gentoo-mirror1.prefix.freens.org"
198 +# END PREFIX LOCAL
199 +
200 # If PORTAGE_NICENESS is overriden via the env then it will
201 # still pass through the portageq call and override properly.
202 if [ -n "${PORTAGE_NICENESS}" ]; then
203 @@@ -191,11 -191,21 +198,23 @@@ sync_local()
204
205 vecho "Syncing local tree ..."
206
207 - local ownership="portage:portage"
208 ++ # PREFIX LOCAL: use PORTAGE_USER and PORTAGE_GROUP
209 ++ local ownership="${PORTAGE_USER:-portage}:${PORTAGE_GROUP:-portage}"
210 ++ # END PREFIX LOCAL
211 + if has usersync ${FEATURES} ; then
212 + case "${USERLAND}" in
213 + BSD)
214 + ownership=$(stat -f '%Su:%Sg' "${PORTDIR}")
215 + ;;
216 + *)
217 + ownership=$(stat -c '%U:%G' "${PORTDIR}")
218 + ;;
219 + esac
220 + fi
221 +
222 if type -P tarsync > /dev/null ; then
223 - # PREFIX LOCAL: use PORTAGE_USER and PORTAGE_GROUP
224 - local chown_opts="-o ${PORTAGE_USER:-portage} -g ${PORTAGE_GROUP:-portage}"
225 - chown ${PORTAGE_USER:-portage}:${PORTAGE_GROUP:-portage} portage > /dev/null 2>&1 || chown_opts=""
226 - # END PREFIX LOCAL
227 + local chown_opts="-o ${ownership%:*} -g ${ownership#*:}"
228 + chown ${ownership} "${PORTDIR}" > /dev/null 2>&1 || chown_opts=""
229 if ! tarsync $(vvecho -v) -s 1 ${chown_opts} \
230 -e /distfiles -e /packages -e /local "${file}" "${PORTDIR}"; then
231 eecho "tarsync failed; tarball is corrupt? (${file})"
232 diff --cc bin/isolated-functions.sh
233 index 3beb14a,d33c0b6..79801e5
234 --- a/bin/isolated-functions.sh
235 +++ b/bin/isolated-functions.sh
236 @@@ -1,5 -1,5 +1,5 @@@
237 -#!/bin/bash
238 +#!@PORTAGE_BASH@
239 - # Copyright 1999-2011 Gentoo Foundation
240 + # Copyright 1999-2012 Gentoo Foundation
241 # Distributed under the terms of the GNU General Public License v2
242
243 # We need this next line for "die" and "assert". It expands
244 diff --cc bin/phase-helpers.sh
245 index beca5ad,a00475c..10a7b3e
246 --- a/bin/phase-helpers.sh
247 +++ b/bin/phase-helpers.sh
248 @@@ -1,5 -1,5 +1,5 @@@
249 -#!/bin/bash
250 +#!@PREFIX_PORTAGE_BASH@
251 - # Copyright 1999-2011 Gentoo Foundation
252 + # Copyright 1999-2012 Gentoo Foundation
253 # Distributed under the terms of the GNU General Public License v2
254
255 export DESTTREE=/usr
256 diff --cc pym/portage/package/ebuild/fetch.py
257 index 63c792a,260bf10..7f76bb2
258 --- a/pym/portage/package/ebuild/fetch.py
259 +++ b/pym/portage/package/ebuild/fetch.py
260 @@@ -26,10 -26,9 +26,10 @@@ portage.proxy.lazyimport.lazyimport(glo
261 from portage import OrderedDict, os, selinux, shutil, _encodings, \
262 _shell_quote, _unicode_encode
263 from portage.checksum import (hashfunc_map, perform_md5, verify_all,
264 - _filter_unaccelarated_hashes)
265 + _filter_unaccelarated_hashes, _hash_filter, _apply_hash_filter)
266 from portage.const import BASH_BINARY, CUSTOM_MIRRORS_FILE, \
267 GLOBAL_CONFIG_PATH
268 +from portage.const import rootgid
269 from portage.data import portage_gid, portage_uid, secpass, userpriv_groups
270 from portage.exception import FileNotFound, OperationNotPermitted, \
271 PortageException, TryAgain