public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Fabian Groffen" <grobian@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:prefix commit in: /
Date: Fri,  6 Jul 2012 07:05:53 +0000 (UTC)	[thread overview]
Message-ID: <1341558143.f028e1bfb2b97990b558b0c1a8782838aeae175c.grobian@gentoo> (raw)

commit:     f028e1bfb2b97990b558b0c1a8782838aeae175c
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Fri Jul  6 07:02:23 2012 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Fri Jul  6 07:02:23 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=f028e1bf

Merge remote-tracking branch 'overlays-gentoo-org/master' into prefix

Conflicts:
	bin/dohtml.py
	bin/ebuild
	bin/ebuild-helpers/ecompressdir
	bin/ebuild-helpers/prepstrip
	bin/ebuild-ipc.py
	bin/egencache
	bin/emaint
	bin/emerge
	bin/misc-functions.sh
	bin/quickpkg
	pym/_emerge/actions.py
	pym/portage/dbapi/vartree.py
	pym/portage/dispatch_conf.py


 NEWS                                               |    9 +
 RELEASE-NOTES                                      |   12 +
 bin/dohtml.py                                      |   49 +-
 bin/ebuild                                         |   19 +-
 bin/ebuild-helpers/ecompressdir                    |   50 +-
 bin/ebuild-helpers/prepstrip                       |  115 ++-
 bin/ebuild-ipc.py                                  |   11 +-
 bin/ebuild.sh                                      |   35 +-
 bin/egencache                                      |   18 +-
 bin/emaint                                         |    9 +-
 bin/emerge                                         |   11 +-
 bin/helper-functions.sh                            |   90 ++
 bin/isolated-functions.sh                          |    8 +-
 bin/misc-functions.sh                              |   78 +-
 bin/quickpkg                                       |   15 +-
 bin/repoman                                        |   81 +-
 bin/save-ebuild-env.sh                             |    6 +-
 cnf/make.globals                                   |   13 +-
 doc/package/ebuild.docbook                         |    1 +
 doc/package/ebuild/eapi/4-python.docbook           |  218 ++--
 doc/package/ebuild/eapi/4-slot-abi.docbook         |   70 ++
 doc/portage.docbook                                |    1 +
 man/ebuild.5                                       |    6 +-
 man/emerge.1                                       |   39 +-
 man/make.conf.5                                    |   62 +-
 man/portage.5                                      |   26 +-
 man/repoman.1                                      |   20 +-
 pym/_emerge/AtomArg.py                             |    5 +-
 pym/_emerge/BlockerCache.py                        |    9 +-
 pym/_emerge/Dependency.py                          |    2 +-
 pym/_emerge/DependencyArg.py                       |   14 +-
 pym/_emerge/EbuildMetadataPhase.py                 |  105 ++-
 pym/_emerge/EbuildPhase.py                         |   17 +-
 pym/_emerge/FakeVartree.py                         |   34 +-
 pym/_emerge/MetadataRegen.py                       |    8 +-
 pym/_emerge/Package.py                             |  129 ++-
 pym/_emerge/PollScheduler.py                       |   27 +-
 pym/_emerge/QueueScheduler.py                      |    4 +-
 pym/_emerge/Scheduler.py                           |    7 +-
 pym/_emerge/SetArg.py                              |    5 +-
 pym/_emerge/TaskScheduler.py                       |    6 +-
 pym/_emerge/actions.py                             |   74 +-
 pym/_emerge/create_depgraph_params.py              |   14 +
 pym/_emerge/depgraph.py                            | 1236 +++++++++++++-------
 pym/_emerge/main.py                                |   38 +-
 pym/_emerge/resolver/backtracking.py               |   36 +-
 pym/_emerge/resolver/output.py                     |   25 +-
 pym/_emerge/resolver/slot_collision.py             |   44 +-
 pym/_emerge/unmerge.py                             |   22 +-
 pym/portage/__init__.py                            |   39 +-
 pym/portage/_sets/__init__.py                      |   12 +-
 pym/portage/_sets/dbapi.py                         |   14 +-
 pym/portage/_sets/files.py                         |   13 +-
 pym/portage/_sets/security.py                      |    8 +-
 pym/portage/cache/fs_template.py                   |   22 +-
 pym/portage/cache/sqlite.py                        |   42 +-
 pym/portage/cache/template.py                      |   14 +-
 pym/portage/const.py                               |   30 +-
 pym/portage/dbapi/__init__.py                      |   92 +-
 pym/portage/dbapi/bintree.py                       |   41 +-
 pym/portage/dbapi/porttree.py                      |  120 +--
 pym/portage/dbapi/vartree.py                       |  219 +++-
 pym/portage/dbapi/virtual.py                       |   55 +-
 pym/portage/dep/__init__.py                        |  571 ++++++---
 pym/portage/dep/_slot_abi.py                       |   92 ++
 pym/portage/dep/dep_check.py                       |   51 +-
 pym/portage/dispatch_conf.py                       |   10 +-
 pym/portage/eapi.py                                |   44 +
 pym/portage/getbinpkg.py                           |   19 +-
 pym/portage/glsa.py                                |   15 +-
 .../package/ebuild/_config/KeywordsManager.py      |   21 +-
 .../package/ebuild/_config/LicenseManager.py       |    9 +-
 .../package/ebuild/_config/LocationsManager.py     |   71 +-
 pym/portage/package/ebuild/_config/UseManager.py   |   12 +-
 pym/portage/package/ebuild/_config/helper.py       |    4 +-
 .../package/ebuild/_config/special_env_vars.py     |   13 +-
 pym/portage/package/ebuild/_eapi_invalid.py        |   54 +
 pym/portage/package/ebuild/_ipc/QueryCommand.py    |   10 +-
 pym/portage/package/ebuild/config.py               |  143 ++-
 pym/portage/package/ebuild/doebuild.py             |  180 ++--
 pym/portage/package/ebuild/fetch.py                |    7 +-
 pym/portage/package/ebuild/getmaskingstatus.py     |   16 +-
 pym/portage/repository/config.py                   |   32 +-
 pym/portage/tests/dbapi/test_fakedbapi.py          |    7 +-
 pym/portage/tests/dep/testAtom.py                  |   19 +
 pym/portage/tests/dep/testStandalone.py            |    5 +-
 pym/portage/tests/dep/test_isvalidatom.py          |    9 +
 pym/portage/tests/dep/test_match_from_list.py      |   31 +-
 pym/portage/tests/ebuild/test_config.py            |    4 +-
 pym/portage/tests/emerge/test_emerge_slot_abi.py   |  201 ++++
 pym/portage/tests/emerge/test_simple.py            |    6 +-
 pym/portage/tests/repoman/test_echangelog.py       |  110 ++
 pym/portage/tests/resolver/ResolverPlayground.py   |   57 +-
 pym/portage/tests/resolver/test_autounmask.py      |   17 +-
 pym/portage/tests/resolver/test_complete_graph.py  |    4 +-
 pym/portage/tests/resolver/test_merge_order.py     |    6 +-
 pym/portage/tests/resolver/test_simple.py          |   23 +-
 pym/portage/tests/resolver/test_slot_abi.py        |  376 ++++++
 .../tests/resolver/test_slot_abi_downgrade.py      |  225 ++++
 pym/portage/tests/resolver/test_slot_collisions.py |   12 +
 pym/portage/tests/runTests                         |   11 +-
 pym/portage/tests/util/test_digraph.py             |   50 +-
 pym/portage/tests/util/test_stackLists.py          |    4 +-
 pym/portage/util/__init__.py                       |   64 +-
 pym/portage/util/_desktop_entry.py                 |   75 ++
 pym/portage/util/_eventloop/EventLoop.py           |   50 +-
 pym/portage/util/_urlopen.py                       |   42 +
 pym/portage/util/digraph.py                        |   15 +-
 pym/portage/util/movefile.py                       |    6 +-
 pym/portage/versions.py                            |  215 +++-
 pym/portage/xml/metadata.py                        |   10 +-
 pym/portage/xpak.py                                |   10 +-
 pym/repoman/checks.py                              |  320 ++++--
 pym/repoman/errors.py                              |    1 -
 pym/repoman/herdbase.py                            |    6 +-
 pym/repoman/utilities.py                           |   68 +-
 runtests.sh                                        |    2 +-
 117 files changed, 5210 insertions(+), 1879 deletions(-)

