From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 63038138010 for ; Mon, 27 Aug 2012 06:44:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 16678E0330; Mon, 27 Aug 2012 06:44:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id CD6B7E0330 for ; Mon, 27 Aug 2012 06:44:47 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0851C33D839 for ; Mon, 27 Aug 2012 06:44:47 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 5A24FE543C for ; Mon, 27 Aug 2012 06:44:44 +0000 (UTC) From: "Fabian Groffen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" Message-ID: <1346049825.a7eefaa55f54e73995e5e0b893b285f905177a40.grobian@gentoo> Subject: [gentoo-commits] proj/portage:prefix commit in: / X-VCS-Repository: proj/portage X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: a7eefaa55f54e73995e5e0b893b285f905177a40 X-VCS-Branch: prefix Date: Mon, 27 Aug 2012 06:44:44 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 255120ad-9cb4-4b6c-8618-87bb622d202e X-Archives-Hash: a4b1f6554bc5140d7e97fec927e112ab commit: a7eefaa55f54e73995e5e0b893b285f905177a40 Author: Fabian Groffen gentoo org> AuthorDate: Mon Aug 27 06:43:45 2012 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Mon Aug 27 06:43:45 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=a7eefaa5 Merge remote-tracking branch 'overlays-gentoo-org/master' into prefix Conflicts: bin/dispatch-conf bin/ebuild-helpers/doins bin/ebuild-helpers/newbin bin/ebuild-helpers/newconfd bin/ebuild-helpers/newdoc bin/ebuild-helpers/newenvd bin/ebuild-helpers/newexe bin/ebuild-helpers/newinitd bin/ebuild-helpers/newins bin/ebuild-helpers/newlib.a bin/ebuild-helpers/newlib.so bin/ebuild-helpers/newman bin/ebuild-helpers/newsbin bin/emerge-webrsync bin/isolated-functions.sh bin/phase-helpers.sh bin/dispatch-conf | 10 +- bin/ebuild-helpers/doins | 4 +- bin/ebuild-helpers/newbin | 23 +- bin/ebuild-helpers/newconfd | 23 +- bin/ebuild-helpers/newdoc | 23 +- bin/ebuild-helpers/newenvd | 23 +- bin/ebuild-helpers/newexe | 23 +- bin/ebuild-helpers/newinitd | 23 +- bin/ebuild-helpers/newins | 73 ++- bin/ebuild-helpers/newlib.a | 23 +- bin/ebuild-helpers/newlib.so | 23 +- bin/ebuild-helpers/newman | 23 +- bin/ebuild-helpers/newsbin | 23 +- bin/ebuild-helpers/prepstrip | 30 +- bin/ebuild.sh | 4 +- bin/egencache | 2 +- bin/emerge-webrsync | 127 +++-- bin/isolated-functions.sh | 4 +- bin/phase-functions.sh | 12 +- bin/phase-helpers.sh | 4 +- cnf/metadata.dtd | 7 +- man/make.conf.5 | 24 +- misc/emerge-delta-webrsync | 613 ++++++++++++++++++++ mkrelease.sh | 2 +- pym/_emerge/BinpkgFetcher.py | 10 +- pym/_emerge/EbuildFetcher.py | 6 +- pym/_emerge/EbuildMetadataPhase.py | 13 +- pym/_emerge/Package.py | 19 +- pym/_emerge/PollScheduler.py | 18 +- pym/_emerge/Scheduler.py | 9 +- pym/_emerge/SpawnProcess.py | 17 +- pym/portage/checksum.py | 58 ++ pym/portage/dbapi/__init__.py | 16 +- pym/portage/dbapi/bintree.py | 7 +- pym/portage/dbapi/porttree.py | 4 +- pym/portage/dbapi/virtual.py | 4 +- pym/portage/dep/dep_check.py | 19 +- pym/portage/eapi.py | 11 +- pym/portage/getbinpkg.py | 8 +- pym/portage/manifest.py | 15 +- .../package/ebuild/_config/KeywordsManager.py | 42 ++- pym/portage/package/ebuild/_config/UseManager.py | 79 +++- .../package/ebuild/_config/special_env_vars.py | 1 + pym/portage/package/ebuild/config.py | 21 +- pym/portage/package/ebuild/digestcheck.py | 15 +- pym/portage/package/ebuild/doebuild.py | 18 +- pym/portage/package/ebuild/fetch.py | 23 +- pym/portage/package/ebuild/getmaskingstatus.py | 7 +- pym/portage/process.py | 6 +- pym/portage/tests/ebuild/test_doebuild_spawn.py | 2 + pym/portage/tests/lint/test_bash_syntax.py | 12 +- pym/portage/util/__init__.py | 7 + pym/portage/util/_desktop_entry.py | 60 ++- pym/portage/util/_eventloop/EventLoop.py | 65 ++- pym/portage/versions.py | 27 +- 55 files changed, 1295 insertions(+), 470 deletions(-) diff --cc bin/dispatch-conf index de8d85d,35979db..d671873 --- a/bin/dispatch-conf +++ b/bin/dispatch-conf @@@ -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 # diff --cc bin/ebuild-helpers/doins index b9c95ed,fd77934..ca6b0ba --- a/bin/ebuild-helpers/doins +++ b/bin/ebuild-helpers/doins @@@ -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:-/usr/lib/portage/bin}"/isolated-functions.sh +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh if [[ ${0##*/} == dodoc ]] ; then if [ $# -eq 0 ] ; then @@@ -38,18 -38,9 +38,18 @@@ if [[ ${INSDESTTREE#${ED}} != "${INSDES helpers_die "${0##*/} 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 case "$EAPI" in - 0|1|2|3|3_pre2) + 0|1|2|3) PRESERVE_SYMLINKS=n ;; *) diff --cc bin/ebuild-helpers/newins index 45c3e18,2dc041d..e9bf34b --- a/bin/ebuild-helpers/newins +++ b/bin/ebuild-helpers/newins @@@ -1,16 -1,13 +1,14 @@@ +#!@PORTAGE_BASH@ - # Copyright 1999-2011 Gentoo Foundation + #!/bin/bash + # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh - if [[ -z ${T} ]] || [[ -z ${2} ]] ; then - helpers_die "${0##*/}: Need two arguments, old file and new file" - exit 1 - fi + helper=${0##*/} - if [ ! -e "$1" ] ; then - helpers_die "!!! ${0##*/}: $1 does not exist" + if [[ -z ${T} ]] || [[ -z ${2} ]] ; then + helpers_die "${helper}: Need two arguments, old file and new file" exit 1 fi diff --cc bin/emerge-webrsync index 581dc54,a962ab5..cdcf716 --- a/bin/emerge-webrsync +++ b/bin/emerge-webrsync @@@ -1,5 -1,5 +1,6 @@@ +#!@PORTAGE_BASH@ - # Copyright 1999-2011 Gentoo Foundation + #!/bin/bash + # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # Author: Karl Trygve Kalleberg # Rewritten from the old, Perl-based emerge-webrsync script @@@ -39,19 -39,14 +40,20 @@@ els eecho "could not find 'portageq'; aborting" exit 1 fi - eval $("${portageq}" envvar -v FEATURES FETCHCOMMAND GENTOO_MIRRORS \ - PORTAGE_BIN_PATH PORTAGE_GPG_DIR \ - PORTAGE_NICENESS PORTAGE_RSYNC_EXTRA_OPTS PORTAGE_TMPDIR PORTDIR \ - SYNC http_proxy ftp_proxy \ - EPREFIX PORTAGE_USER PORTAGE_GROUP) - DISTDIR="${PORTAGE_TMPDIR}/emerge-webrsync" + eval $("${portageq}" envvar -v DISTDIR EPREFIX FEATURES \ + FETCHCOMMAND GENTOO_MIRRORS \ + PORTAGE_BIN_PATH PORTAGE_CONFIGROOT PORTAGE_GPG_DIR \ + PORTAGE_NICENESS PORTAGE_RSYNC_EXTRA_OPTS \ + PORTAGE_RSYNC_OPTS PORTAGE_TMPDIR PORTDIR \ - SYNC USERLAND http_proxy ftp_proxy) ++ SYNC USERLAND http_proxy ftp_proxy \ ++ PORTAGE_USER PORTAGE_GROUP) export http_proxy ftp_proxy +# PREFIX LOCAL: use Prefix servers, just because we want this and infra - # just can't support us yet - GENTOO_MIRRORS="http://gentoo-mirror1.prefix.freens.org http://gentoo-mirror2.prefix.freens.org" ++# can't support us yet ++GENTOO_MIRRORS="http://gentoo-mirror1.prefix.freens.org" +# END PREFIX LOCAL + # If PORTAGE_NICENESS is overriden via the env then it will # still pass through the portageq call and override properly. if [ -n "${PORTAGE_NICENESS}" ]; then @@@ -191,11 -191,21 +198,23 @@@ sync_local() vecho "Syncing local tree ..." - local ownership="portage:portage" ++ # PREFIX LOCAL: use PORTAGE_USER and PORTAGE_GROUP ++ local ownership="${PORTAGE_USER:-portage}:${PORTAGE_GROUP:-portage}" ++ # END PREFIX LOCAL + if has usersync ${FEATURES} ; then + case "${USERLAND}" in + BSD) + ownership=$(stat -f '%Su:%Sg' "${PORTDIR}") + ;; + *) + ownership=$(stat -c '%U:%G' "${PORTDIR}") + ;; + esac + fi + if type -P tarsync > /dev/null ; then - # PREFIX LOCAL: use PORTAGE_USER and PORTAGE_GROUP - local chown_opts="-o ${PORTAGE_USER:-portage} -g ${PORTAGE_GROUP:-portage}" - chown ${PORTAGE_USER:-portage}:${PORTAGE_GROUP:-portage} portage > /dev/null 2>&1 || chown_opts="" - # END PREFIX LOCAL + local chown_opts="-o ${ownership%:*} -g ${ownership#*:}" + chown ${ownership} "${PORTDIR}" > /dev/null 2>&1 || chown_opts="" if ! tarsync $(vvecho -v) -s 1 ${chown_opts} \ -e /distfiles -e /packages -e /local "${file}" "${PORTDIR}"; then eecho "tarsync failed; tarball is corrupt? (${file})" diff --cc bin/isolated-functions.sh index 3beb14a,d33c0b6..79801e5 --- a/bin/isolated-functions.sh +++ b/bin/isolated-functions.sh @@@ -1,5 -1,5 +1,5 @@@ -#!/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 # We need this next line for "die" and "assert". It expands diff --cc bin/phase-helpers.sh index beca5ad,a00475c..10a7b3e --- a/bin/phase-helpers.sh +++ b/bin/phase-helpers.sh @@@ -1,5 -1,5 +1,5 @@@ -#!/bin/bash +#!@PREFIX_PORTAGE_BASH@ - # Copyright 1999-2011 Gentoo Foundation + # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 export DESTTREE=/usr diff --cc pym/portage/package/ebuild/fetch.py index 63c792a,260bf10..7f76bb2 --- a/pym/portage/package/ebuild/fetch.py +++ b/pym/portage/package/ebuild/fetch.py @@@ -26,10 -26,9 +26,10 @@@ portage.proxy.lazyimport.lazyimport(glo from portage import OrderedDict, os, selinux, shutil, _encodings, \ _shell_quote, _unicode_encode from portage.checksum import (hashfunc_map, perform_md5, verify_all, - _filter_unaccelarated_hashes) + _filter_unaccelarated_hashes, _hash_filter, _apply_hash_filter) from portage.const import BASH_BINARY, CUSTOM_MIRRORS_FILE, \ GLOBAL_CONFIG_PATH +from portage.const import rootgid from portage.data import portage_gid, portage_uid, secpass, userpriv_groups from portage.exception import FileNotFound, OperationNotPermitted, \ PortageException, TryAgain