commit: 70aab2af6ad556e45657745a2d4adf64ac23e5b9
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 12 08:19:10 2017 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Tue Dec 12 08:19:10 2017 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=70aab2af
Merge remote-tracking branch 'overlays-gentoo-org/master' into prefix
COPYING | 375 ++-----------
NEWS | 10 +
RELEASE-NOTES | 42 ++
bin/doins.py | 583 +++++++++++++++++++++
bin/ebuild-helpers/doins | 156 ++----
bin/phase-functions.sh | 2 +-
bin/phase-helpers.sh | 3 +-
bin/quickpkg | 15 +-
cnf/make.globals | 5 +-
man/portage.5 | 13 +-
pym/_emerge/BinpkgExtractorAsync.py | 4 +-
pym/_emerge/Package.py | 32 ++
pym/_emerge/Scheduler.py | 36 --
pym/_emerge/depgraph.py | 12 +-
pym/_emerge/main.py | 3 +-
pym/portage/_emirrordist/FetchTask.py | 2 +-
pym/portage/checksum.py | 9 +-
pym/portage/const.py | 29 +-
pym/portage/dbapi/__init__.py | 5 +
pym/portage/dbapi/bintree.py | 87 +--
pym/portage/dbapi/vartree.py | 42 +-
pym/portage/dep/_dnf.py | 90 ++++
pym/portage/dep/dep_check.py | 147 +++++-
pym/portage/emaint/modules/binhost/binhost.py | 10 +-
pym/portage/manifest.py | 37 +-
pym/portage/output.py | 2 +-
pym/portage/package/ebuild/_config/UseManager.py | 5 +-
pym/portage/package/ebuild/config.py | 10 +-
pym/portage/package/ebuild/digestgen.py | 7 +-
pym/portage/package/ebuild/doebuild.py | 17 +-
pym/portage/repository/config.py | 45 +-
pym/portage/sync/modules/git/git.py | 2 +-
pym/portage/sync/modules/rsync/rsync.py | 2 +-
pym/portage/tests/bin/test_doins.py | 352 +++++++++++++
pym/portage/tests/dbapi/test_fakedbapi.py | 20 +
pym/portage/tests/dep/test_dnf_convert.py | 48 ++
pym/portage/tests/dep/test_overlap_dnf.py | 28 +
pym/portage/tests/ebuild/test_config.py | 1 +
.../resolver/test_disjunctive_depend_order.py | 87 +++
.../tests/resolver/test_onlydeps_minimal.py | 5 +-
.../tests/resolver/test_or_downgrade_installed.py | 97 ++++
.../resolver/test_virtual_minimize_children.py | 145 +++++
pym/portage/tests/sync/test_sync_local.py | 2 +-
pym/portage/tests/versions/test_vercmp.py | 3 -
pym/portage/util/__init__.py | 6 +-
pym/portage/versions.py | 53 +-
repoman/RELEASE-NOTES | 12 +
repoman/pym/repoman/repos.py | 17 +-
repoman/pym/repoman/tests/simple/test_simple.py | 15 -
repoman/setup.py | 24 +-
setup.py | 10 +-
51 files changed, 2080 insertions(+), 684 deletions(-)
diff --cc bin/ebuild-helpers/doins
index 7690cab35,c3a57890a..04bfdd0d4
--- a/bin/ebuild-helpers/doins
+++ b/bin/ebuild-helpers/doins
@@@ -42,127 -41,49 +41,58 @@@ if [[ ${INSDESTTREE#${ED}} != "${INSDES
__helpers_die "${helper} used with \${D} or \${ED}"
exit 1
fi
+# PREFIX LOCAL: check for usage with EPREFIX
+if [[ ${INSDESTTREE#${EPREFIX}} != "${INSDESTTREE}" ]]; then
+ __vecho "-------------------------------------------------------" 1>&2
+ __vecho "You should not use \${EPREFIX} with helpers." 1>&2
+ __vecho " --> ${INSDESTTREE}" 1>&2
+ __vecho "-------------------------------------------------------" 1>&2
+ exit 1
+fi
+# END PREFIX LOCAL
if ___eapi_doins_and_newins_preserve_symlinks; then
- PRESERVE_SYMLINKS=y
- else
- PRESERVE_SYMLINKS=n
+ DOINS_ARGS+=( --preserve_symlinks )
fi
- export TMP=$(mktemp -d "${T}/.doins_tmp_XXXXXX")
- # Use separate directories to avoid potential name collisions.
- mkdir -p "$TMP"/{1,2}
-
- [[ ! -d ${ED}${INSDESTTREE} ]] && dodir "${INSDESTTREE}"
-
- _doins() {
- local mysrc="$1" mydir="$2" cleanup="" rval
-
- if [ -L "$mysrc" ] ; then
- # Our fake $DISTDIR contains symlinks that should
- # not be reproduced inside $D. In order to ensure
- # that things like dodoc "$DISTDIR"/foo.pdf work
- # as expected, we dereference symlinked files that
- # refer to absolute paths inside
- # $PORTAGE_ACTUAL_DISTDIR/.
- if [ $PRESERVE_SYMLINKS = y ] && \
- ! [[ $(readlink "$mysrc") ==
"$PORTAGE_ACTUAL_DISTDIR"/* ]] ; then
- rm -rf "${ED}$INSDESTTREE/$mydir/${mysrc##*/}" ||
return $?
- cp -P "$mysrc" "${ED}$INSDESTTREE/$mydir/${mysrc##*/}"
- return $?
- else
- cp "$mysrc" "$TMP/2/${mysrc##*/}" || return $?
- mysrc="$TMP/2/${mysrc##*/}"
- cleanup=$mysrc
- fi
- fi
+ if ___eapi_helpers_can_die; then
+ DOINS_ARGS+=( --helpers_can_die )
+ fi
- install ${INSOPTIONS} "${mysrc}" "${ED}${INSDESTTREE}/${mydir}"
- rval=$?
- [[ -n ${cleanup} ]] && rm -f "${cleanup}"
- [ $rval -ne 0 ] && echo "!!! ${helper}: $mysrc does not exist" 1>&2
- return $rval
- }
-
- _xdoins() {
- local -i failed=0
- while read -r -d $'\0' x ; do
- _doins "$x" "${x%/*}"
- ((failed|=$?))
- done
- return $failed
- }
-
- success=0
- failed=0
-
- for x in "$@" ; do
- if [[ $PRESERVE_SYMLINKS = n && -d $x ]] || \
- [[ $PRESERVE_SYMLINKS = y && -d $x && ! -L $x ]] ; then
- if [ "${DOINSRECUR}" == "n" ] ; then
- if [[ ${helper} == dodoc ]] ; then
- echo "!!! ${helper}: $x is a directory" 1>&2
- ((failed|=1))
- fi
- continue
- fi
-
- while [ "$x" != "${x%/}" ] ; do
- x=${x%/}
- done
- if [ "$x" = "${x%/*}" ] ; then
- pushd "$PWD" >/dev/null
- else
- pushd "${x%/*}" >/dev/null
- fi
- x=${x##*/}
- x_orig=$x
- # Follow any symlinks recursively until we've got
- # a normal directory for 'find' to traverse. The
- # name of the symlink will be used for the name
- # of the installed directory, as discussed in
- # bug #239529.
- while [ -L "$x" ] ; do
- pushd "$(readlink "$x")" >/dev/null
- x=${PWD##*/}
- pushd "${PWD%/*}" >/dev/null
- done
- if [[ $x != $x_orig ]] ; then
- mv "$x" "$TMP/1/$x_orig"
- pushd "$TMP/1" >/dev/null
- fi
- find "$x_orig" -type d -exec dodir "${INSDESTTREE}/{}" \;
- find "$x_orig" \( -type f -or -type l \) -print0 | _xdoins
- if [[ ${PIPESTATUS[1]} -eq 0 ]] ; then
- # NOTE: Even if only an empty directory is installed
here, it
- # still counts as success, since an empty directory
given as
- # an argument to doins -r should not trigger failure.
- ((success|=1))
- else
- ((failed|=1))
- fi
- if [[ $x != $x_orig ]] ; then
- popd >/dev/null
- mv "$TMP/1/$x_orig" "$x"
- fi
- while popd >/dev/null 2>&1 ; do true ; done
- else
- _doins "${x}"
- if [[ $? -eq 0 ]] ; then
- ((success|=1))
- else
- ((failed|=1))
- fi
- fi
- done
- rm -rf "$TMP"
- [[ $failed -ne 0 || $success -eq 0 ]] && { __helpers_die "${helper} failed";
exit 1; } || exit 0
+ if [[ -n "${INSOPTIONS}" ]]; then
+ DOINS_ARGS+=( "--insoptions=${INSOPTIONS}" )
+ fi
+
+ if [[ -n "${DIROPTIONS}" ]]; then
+ DOINS_ARGS+=( "--diroptions=${DIROPTIONS}" )
+ fi
+
+ if [[ -n "${PORTAGE_ACTUAL_DISTDIR}" ]]; then
+ DOINS_ARGS+=( "--distdir=${PORTAGE_ACTUAL_DISTDIR}" )
+ fi
+
+ if [[ "${DOINSSTRICTOPTION}" == 1 ]]; then
+ DOINS_ARGS+=( --strict_option )
+ fi
+
+ if has xattr ${FEATURES}; then
+ DOINS_ARGS+=(
+ --enable_copy_xattr
+ "--xattr_exclude=${PORTAGE_XATTR_EXCLUDE}"
+ )
+ fi
+
+ DOINS_ARGS+=(
+ "--helper=${helper}"
+ "--dest=${ED}${INSDESTTREE}"
+ )
+
+ # Explicitly set PYTHONPATH to non empty.
+ # If PYTHONPATH is empty (not unset), it means "add current working directory
+ # to the import path" if the Python is prior to 3.4, which would cause
+ # unexpected import. See also #469338.
+
PYTHONPATH="${PORTAGE_PYM_PATH:-/usr/lib/portage/pym}${PYTHONPATH:+:}${PYTHONPATH}"
\
+ "${PORTAGE_PYTHON:-/usr/bin/python}" \
+ "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/doins.py \
+ "${DOINS_ARGS[@]}" -- "$@" || \
+ { __helpers_die "${helper} failed"; exit 1; }
diff --cc cnf/make.globals
index d422ca639,08a37a534..131c5076d
--- a/cnf/make.globals
+++ b/cnf/make.globals
@@@ -150,23 -127,12 +150,26 @@@ PORTAGE_GPG_SIGNING_COMMAND="gpg --sig
# security.* attributes may be special (see bug 461868), but
# security.capability is specifically not excluded (bug 548516).
# system.nfs4_acl attributes are irrelevant, see bug #475496.
+ # user.* attributes are not supported on tmpfs (bug 640290), but
+ # user.pax.* is supported with the patch from bug 470644.
PORTAGE_XATTR_EXCLUDE="btrfs.* security.evm security.ima
- security.selinux system.nfs4_acl"
+ security.selinux system.nfs4_acl user.apache_handler
+ user.Beagle.* user.dublincore.* user.mime_encoding user.xdg.*"
+# Writeable paths for Mac OS X seatbelt sandbox
+#
+# If path ends in a slash (/), access will recursively be allowed to directory
+# contents (using a regex), not the directory itself. Without a slash, access
+# to the directory or file itself will be allowed (using a literal), so it can
+# be created, removed and changed. If both is needed, the directory needs to
be
+# given twice, once with and once without the slash. Obviously this only makes
+# sense for directories, not files.
+#
+# An empty value for either variable will disable all restrictions on the
+# corresponding operation.
+MACOSSANDBOX_PATHS="/dev/fd/ /private/tmp/ /private/var/tmp/
@@PORTAGE_BUILDDIR@@/ @@PORTAGE_ACTUAL_DISTDIR@@/"
+MACOSSANDBOX_PATHS_CONTENT_ONLY="/dev/null /dev/dtracehelper /dev/tty
/private/var/run/syslog"
+
# *****************************
# ** DO NOT EDIT THIS FILE **
# ***************************************************
diff --cc pym/portage/dbapi/vartree.py
index f84dbd5fc,b28b1c56c..d2c35f9e3
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@@ -39,9 -39,7 +39,10 @@@ portage.proxy.lazyimport.lazyimport(glo
'portage.util._xattr:xattr',
'portage.util._dyn_libs.PreservedLibsRegistry:PreservedLibsRegistry',
'portage.util._dyn_libs.LinkageMapELF:LinkageMapELF@LinkageMap',
+ 'portage.util._dyn_libs.LinkageMapMachO:LinkageMapMachO',
+ 'portage.util._dyn_libs.LinkageMapPeCoff:LinkageMapPeCoff',
+ 'portage.util._dyn_libs.LinkageMapXCoff:LinkageMapXCoff',
+ 'portage.util._dyn_libs.NeededEntry:NeededEntry',
'portage.util._async.SchedulerInterface:SchedulerInterface',
'portage.util._eventloop.EventLoop:EventLoop',
'portage.util._eventloop.global_event_loop:global_event_loop',
diff --cc pym/portage/versions.py
index fb4996797,7b6a57673..7dc0ac0d6
--- a/pym/portage/versions.py
+++ b/pym/portage/versions.py
@@@ -50,9 -50,8 +50,10 @@@ _pkg =
"dots_allowed_in_PN": r'[\w+][\w+.-]*?',
}
- _v = r'(cvs\.)?(\d+)((\.\d+)*)([a-z]?)((_(pre|p|beta|alpha|rc)\d*)*)'
- # PREFIX hack: -r(\d+) -> -r(\d+|0\d+\.\d+) (see below)
+ _v = r'(\d+)((\.\d+)*)([a-z]?)((_(pre|p|beta|alpha|rc)\d*)*)'
-_rev = r'\d+'
++# PREFIX_LOCAL hack: -r(\d+) -> -r(\d+|0\d+\.\d+) (see below)
+_rev = r'(\d+|0\d+\.\d+)'
++# END_PREFIX_LOCAL
_vr = _v + '(-r(' + _rev + '))?'
_cp = {
@@@ -257,39 -250,15 +252,41 @@@ def vercmp(ver1, ver2, silent=1)
if rval:
return rval
- # the suffix part is equal to, so finally check the revision
++ # PREFIX_LOCAL
+ # The suffix part is equal too, so finally check the revision
- # PREFIX hack: a revision starting with 0 is an 'inter-revision',
++ # Prefix hack: a revision starting with 0 is an 'inter-revision',
+ # which means that it is possible to create revisions on revisions.
+ # An example is -r01.1 which is the first revision of -r1. Note
+ # that a period (.) is used to separate the real revision and the
+ # secondary revision number. This trick is in use to allow revision
+ # bumps in ebuilds synced from the main tree for Prefix changes,
+ # while still staying in the main tree versioning scheme.
- if match1.group(10):
- if match1.group(10)[0] == '0' and '.' in match1.group(10):
- t = match1.group(10)[1:].split(".")
+ if match1.group(9):
- r1 = int(match1.group(9))
++ if match1.group(9)[0] == '0' and '.' in match1.group(9):
++ t = match1.group(9)[1:].split(".")
+ r1 = int(t[0])
+ r3 = int(t[1])
+ else:
- r1 = int(match1.group(10))
++ r1 = int(match1.group(9))
+ r3 = 0
else:
r1 = 0
+ r3 = 0
- if match2.group(10):
- if match2.group(10)[0] == '0' and '.' in match2.group(10):
- t = match2.group(10)[1:].split(".")
+ if match2.group(9):
- r2 = int(match2.group(9))
++ if match2.group(9)[0] == '0' and '.' in match2.group(9):
++ t = match2.group(9)[1:].split(".")
+ r2 = int(t[0])
+ r4 = int(t[1])
+ else:
- r2 = int(match2.group(10))
++ r2 = int(match2.group(9))
+ r4 = 0
++ # END_PREFIX_LOCAL
else:
r2 = 0
+ r4 = 0
+ if r1 == r2 and (r3 != 0 or r4 != 0):
+ r1 = r3
+ r2 = r4
rval = (r1 > r2) - (r1 < r2)
return rval