diff --cc bin/dohtml.py
index 18095bd,3e80ef5..59d388b
--- a/bin/dohtml.py
+++ b/bin/dohtml.py
@@@ -1,5 -1,5 +1,5 @@@
 -#!/usr/bin/python
 +#!@PREFIX_PORTAGE_PYTHON@
- # Copyright 1999-2006 Gentoo Foundation
+ # Copyright 1999-2012 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
  #
diff --cc bin/ebuild
index 599cc6c,65e5bef..04cb4c6
--- a/bin/ebuild
+++ b/bin/ebuild
@@@ -1,5 -1,5 +1,5 @@@
 -#!/usr/bin/python -O
 +#!@PREFIX_PORTAGE_PYTHON@ -O
- # Copyright 1999-2011 Gentoo Foundation
+ # Copyright 1999-2012 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
  from __future__ import print_function
diff --cc bin/ebuild-helpers/ecompressdir
index 58c410e,6801a07..bf76b1f
--- a/bin/ebuild-helpers/ecompressdir
+++ b/bin/ebuild-helpers/ecompressdir
@@@ -2,7 -2,7 +2,7 @@@
  # Copyright 1999-2011 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
- source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/helper-functions.sh
++source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/helper-functions.sh
  
  if [[ -z $1 ]] ; then
  	helpers_die "${0##*/}: at least one argument needed"
diff --cc bin/ebuild-helpers/prepstrip
index 0042abe,85d5d6a..22cb72e
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@@ -1,8 -1,8 +1,8 @@@
 -#!/bin/bash
 +#!@PORTAGE_BASH@
- # Copyright 1999-2011 Gentoo Foundation
+ # Copyright 1999-2012 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
- source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/helper-functions.sh
++source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/helper-functions.sh
  
  # avoid multiple calls to `has`.  this creates things like:
  #   FEATURES_foo=false
diff --cc bin/ebuild-ipc.py
index f95bac8,3caf2d1..7533c8c
--- a/bin/ebuild-ipc.py
+++ b/bin/ebuild-ipc.py
@@@ -1,5 -1,5 +1,5 @@@
 -#!/usr/bin/python
 +#!@PREFIX_PORTAGE_PYTHON@
