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: Tue, 12 Dec 2017 08:19:36
Message-Id: 1513066750.70aab2af6ad556e45657745a2d4adf64ac23e5b9.grobian@gentoo
1 commit: 70aab2af6ad556e45657745a2d4adf64ac23e5b9
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 12 08:19:10 2017 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 12 08:19:10 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=70aab2af
7
8 Merge remote-tracking branch 'overlays-gentoo-org/master' into prefix
9
10 COPYING | 375 ++-----------
11 NEWS | 10 +
12 RELEASE-NOTES | 42 ++
13 bin/doins.py | 583 +++++++++++++++++++++
14 bin/ebuild-helpers/doins | 156 ++----
15 bin/phase-functions.sh | 2 +-
16 bin/phase-helpers.sh | 3 +-
17 bin/quickpkg | 15 +-
18 cnf/make.globals | 5 +-
19 man/portage.5 | 13 +-
20 pym/_emerge/BinpkgExtractorAsync.py | 4 +-
21 pym/_emerge/Package.py | 32 ++
22 pym/_emerge/Scheduler.py | 36 --
23 pym/_emerge/depgraph.py | 12 +-
24 pym/_emerge/main.py | 3 +-
25 pym/portage/_emirrordist/FetchTask.py | 2 +-
26 pym/portage/checksum.py | 9 +-
27 pym/portage/const.py | 29 +-
28 pym/portage/dbapi/__init__.py | 5 +
29 pym/portage/dbapi/bintree.py | 87 +--
30 pym/portage/dbapi/vartree.py | 42 +-
31 pym/portage/dep/_dnf.py | 90 ++++
32 pym/portage/dep/dep_check.py | 147 +++++-
33 pym/portage/emaint/modules/binhost/binhost.py | 10 +-
34 pym/portage/manifest.py | 37 +-
35 pym/portage/output.py | 2 +-
36 pym/portage/package/ebuild/_config/UseManager.py | 5 +-
37 pym/portage/package/ebuild/config.py | 10 +-
38 pym/portage/package/ebuild/digestgen.py | 7 +-
39 pym/portage/package/ebuild/doebuild.py | 17 +-
40 pym/portage/repository/config.py | 45 +-
41 pym/portage/sync/modules/git/git.py | 2 +-
42 pym/portage/sync/modules/rsync/rsync.py | 2 +-
43 pym/portage/tests/bin/test_doins.py | 352 +++++++++++++
44 pym/portage/tests/dbapi/test_fakedbapi.py | 20 +
45 pym/portage/tests/dep/test_dnf_convert.py | 48 ++
46 pym/portage/tests/dep/test_overlap_dnf.py | 28 +
47 pym/portage/tests/ebuild/test_config.py | 1 +
48 .../resolver/test_disjunctive_depend_order.py | 87 +++
49 .../tests/resolver/test_onlydeps_minimal.py | 5 +-
50 .../tests/resolver/test_or_downgrade_installed.py | 97 ++++
51 .../resolver/test_virtual_minimize_children.py | 145 +++++
52 pym/portage/tests/sync/test_sync_local.py | 2 +-
53 pym/portage/tests/versions/test_vercmp.py | 3 -
54 pym/portage/util/__init__.py | 6 +-
55 pym/portage/versions.py | 53 +-
56 repoman/RELEASE-NOTES | 12 +
57 repoman/pym/repoman/repos.py | 17 +-
58 repoman/pym/repoman/tests/simple/test_simple.py | 15 -
59 repoman/setup.py | 24 +-
60 setup.py | 10 +-
61 51 files changed, 2080 insertions(+), 684 deletions(-)
62
63 diff --cc bin/ebuild-helpers/doins
64 index 7690cab35,c3a57890a..04bfdd0d4
65 --- a/bin/ebuild-helpers/doins
66 +++ b/bin/ebuild-helpers/doins
67 @@@ -42,127 -41,49 +41,58 @@@ if [[ ${INSDESTTREE#${ED}} != "${INSDES
68 __helpers_die "${helper} used with \${D} or \${ED}"
69 exit 1
70 fi
71 +# PREFIX LOCAL: check for usage with EPREFIX
72 +if [[ ${INSDESTTREE#${EPREFIX}} != "${INSDESTTREE}" ]]; then
73 + __vecho "-------------------------------------------------------" 1>&2
74 + __vecho "You should not use \${EPREFIX} with helpers." 1>&2
75 + __vecho " --> ${INSDESTTREE}" 1>&2
76 + __vecho "-------------------------------------------------------" 1>&2
77 + exit 1
78 +fi
79 +# END PREFIX LOCAL
80
81 if ___eapi_doins_and_newins_preserve_symlinks; then
82 - PRESERVE_SYMLINKS=y
83 - else
84 - PRESERVE_SYMLINKS=n
85 + DOINS_ARGS+=( --preserve_symlinks )
86 fi
87
88 - export TMP=$(mktemp -d "${T}/.doins_tmp_XXXXXX")
89 - # Use separate directories to avoid potential name collisions.
90 - mkdir -p "$TMP"/{1,2}
91 -
92 - [[ ! -d ${ED}${INSDESTTREE} ]] && dodir "${INSDESTTREE}"
93 -
94 - _doins() {
95 - local mysrc="$1" mydir="$2" cleanup="" rval
96 -
97 - if [ -L "$mysrc" ] ; then
98 - # Our fake $DISTDIR contains symlinks that should
99 - # not be reproduced inside $D. In order to ensure
100 - # that things like dodoc "$DISTDIR"/foo.pdf work
101 - # as expected, we dereference symlinked files that
102 - # refer to absolute paths inside
103 - # $PORTAGE_ACTUAL_DISTDIR/.
104 - if [ $PRESERVE_SYMLINKS = y ] && \
105 - ! [[ $(readlink "$mysrc") == "$PORTAGE_ACTUAL_DISTDIR"/* ]] ; then
106 - rm -rf "${ED}$INSDESTTREE/$mydir/${mysrc##*/}" || return $?
107 - cp -P "$mysrc" "${ED}$INSDESTTREE/$mydir/${mysrc##*/}"
108 - return $?
109 - else
110 - cp "$mysrc" "$TMP/2/${mysrc##*/}" || return $?
111 - mysrc="$TMP/2/${mysrc##*/}"
112 - cleanup=$mysrc
113 - fi
114 - fi
115 + if ___eapi_helpers_can_die; then
116 + DOINS_ARGS+=( --helpers_can_die )
117 + fi
118
119 - install ${INSOPTIONS} "${mysrc}" "${ED}${INSDESTTREE}/${mydir}"
120 - rval=$?
121 - [[ -n ${cleanup} ]] && rm -f "${cleanup}"
122 - [ $rval -ne 0 ] && echo "!!! ${helper}: $mysrc does not exist" 1>&2
123 - return $rval
124 - }
125 -
126 - _xdoins() {
127 - local -i failed=0
128 - while read -r -d $'\0' x ; do
129 - _doins "$x" "${x%/*}"
130 - ((failed|=$?))
131 - done
132 - return $failed
133 - }
134 -
135 - success=0
136 - failed=0
137 -
138 - for x in "$@" ; do
139 - if [[ $PRESERVE_SYMLINKS = n && -d $x ]] || \
140 - [[ $PRESERVE_SYMLINKS = y && -d $x && ! -L $x ]] ; then
141 - if [ "${DOINSRECUR}" == "n" ] ; then
142 - if [[ ${helper} == dodoc ]] ; then
143 - echo "!!! ${helper}: $x is a directory" 1>&2
144 - ((failed|=1))
145 - fi
146 - continue
147 - fi
148 -
149 - while [ "$x" != "${x%/}" ] ; do
150 - x=${x%/}
151 - done
152 - if [ "$x" = "${x%/*}" ] ; then
153 - pushd "$PWD" >/dev/null
154 - else
155 - pushd "${x%/*}" >/dev/null
156 - fi
157 - x=${x##*/}
158 - x_orig=$x
159 - # Follow any symlinks recursively until we've got
160 - # a normal directory for 'find' to traverse. The
161 - # name of the symlink will be used for the name
162 - # of the installed directory, as discussed in
163 - # bug #239529.
164 - while [ -L "$x" ] ; do
165 - pushd "$(readlink "$x")" >/dev/null
166 - x=${PWD##*/}
167 - pushd "${PWD%/*}" >/dev/null
168 - done
169 - if [[ $x != $x_orig ]] ; then
170 - mv "$x" "$TMP/1/$x_orig"
171 - pushd "$TMP/1" >/dev/null
172 - fi
173 - find "$x_orig" -type d -exec dodir "${INSDESTTREE}/{}" \;
174 - find "$x_orig" \( -type f -or -type l \) -print0 | _xdoins
175 - if [[ ${PIPESTATUS[1]} -eq 0 ]] ; then
176 - # NOTE: Even if only an empty directory is installed here, it
177 - # still counts as success, since an empty directory given as
178 - # an argument to doins -r should not trigger failure.
179 - ((success|=1))
180 - else
181 - ((failed|=1))
182 - fi
183 - if [[ $x != $x_orig ]] ; then
184 - popd >/dev/null
185 - mv "$TMP/1/$x_orig" "$x"
186 - fi
187 - while popd >/dev/null 2>&1 ; do true ; done
188 - else
189 - _doins "${x}"
190 - if [[ $? -eq 0 ]] ; then
191 - ((success|=1))
192 - else
193 - ((failed|=1))
194 - fi
195 - fi
196 - done
197 - rm -rf "$TMP"
198 - [[ $failed -ne 0 || $success -eq 0 ]] && { __helpers_die "${helper} failed"; exit 1; } || exit 0
199 + if [[ -n "${INSOPTIONS}" ]]; then
200 + DOINS_ARGS+=( "--insoptions=${INSOPTIONS}" )
201 + fi
202 +
203 + if [[ -n "${DIROPTIONS}" ]]; then
204 + DOINS_ARGS+=( "--diroptions=${DIROPTIONS}" )
205 + fi
206 +
207 + if [[ -n "${PORTAGE_ACTUAL_DISTDIR}" ]]; then
208 + DOINS_ARGS+=( "--distdir=${PORTAGE_ACTUAL_DISTDIR}" )
209 + fi
210 +
211 + if [[ "${DOINSSTRICTOPTION}" == 1 ]]; then
212 + DOINS_ARGS+=( --strict_option )
213 + fi
214 +
215 + if has xattr ${FEATURES}; then
216 + DOINS_ARGS+=(
217 + --enable_copy_xattr
218 + "--xattr_exclude=${PORTAGE_XATTR_EXCLUDE}"
219 + )
220 + fi
221 +
222 + DOINS_ARGS+=(
223 + "--helper=${helper}"
224 + "--dest=${ED}${INSDESTTREE}"
225 + )
226 +
227 + # Explicitly set PYTHONPATH to non empty.
228 + # If PYTHONPATH is empty (not unset), it means "add current working directory
229 + # to the import path" if the Python is prior to 3.4, which would cause
230 + # unexpected import. See also #469338.
231 + PYTHONPATH="${PORTAGE_PYM_PATH:-/usr/lib/portage/pym}${PYTHONPATH:+:}${PYTHONPATH}" \
232 + "${PORTAGE_PYTHON:-/usr/bin/python}" \
233 + "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/doins.py \
234 + "${DOINS_ARGS[@]}" -- "$@" || \
235 + { __helpers_die "${helper} failed"; exit 1; }
236 diff --cc cnf/make.globals
237 index d422ca639,08a37a534..131c5076d
238 --- a/cnf/make.globals
239 +++ b/cnf/make.globals
240 @@@ -150,23 -127,12 +150,26 @@@ PORTAGE_GPG_SIGNING_COMMAND="gpg --sig
241 # security.* attributes may be special (see bug 461868), but
242 # security.capability is specifically not excluded (bug 548516).
243 # system.nfs4_acl attributes are irrelevant, see bug #475496.
244 + # user.* attributes are not supported on tmpfs (bug 640290), but
245 + # user.pax.* is supported with the patch from bug 470644.
246 PORTAGE_XATTR_EXCLUDE="btrfs.* security.evm security.ima
247 - security.selinux system.nfs4_acl"
248 + security.selinux system.nfs4_acl user.apache_handler
249 + user.Beagle.* user.dublincore.* user.mime_encoding user.xdg.*"
250
251 +# Writeable paths for Mac OS X seatbelt sandbox
252 +#
253 +# If path ends in a slash (/), access will recursively be allowed to directory
254 +# contents (using a regex), not the directory itself. Without a slash, access
255 +# to the directory or file itself will be allowed (using a literal), so it can
256 +# be created, removed and changed. If both is needed, the directory needs to be
257 +# given twice, once with and once without the slash. Obviously this only makes
258 +# sense for directories, not files.
259 +#
260 +# An empty value for either variable will disable all restrictions on the
261 +# corresponding operation.
262 +MACOSSANDBOX_PATHS="/dev/fd/ /private/tmp/ /private/var/tmp/ @@PORTAGE_BUILDDIR@@/ @@PORTAGE_ACTUAL_DISTDIR@@/"
263 +MACOSSANDBOX_PATHS_CONTENT_ONLY="/dev/null /dev/dtracehelper /dev/tty /private/var/run/syslog"
264 +
265 # *****************************
266 # ** DO NOT EDIT THIS FILE **
267 # ***************************************************
268 diff --cc pym/portage/dbapi/vartree.py
269 index f84dbd5fc,b28b1c56c..d2c35f9e3
270 --- a/pym/portage/dbapi/vartree.py
271 +++ b/pym/portage/dbapi/vartree.py
272 @@@ -39,9 -39,7 +39,10 @@@ portage.proxy.lazyimport.lazyimport(glo
273 'portage.util._xattr:xattr',
274 'portage.util._dyn_libs.PreservedLibsRegistry:PreservedLibsRegistry',
275 'portage.util._dyn_libs.LinkageMapELF:LinkageMapELF@LinkageMap',
276 + 'portage.util._dyn_libs.LinkageMapMachO:LinkageMapMachO',
277 + 'portage.util._dyn_libs.LinkageMapPeCoff:LinkageMapPeCoff',
278 + 'portage.util._dyn_libs.LinkageMapXCoff:LinkageMapXCoff',
279 + 'portage.util._dyn_libs.NeededEntry:NeededEntry',
280 'portage.util._async.SchedulerInterface:SchedulerInterface',
281 'portage.util._eventloop.EventLoop:EventLoop',
282 'portage.util._eventloop.global_event_loop:global_event_loop',
283 diff --cc pym/portage/versions.py
284 index fb4996797,7b6a57673..7dc0ac0d6
285 --- a/pym/portage/versions.py
286 +++ b/pym/portage/versions.py
287 @@@ -50,9 -50,8 +50,10 @@@ _pkg =
288 "dots_allowed_in_PN": r'[\w+][\w+.-]*?',
289 }
290
291 - _v = r'(cvs\.)?(\d+)((\.\d+)*)([a-z]?)((_(pre|p|beta|alpha|rc)\d*)*)'
292 - # PREFIX hack: -r(\d+) -> -r(\d+|0\d+\.\d+) (see below)
293 + _v = r'(\d+)((\.\d+)*)([a-z]?)((_(pre|p|beta|alpha|rc)\d*)*)'
294 -_rev = r'\d+'
295 ++# PREFIX_LOCAL hack: -r(\d+) -> -r(\d+|0\d+\.\d+) (see below)
296 +_rev = r'(\d+|0\d+\.\d+)'
297 ++# END_PREFIX_LOCAL
298 _vr = _v + '(-r(' + _rev + '))?'
299
300 _cp = {
301 @@@ -257,39 -250,15 +252,41 @@@ def vercmp(ver1, ver2, silent=1)
302 if rval:
303 return rval
304
305 - # the suffix part is equal to, so finally check the revision
306 ++ # PREFIX_LOCAL
307 + # The suffix part is equal too, so finally check the revision
308 - # PREFIX hack: a revision starting with 0 is an 'inter-revision',
309 ++ # Prefix hack: a revision starting with 0 is an 'inter-revision',
310 + # which means that it is possible to create revisions on revisions.
311 + # An example is -r01.1 which is the first revision of -r1. Note
312 + # that a period (.) is used to separate the real revision and the
313 + # secondary revision number. This trick is in use to allow revision
314 + # bumps in ebuilds synced from the main tree for Prefix changes,
315 + # while still staying in the main tree versioning scheme.
316 - if match1.group(10):
317 - if match1.group(10)[0] == '0' and '.' in match1.group(10):
318 - t = match1.group(10)[1:].split(".")
319 + if match1.group(9):
320 - r1 = int(match1.group(9))
321 ++ if match1.group(9)[0] == '0' and '.' in match1.group(9):
322 ++ t = match1.group(9)[1:].split(".")
323 + r1 = int(t[0])
324 + r3 = int(t[1])
325 + else:
326 - r1 = int(match1.group(10))
327 ++ r1 = int(match1.group(9))
328 + r3 = 0
329 else:
330 r1 = 0
331 + r3 = 0
332 - if match2.group(10):
333 - if match2.group(10)[0] == '0' and '.' in match2.group(10):
334 - t = match2.group(10)[1:].split(".")
335 + if match2.group(9):
336 - r2 = int(match2.group(9))
337 ++ if match2.group(9)[0] == '0' and '.' in match2.group(9):
338 ++ t = match2.group(9)[1:].split(".")
339 + r2 = int(t[0])
340 + r4 = int(t[1])
341 + else:
342 - r2 = int(match2.group(10))
343 ++ r2 = int(match2.group(9))
344 + r4 = 0
345 ++ # END_PREFIX_LOCAL
346 else:
347 r2 = 0
348 + r4 = 0
349 + if r1 == r2 and (r3 != 0 or r4 != 0):
350 + r1 = r3
351 + r2 = r4
352 rval = (r1 > r2) - (r1 < r2)
353 return rval