- # Copyright 2010-2011 Gentoo Foundation
+ # Copyright 2010-2012 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  #
  # This is a helper which ebuild processes can use
diff --cc bin/egencache
index 01f8e1d,a75a341..5edb180
--- a/bin/egencache
+++ b/bin/egencache
@@@ -1,5 -1,5 +1,5 @@@
 -#!/usr/bin/python
 +#!@PREFIX_PORTAGE_PYTHON@
- # Copyright 2009-2011 Gentoo Foundation
+ # Copyright 2009-2012 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
  from __future__ import print_function
@@@ -42,8 -42,7 +42,8 @@@ from portage.manifest import guessManif
  from portage.util import cmp_sort_key, writemsg_level
  from portage import cpv_getkey
  from portage.dep import Atom, isjustname
- from portage.versions import pkgcmp, pkgsplit, vercmp
+ from portage.versions import pkgsplit, vercmp
 +from portage.const import EPREFIX
  
  try:
  	from xml.etree import ElementTree
diff --cc bin/emaint
index 91d68d5,cf2ccb8..4d8b4f3
--- a/bin/emaint
+++ b/bin/emaint
@@@ -1,5 -1,6 +1,6 @@@
 -#!/usr/bin/python -O
 +#!@PREFIX_PORTAGE_PYTHON@ -O
- # vim: noet :
+ # Copyright 2005-2012 Gentoo Foundation
+ # Distributed under the terms of the GNU General Public License v2
  
  from __future__ import print_function
  
diff --cc bin/emerge
index 324f673,a9a5643..85154fb
--- a/bin/emerge
+++ b/bin/emerge
@@@ -1,5 -1,5 +1,5 @@@
 -#!/usr/bin/python
 +#!@PREFIX_PORTAGE_PYTHON@
- # Copyright 2006-2011 Gentoo Foundation
+ # Copyright 2006-2012 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
  from __future__ import print_function
@@@ -26,16 -27,21 +27,22 @@@ except KeyboardInterrupt
  def debug_signal(signum, frame):
  	import pdb
  	pdb.set_trace()
- signal.signal(signal.SIGUSR1, debug_signal)
+ 
+ if platform.python_implementation() == 'Jython':
+ 	debug_signum = signal.SIGUSR2 # bug #424259
+ else:
+ 	debug_signum = signal.SIGUSR1
+ 
+ signal.signal(debug_signum, debug_signal)
  
 -try:
 -	from _emerge.main import emerge_main
 -except ImportError:
 -	from os import path as osp
 -	import sys
 -	sys.path.insert(0, osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), "pym"))
 -	from _emerge.main import emerge_main
 +# for an explanation on this logic, see pym/_emerge/__init__.py
 +from os import environ as ose
 +from os import path as osp
 +if ose.__contains__("PORTAGE_PYTHONPATH"):
 +    sys.path.insert(0, ose["PORTAGE_PYTHONPATH"])
 +else:
 +    sys.path.insert(0, osp.join(osp.dirname(osp.dirname(osp.                    realpath(__file__))), "pym"))
 +from _emerge.main import emerge_main
  
  if __name__ == "__main__":
  	import sys
diff --cc bin/misc-functions.sh
index a7a18e2,9eec8bb..496c2d7
mode 100644,100755..100644
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@@ -153,11 -150,9 +153,11 @@@ prepcompress() 
  install_qa_check() {
  	local f i qa_var x
  	[[ " ${FEATURES} " == *" force-prefix "* ]] || \
- 		case "$EAPI" in 0|1|2) local ED=${D} ;; esac
+ 		case "$EAPI" in 0|1|2) local EPREFIX= ED=${D} ;; esac
  
 -	cd "${ED}" || die "cd failed"
 +	# PREFIX LOCAL: ED needs not to exist, whereas D does
 +	cd "${D}" || die "cd failed"
 +	# END PREFIX LOCAL
  
  	# Merge QA_FLAGS_IGNORED and QA_DT_HASH into a single array, since
  	# QA_DT_HASH is deprecated.
@@@ -276,7 -271,7 +276,9 @@@
  	fi
  
  	# Now we look for all world writable files.
--	local unsafe_files=$(find "${ED}" -type f -perm -2 | sed -e "s:^${ED}:- :")
++	# PREFIX LOCAL: keep offset in the paths
++	local unsafe_files=$(find "${ED}" -type f -perm -2 | sed -e "s:^${D}:- :")
++	# END PREFIX LOCAL
  	if [[ -n ${unsafe_files} ]] ; then
  		vecho "QA Security Notice: world writable file(s):"
  		vecho "${unsafe_files}"
@@@ -586,12 -509,36 +551,40 @@@ install_qa_check_elf() 
  
  		PORTAGE_QUIET=${tmp_quiet}
  	fi
+ 
+ 	# Create NEEDED.ELF.2 regardless of RESTRICT=binchecks, since this info is
+ 	# too useful not to have (it's required for things like preserve-libs), and
+ 	# it's tempting for ebuild authors to set RESTRICT=binchecks for packages
+ 	# containing pre-built binaries.
+ 	if type -P scanelf > /dev/null ; then
+ 		# Save NEEDED information after removing self-contained providers
+ 		rm -f "$PORTAGE_BUILDDIR"/build-info/NEEDED{,.ELF.2}
+ 		scanelf -qyRF '%a;%p;%S;%r;%n' "${D}" | { while IFS= read -r l; do
+ 			arch=${l%%;*}; l=${l#*;}
+ 			obj="/${l%%;*}"; l=${l#*;}
+ 			soname=${l%%;*}; l=${l#*;}
+ 			rpath=${l%%;*}; l=${l#*;}; [ "${rpath}" = "  -  " ] && rpath=""
+ 			needed=${l%%;*}; l=${l#*;}
+ 			echo "${obj} ${needed}"	>> "${PORTAGE_BUILDDIR}"/build-info/NEEDED
+ 			echo "${arch:3};${obj};${soname};${rpath};${needed}" >> "${PORTAGE_BUILDDIR}"/build-info/NEEDED.ELF.2
+ 		done }
+ 
+ 		[ -n "${QA_SONAME_NO_SYMLINK}" ] && \
+ 			echo "${QA_SONAME_NO_SYMLINK}" > \
+ 			"${PORTAGE_BUILDDIR}"/build-info/QA_SONAME_NO_SYMLINK
+ 
+ 		if has binchecks ${RESTRICT} && \
+ 			[ -s "${PORTAGE_BUILDDIR}/build-info/NEEDED.ELF.2" ] ; then
+ 			eqawarn "QA Notice: RESTRICT=binchecks prevented checks on these ELF files:"
+ 			eqawarn "$(while read -r x; do x=${x#*;} ; x=${x%%;*} ; echo "${x#${EPREFIX}}" ; done < "${PORTAGE_BUILDDIR}"/build-info/NEEDED.ELF.2)"
+ 		fi
+ 	fi
 +}
  
 -	local unsafe_files=$(find "${ED}" -type f '(' -perm -2002 -o -perm -4002 ')' | sed -e "s:^${ED}:/:")
 +install_qa_check_misc() {
 +	# PREFIX LOCAL: keep offset prefix in the reported files
 +	local unsafe_files=$(find "${ED}" -type f '(' -perm -2002 -o -perm -4002 ')' | sed -e "s:^${D}:/:")
 +	# END PREFIX LOCAL
  	if [[ -n ${unsafe_files} ]] ; then
  		eqawarn "QA Notice: Unsafe files detected (set*id and world writable)"
  		eqawarn "${unsafe_files}"
diff --cc bin/quickpkg
index fb7f874,a6bd4d4..83c0d7b
--- a/bin/quickpkg
+++ b/bin/quickpkg
@@@ -1,5 -1,5 +1,5 @@@
 -#!/usr/bin/python
 +#!@PREFIX_PORTAGE_PYTHON@
- # Copyright 1999-2010 Gentoo Foundation
+ # Copyright 1999-2012 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
  from __future__ import print_function
diff --cc cnf/make.globals
index 2e2171d,db97d8b..7e61325
--- a/cnf/make.globals
+++ b/cnf/make.globals
@@@ -141,12 -123,12 +146,12 @@@ PORTAGE_WORKDIR_MODE="0700
  PORTAGE_ELOG_CLASSES="log warn error"
  PORTAGE_ELOG_SYSTEM="save_summary echo"
  
 -PORTAGE_ELOG_MAILURI="root"
 +PORTAGE_ELOG_MAILURI="@rootuser@"
  PORTAGE_ELOG_MAILSUBJECT="[portage] ebuild log for \${PACKAGE} on \${HOST}"
 -PORTAGE_ELOG_MAILFROM="portage@localhost"
 +PORTAGE_ELOG_MAILFROM="@portageuser@@localhost"
  
  # Signing command used by repoman
- PORTAGE_GPG_SIGNING_COMMAND="gpg --sign --clearsign --yes --default-key \"\${PORTAGE_GPG_KEY}\" --homedir \"\${PORTAGE_GPG_DIR}\" \"\${FILE}\""
+ PORTAGE_GPG_SIGNING_COMMAND="gpg --sign --digest-algo SHA512 --clearsign --yes --default-key \"\${PORTAGE_GPG_KEY}\" --homedir \"\${PORTAGE_GPG_DIR}\" \"\${FILE}\""
  
  #            *****************************
  #            **  DO NOT EDIT THIS FILE  **
diff --cc pym/_emerge/Package.py
index f818951,14d0694..228cd96
--- a/pym/_emerge/Package.py
+++ b/pym/_emerge/Package.py
@@@ -8,12 -8,11 +8,12 @@@ from portage import _encodings, _unicod
  from portage.cache.mappings import slot_dict_class
  from portage.const import EBUILD_PHASES
  from portage.dep import Atom, check_required_use, use_reduce, \
- 	paren_enclose, _slot_re, _slot_separator, _repo_separator
- from portage.eapi import eapi_has_iuse_defaults, eapi_has_required_use
+ 	paren_enclose, _slot_separator, _repo_separator
+ from portage.versions import _pkg_str, _unknown_repo
+ from portage.eapi import _get_eapi_attrs
  from portage.exception import InvalidDependString
- from portage.repository.config import _gen_valid_repo
  from _emerge.Task import Task
 +from portage.const import EPREFIX
  
  if sys.hexversion >= 0x3000000:
  	basestring = str
diff --cc pym/_emerge/actions.py
index eb74085,af42828..2135f09
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@@ -28,10 -28,10 +28,11 @@@ portage.proxy.lazyimport.lazyimport(glo
  from portage.localization import _
  from portage import os
  from portage import shutil
- from portage import _unicode_decode
+ from portage import eapi_is_supported, _unicode_decode
  from portage.cache.cache_errors import CacheError
- from portage.const import GLOBAL_CONFIG_PATH, EPREFIX
- from portage.const import _ENABLE_DYN_LINK_MAP, _ENABLE_SET_CONFIG
++from portage.const import EPREFIX
+ from portage.const import GLOBAL_CONFIG_PATH
+ from portage.const import _ENABLE_DYN_LINK_MAP
  from portage.dbapi.dep_expand import dep_expand
  from portage.dbapi._expand_new_virt import expand_new_virt
  from portage.dep import Atom, extended_cp_match
diff --cc pym/portage/_sets/files.py
index 7992b82,b891ea4..69bdc0d
--- a/pym/portage/_sets/files.py
+++ b/pym/portage/_sets/files.py
@@@ -1,6 -1,7 +1,6 @@@
- # Copyright 2007-2011 Gentoo Foundation
+ # Copyright 2007-2012 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
 -import errno
  import re
  from itertools import chain
  
diff --cc pym/portage/const.py
index cd8ecfb,ceef5c5..267798c
--- a/pym/portage/const.py
+++ b/pym/portage/const.py
@@@ -1,12 -1,7 +1,12 @@@
  # portage: Constants
- # Copyright 1998-2011 Gentoo Foundation
+ # Copyright 1998-2012 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
 +# ===========================================================================
 +# autotool supplied constants.
 +# ===========================================================================
 +from portage.const_autotool import *
 +
  import os
  
  # ===========================================================================
@@@ -125,10 -90,10 +125,11 @@@ SUPPORTED_FEATURES       = frozenset(
                             "ccache", "chflags", "clean-logs",
                             "collision-protect", "compress-build-logs", "compressdebug",
                             "config-protect-if-modified",
-                            "digest", "distcc", "distcc-pump", "distlocks", "ebuild-locks", "fakeroot",
+                            "digest", "distcc", "distcc-pump", "distlocks",
+                            "downgrade-backup", "ebuild-locks", "fakeroot",
                             "fail-clean", "force-mirror", "force-prefix", "getbinpkg",
                             "installsources", "keeptemp", "keepwork", "fixlafiles", "lmirror",
 +                            "macossandbox", "macosprefixsandbox", "macosusersandbox",
                             "metadata-transfer", "mirror", "multilib-strict", "news",
                             "noauto", "noclean", "nodoc", "noinfo", "noman",
                             "nostrip", "notitles", "parallel-fetch", "parallel-install",
diff --cc pym/portage/dbapi/bintree.py
index 77ab4df,1048cc1..170ed18
--- a/pym/portage/dbapi/bintree.py
+++ b/pym/portage/dbapi/bintree.py
@@@ -23,9 -23,8 +23,9 @@@ from portage.cache.mappings import slot
  from portage.const import CACHE_PATH
  from portage.dbapi.virtual import fakedbapi
  from portage.dep import Atom, use_reduce, paren_enclose
- from portage.exception import AlarmSignal, InvalidPackageName, \
+ from portage.exception import AlarmSignal, InvalidData, InvalidPackageName, \
  	PermissionDenied, PortageException
 +from portage.const import EAPI
  from portage.localization import _
  from portage import _movefile
  from portage import os
diff --cc pym/portage/dbapi/vartree.py
index 340de4c,fbf2e74..109545a
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@@ -30,11 -32,8 +32,11 @@@ portage.proxy.lazyimport.lazyimport(glo
  	'portage.util.movefile:movefile',
  	'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.versions:best,catpkgsplit,catsplit,cpv_getkey,pkgcmp,' + \
- 		'_pkgsplit@pkgsplit',
+ 	'portage.versions:best,catpkgsplit,catsplit,cpv_getkey,vercmp,' + \
+ 		'_pkgsplit@pkgsplit,_pkg_str',
  	'subprocess',
  	'tarfile',
  )
@@@ -89,8 -90,10 +93,11 @@@ except ImportError
  if sys.hexversion >= 0x3000000:
  	basestring = str
  	long = int
+ 	_unicode = str
+ else:
+ 	_unicode = unicode
  
 +
  class vardbapi(dbapi):
  
  	_excluded_dirs = ["CVS", "lost+found"]
diff --cc pym/portage/dispatch_conf.py
index 2ab7301,4c68dfc..7729195
--- a/pym/portage/dispatch_conf.py
+++ b/pym/portage/dispatch_conf.py
@@@ -13,8 -13,7 +13,8 @@@ import os, shutil, subprocess, sy
  import portage
  from portage.env.loaders import KeyValuePairFileLoader
  from portage.localization import _
- from portage.util import varexpand
+ from portage.util import shlex_split, varexpand
 +from portage.const import EPREFIX
  
  RCS_BRANCH = '1.1.1'
  RCS_LOCK = 'rcs -ko -M -l'
diff --cc pym/portage/package/ebuild/doebuild.py
index f35777a,09062f9..2322746
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@@ -32,11 -33,10 +34,11 @@@ portage.proxy.lazyimport.lazyimport(glo
  
  from portage import auxdbkeys, bsd_chflags, \
  	eapi_is_supported, merge, os, selinux, shutil, \
- 	unmerge, _encodings, _parse_eapi_ebuild_head, _os_merge, \
+ 	unmerge, _encodings, _os_merge, \
  	_shell_quote, _unicode_decode, _unicode_encode
  from portage.const import EBUILD_SH_ENV_FILE, EBUILD_SH_ENV_DIR, \
 -	EBUILD_SH_BINARY, INVALID_ENV_FILE, MISC_SH_BINARY
 +	EBUILD_SH_BINARY, INVALID_ENV_FILE, MISC_SH_BINARY, \
 +	EPREFIX, MACOSSANDBOX_PROFILE
  from portage.data import portage_gid, portage_uid, secpass, \
  	uid, userpriv_groups
  from portage.dbapi.porttree import _parse_uri_map
diff --cc pym/portage/tests/runTests
index 223a8cc,91984a3..afb967c
--- a/pym/portage/tests/runTests
+++ b/pym/portage/tests/runTests
@@@ -1,6 -1,6 +1,6 @@@
 -#!/usr/bin/python -Wd
 +#!/usr/bin/env python
  # runTests.py -- Portage Unit Test Functionality
- # Copyright 2006 Gentoo Foundation
+ # Copyright 2006-2012 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
  import os, sys
diff --cc pym/portage/versions.py
index f0619be,5893096..81f7559
--- a/pym/portage/versions.py
+++ b/pym/portage/versions.py
@@@ -26,16 -39,27 +39,28 @@@ _cat = r'[\w+][\w+.-]*
  # 2.1.2 A package name may contain any of the characters [A-Za-z0-9+_-].
  # It must not begin with a hyphen,
  # and must not end in a hyphen followed by one or more digits.
- _pkg = r'[\w+][\w+-]*?'
+ _pkg = {
+ 	"dots_disallowed_in_PN": r'[\w+][\w+-]*?',
+ 	"dots_allowed_in_PN":    r'[\w+][\w+.-]*?',
+ }
  
  _v = r'(cvs\.)?(\d+)((\.\d+)*)([a-z]?)((_(pre|p|beta|alpha|rc)\d*)*)'
 -_rev = r'\d+'
 +# PREFIX hack: -r(\d+) -> -r(\d+|0\d+\.\d+) (see below)
 +_rev = r'(\d+|0\d+\.\d+)'
  _vr = _v + '(-r(' + _rev + '))?'
  
- _cp = '(' + _cat + '/' + _pkg + '(-' + _vr + ')?)'
- _cpv = '(' + _cp + '-' + _vr + ')'
- _pv = '(?P<pn>' + _pkg + '(?P<pn_inval>-' + _vr + ')?)' + '-(?P<ver>' + _v + ')(-r(?P<rev>' + _rev + '))?'
+ _cp = {
+ 	"dots_disallowed_in_PN": '(' + _cat + '/' + _pkg['dots_disallowed_in_PN'] + '(-' + _vr + ')?)',
+ 	"dots_allowed_in_PN":    '(' + _cat + '/' + _pkg['dots_allowed_in_PN']    + '(-' + _vr + ')?)',
+ }
+ _cpv = {
+ 	"dots_disallowed_in_PN": '(' + _cp['dots_disallowed_in_PN'] + '-' + _vr + ')',
+ 	"dots_allowed_in_PN":    '(' + _cp['dots_allowed_in_PN']    + '-' + _vr + ')',
+ }
+ _pv = {
+ 	"dots_disallowed_in_PN": '(?P<pn>' + _pkg['dots_disallowed_in_PN'] + '(?P<pn_inval>-' + _vr + ')?)' + '-(?P<ver>' + _v + ')(-r(?P<rev>' + _rev + '))?',
+ 	"dots_allowed_in_PN":    '(?P<pn>' + _pkg['dots_allowed_in_PN']    + '(?P<pn_inval>-' + _vr + ')?)' + '-(?P<ver>' + _v + ')(-r(?P<rev>' + _rev + '))?',
+ }
  
  ver_regexp = re.compile("^" + _vr + "$")
  suffix_regexp = re.compile("^(alpha|beta|rc|pre|p)(\\d*)$")
@@@ -199,44 -230,18 +231,42 @@@ def vercmp(ver1, ver2, silent=1)
  				r2 = 0
  			rval = (r1 > r2) - (r1 < r2)
  			if rval:
- 				vercmp_cache[mykey] = rval
  				return rval
  
 -	# the suffix part is equal to, so finally check the revision
 +	# The suffix part is equal too, so finally check the 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):
 -		r1 = int(match1.group(10))
 +		if match1.group(10)[0] == '0' and '.' in match1.group(10):
 +			t = match1.group(10)[1:].split(".")
 +			r1 = int(t[0])
 +			r3 = int(t[1])
 +		else:
 +			r1 = int(match1.group(10))
 +			r3 = 0
  	else:
  		r1 = 0
 +		r3 = 0
  	if match2.group(10):
 -		r2 = int(match2.group(10))
 +		if match2.group(10)[0] == '0' and '.' in match2.group(10):
 +			t = match2.group(10)[1:].split(".")
 +			r2 = int(t[0])
 +			r4 = int(t[1])
 +		else:
 +			r2 = int(match2.group(10))
 +			r4 = 0
  	else:
  		r2 = 0
 +		r4 = 0
 +	if r1 == r2 and (r3 != 0 or r4 != 0):
 +		r1 = r3
 +		r2 = r4
  	rval = (r1 > r2) - (r1 < r2)
- 	vercmp_cache[mykey] = rval
  	return rval
  	
  def pkgcmp(pkg1, pkg2):



             reply	other threads:[~2012-07-06  7:06 UTC|newest]

Thread overview: 195+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-06  7:05 Fabian Groffen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-02-25  9:40 [gentoo-commits] proj/portage:prefix commit in: / Fabian Groffen
2024-02-22  7:27 Fabian Groffen
2024-01-18 10:22 Fabian Groffen
2024-01-18  9:36 Fabian Groffen
2023-12-03 10:10 Fabian Groffen
2023-12-03  9:54 Fabian Groffen
2023-12-03  9:54 Fabian Groffen
2023-12-03  9:54 Fabian Groffen
2023-11-24 20:18 Fabian Groffen
2023-11-24 20:06 Fabian Groffen
2023-11-24 20:06 Fabian Groffen
2023-06-22  8:47 Fabian Groffen
2023-06-17  9:04 Fabian Groffen
2023-06-17  8:41 Fabian Groffen
2022-07-28 17:38 Fabian Groffen
2022-07-27 19:20 Fabian Groffen
2022-07-26 19:39 Fabian Groffen
2022-07-25 15:20 Fabian Groffen
2022-07-24 19:27 Fabian Groffen
2022-07-24 14:01 Fabian Groffen
2022-07-24  9:45 Fabian Groffen
2022-01-14 10:40 Fabian Groffen
2022-01-14 10:32 Fabian Groffen
2021-07-06  7:10 Fabian Groffen
2021-04-16 13:37 Fabian Groffen
2021-01-24  9:02 Fabian Groffen
2021-01-04 10:48 Fabian Groffen
2020-12-07 17:28 Fabian Groffen
2020-12-07 16:46 Fabian Groffen
2020-11-23  7:48 Fabian Groffen
2020-11-22 11:15 Fabian Groffen
2020-09-26 11:29 Fabian Groffen
2020-08-02 12:33 Fabian Groffen
2020-06-02 18:55 Fabian Groffen
2020-01-08 19:14 Fabian Groffen
2019-07-01 13:11 Fabian Groffen
2019-05-30  9:20 Fabian Groffen
2019-02-28 12:31 Fabian Groffen
2019-01-11 10:19 Fabian Groffen
2019-01-07 10:22 Fabian Groffen
2018-12-23 11:14 Fabian Groffen
2018-12-12 18:54 Fabian Groffen
2018-08-04  6:56 Fabian Groffen
2018-06-25  8:34 Fabian Groffen
2018-06-17 14:38 Fabian Groffen
2018-06-17 14:38 Fabian Groffen
2018-05-28 15:24 Fabian Groffen
2018-05-25 19:44 Fabian Groffen
2018-05-25 19:44 Fabian Groffen
2018-05-18 19:46 Fabian Groffen
2017-12-12  8:19 Fabian Groffen
2017-10-29 14:51 Fabian Groffen
2017-10-03  7:32 Fabian Groffen
2017-09-22 10:08 Fabian Groffen
2017-08-21 13:27 Fabian Groffen
2017-08-13  7:21 Fabian Groffen
2017-05-23 13:34 Fabian Groffen
2017-03-25  9:12 Fabian Groffen
2017-03-24 19:09 Fabian Groffen
2017-03-24  7:43 Fabian Groffen
2017-03-23 17:46 Fabian Groffen
2017-03-23 17:32 Fabian Groffen
2017-03-23 17:23 Fabian Groffen
2017-03-23 15:38 Fabian Groffen
2017-03-17  8:25 Fabian Groffen
2017-03-02  8:48 Fabian Groffen
2017-03-02  8:18 Fabian Groffen
2017-02-23 14:05 Fabian Groffen
2017-01-27 15:08 Fabian Groffen
2017-01-27 15:08 Fabian Groffen
2016-03-20 19:31 Fabian Groffen
2016-02-21 16:17 Fabian Groffen
2016-02-21 16:17 Fabian Groffen
2016-02-18 19:35 Fabian Groffen
2016-02-18 19:35 Fabian Groffen
2015-06-20  7:12 Fabian Groffen
2015-06-09 18:30 Fabian Groffen
2015-06-09 18:01 Fabian Groffen
2015-06-04 19:47 Fabian Groffen
2015-04-05  9:15 Fabian Groffen
2014-11-12 17:31 Fabian Groffen
2014-10-02 18:48 Fabian Groffen
2014-09-28 17:52 Fabian Groffen
2014-05-06 19:32 Fabian Groffen
2014-05-06 19:18 Fabian Groffen
2014-04-22 19:52 Fabian Groffen
2014-02-06 21:09 Fabian Groffen
2014-01-06  9:47 Fabian Groffen
2013-09-24 17:29 Fabian Groffen
2013-09-20 17:59 Fabian Groffen
2013-09-18 18:34 Fabian Groffen
2013-09-13 18:02 Fabian Groffen
2013-08-10 20:54 Fabian Groffen
2013-07-10  5:31 Fabian Groffen
2013-07-08 19:32 Fabian Groffen
2013-06-29  5:41 Fabian Groffen
2013-06-27 17:20 Fabian Groffen
2013-06-12  9:02 Fabian Groffen
2013-06-09 15:53 Fabian Groffen
2013-05-04 18:55 Fabian Groffen
2013-04-02 16:57 Fabian Groffen
2013-03-31 19:03 Fabian Groffen
2013-03-31 19:00 Fabian Groffen
2013-03-24  8:36 Fabian Groffen
2013-03-23 19:54 Fabian Groffen
2013-02-28 19:29 Fabian Groffen
2013-02-07 20:01 Fabian Groffen
2013-01-27 21:41 Fabian Groffen
2013-01-27 21:41 Fabian Groffen
2013-01-13 10:26 Fabian Groffen
2013-01-10 21:02 Fabian Groffen
2013-01-05 18:14 Fabian Groffen
2012-12-26 14:48 Fabian Groffen
2012-12-02 15:47 Fabian Groffen
2012-12-02 15:36 Fabian Groffen
2012-12-02 15:33 Fabian Groffen
2012-12-02 15:33 Fabian Groffen
2012-12-02 15:33 Fabian Groffen
2012-12-02 13:12 Fabian Groffen
2012-12-02 12:59 Fabian Groffen
2012-11-04 10:48 Fabian Groffen
2012-10-22 17:25 Fabian Groffen
2012-10-02 12:02 Fabian Groffen
2012-09-30 11:22 Fabian Groffen
2012-09-26 18:26 Fabian Groffen
2012-09-12 18:18 Fabian Groffen
2012-09-09  7:40 Fabian Groffen
2012-09-06 18:14 Fabian Groffen
2012-08-27  6:44 Fabian Groffen
2012-08-12  7:50 Fabian Groffen
2012-07-19 16:25 Fabian Groffen
2012-04-23 19:23 Fabian Groffen
2012-04-03 18:04 Fabian Groffen
2012-03-31 19:31 Fabian Groffen
2012-03-01 20:32 Fabian Groffen
2012-02-19  9:58 Fabian Groffen
2012-02-09  8:01 Fabian Groffen
2012-01-10 17:45 Fabian Groffen
2011-12-31 16:45 Fabian Groffen
2011-12-26  9:12 Fabian Groffen
2011-12-23  9:51 Fabian Groffen
2011-12-22  9:51 Fabian Groffen
2011-12-19 18:30 Fabian Groffen
2011-12-14 15:25 Fabian Groffen
2011-12-10 11:28 Fabian Groffen
2011-12-09 20:33 Fabian Groffen
2011-12-02 20:31 Fabian Groffen
2011-12-02 19:20 Fabian Groffen
2011-12-02 19:19 Fabian Groffen
2011-12-02 19:18 Fabian Groffen
2011-12-02 18:03 Fabian Groffen
2011-10-21 17:34 Fabian Groffen
2011-10-21 17:34 Fabian Groffen
2011-10-20 20:28 Fabian Groffen
2011-10-20 17:08 Fabian Groffen
2011-10-20 16:38 Fabian Groffen
2011-10-17 18:36 Fabian Groffen
2011-10-16 13:59 Fabian Groffen
2011-10-15 18:27 Fabian Groffen
2011-10-13  6:52 Fabian Groffen
2011-09-23 18:38 Fabian Groffen
2011-09-23 18:23 Fabian Groffen
2011-09-20 18:25 Fabian Groffen
2011-09-14 18:43 Fabian Groffen
2011-09-14 18:38 Fabian Groffen
2011-09-13 17:41 Fabian Groffen
2011-08-31 18:39 Fabian Groffen
2011-08-30 18:45 Fabian Groffen
2011-08-29 19:03 Fabian Groffen
2011-08-25 20:25 Fabian Groffen
2011-08-20 17:50 Fabian Groffen
2011-07-26 17:35 Fabian Groffen
2011-07-17  9:48 Fabian Groffen
2011-07-17  8:12 Fabian Groffen
2011-07-01 17:44 Fabian Groffen
2011-06-14 15:39 Fabian Groffen
2011-06-06 17:12 Fabian Groffen
2011-05-28  8:29 Fabian Groffen
2011-05-27 17:41 Fabian Groffen
2011-05-14 13:59 Fabian Groffen
2011-05-02 17:41 Fabian Groffen
2011-04-24 12:08 Fabian Groffen
2011-04-15 18:27 Fabian Groffen
2011-04-15 18:27 Fabian Groffen
2011-03-28 16:52 Fabian Groffen
2011-03-23 19:26 Fabian Groffen
2011-03-17 19:08 Fabian Groffen
2011-03-13 14:45 Fabian Groffen
2011-03-09 19:44 Fabian Groffen
2011-02-26 21:15 Fabian Groffen
2011-02-10 18:46 Fabian Groffen
2011-02-10 18:44 Fabian Groffen
2011-02-10 18:20 Fabian Groffen
2011-02-05 12:25 Fabian Groffen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1341558143.f028e1bfb2b97990b558b0c1a8782838aeae175c.grobian@gentoo \
    --to=grobian@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox