Merge remote-tracking branch 'overlays-gentoo-org/master' into prefix
authorFabian Groffen <grobian@gentoo.org>
Thu, 6 Sep 2012 17:59:38 +0000 (19:59 +0200)
committerFabian Groffen <grobian@gentoo.org>
Thu, 6 Sep 2012 17:59:38 +0000 (19:59 +0200)
Conflicts:
bin/archive-conf
bin/banned-helper
bin/binhost-snapshot
bin/clean_locks
bin/dispatch-conf
bin/ebuild
bin/ebuild-helpers/bsd/sed
bin/ebuild-helpers/dodoc
bin/ebuild-helpers/dohard
bin/ebuild-helpers/dosed
bin/ebuild-helpers/prepalldocs
bin/emaint
bin/emerge
bin/env-update
bin/fixpackages
bin/glsa-check
bin/phase-functions.sh
bin/phase-helpers.sh
bin/quickpkg
bin/regenworld
bin/repoman
bin/save-ebuild-env.sh

40 files changed:
1  2 
bin/archive-conf
bin/binhost-snapshot
bin/clean_locks
bin/dispatch-conf
bin/ebuild
bin/ebuild-helpers/bsd/sed
bin/ebuild-helpers/dodoc
bin/ebuild-helpers/dohard
bin/ebuild-helpers/doins
bin/ebuild-helpers/dosed
bin/ebuild-helpers/newins
bin/ebuild-helpers/prepalldocs
bin/ebuild.sh
bin/egencache
bin/emaint
bin/emerge
bin/env-update
bin/etc-update
bin/fixpackages
bin/glsa-check
bin/phase-functions.sh
bin/phase-helpers.sh
bin/portageq
bin/quickpkg
bin/regenworld
bin/repoman
bin/save-ebuild-env.sh
cnf/make.globals
man/emerge.1
man/make.conf.5
pym/_emerge/EbuildBuildDir.py
pym/_emerge/Package.py
pym/_emerge/depgraph.py
pym/_emerge/main.py
pym/portage/__init__.py
pym/portage/const.py
pym/portage/package/ebuild/_config/special_env_vars.py
pym/portage/package/ebuild/config.py
pym/portage/package/ebuild/doebuild.py
pym/portage/versions.py

index 149fdc51d9a7b3b9cebce90ec32df3d55628fdf1,af34db6283d9b841bdc121f167cba30c0d964335..a48fc1917e1d1c0a383c5396e7c72b6a991de406
@@@ -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
  
  #
index 54d210218aaa9b06edee02718c2038bdd4d4403f,fe2cf6b5308a9de4ce117313064c238e8cf40a9b..f5b99798edd2dfcabcbea413ab68a87fa85bd14e
@@@ -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
  
  import io
diff --cc bin/clean_locks
index c97794facde5f81eb947c5b135447067188fdb65,09ee3e5168d14af5bc7ee8c7e15f7d6fb873c357..29c22ff00bab0945854cbfb328ed87e32854a8e6
@@@ -1,5 -1,5 +1,5 @@@
 -#!/usr/bin/python -O
 +#!@PREFIX_PORTAGE_PYTHON@ -O
- # Copyright 1999-2006 Gentoo Foundation
+ # Copyright 1999-2012 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
  from __future__ import print_function
Simple merge
diff --cc bin/ebuild
Simple merge
index 8c979e92f84001a4e31b0feaaefcdce03d7fe0ac,01b88471d94bca8b660e5bdbe6dcdf3e1249b3a2..89f9ec6a35d41c07aeb8bd4370a7da5bbfeb2a62
@@@ -1,16 -1,11 +1,18 @@@
 -#!/bin/bash
 +#!@PORTAGE_BASH@
- # Copyright 2007 Gentoo Foundation
+ # Copyright 2007-2012 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
  scriptpath=${BASH_SOURCE[0]}
  scriptname=${scriptpath##*/}
  
- if [[ sed == ${scriptname} ]] && [[ -n ${ESED} ]]; then
++# PREFIX LOCAL: warn about screwups early
 +if [[ -n ${EPREFIX} ]] ; then
 +      echo "When using Prefix, this BSD sed wrapper should not exist (in ${scriptpath})!  This is a bug!" > /dev/stderr
 +      exit 1
 +fi
++# END PREFIX LOCAL
 +
+ if [[ sed == ${scriptname} && -n ${ESED} ]]; then
        exec ${ESED} "$@"
  elif type -P g${scriptname} > /dev/null ; then
        exec g${scriptname} "$@"
index 0ba67512d838a4899b620b69dd97d5c3a2e973dc,d6ce679337fe0c1998dc837555d1b2b0d1dc5488..4b9c8b95f527fb701fddca170fafab9ffe4baeeb
@@@ -1,8 -1,19 +1,19 @@@
 -#!/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
+ case "${EAPI}" in
+       0|1|2|3)
+               ;;
+       *)
+               exec \
+               env \
+               __PORTAGE_HELPER="dodoc" \
+               doins "$@"
+               ;;
+ esac
 +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
  
  if [ $# -lt 1 ] ; then
        helpers_die "${0##*/}: at least one argument needed"
index 2fb0ede2a110ee3ef36b26bb2c733e9c1e18801d,6ae93d240de061d6f504d1dce9e3acc0a2e7d006..bd83b5d1e745de0c3fc598be069b1f74a77869e1
@@@ -1,7 -1,16 +1,16 @@@
 -#!/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
  
+ case "${EAPI}" in
+       0|1|2|3)
+               ;;
+       *)
+               die "'${0##*/}' has been banned for EAPI '$EAPI'"
+               exit 1
+               ;;
+ esac
  if [[ $# -ne 2 ]] ; then
        echo "$0: two arguments needed" 1>&2
        exit 1
index ca6b0bae430698fc69cdb40abdb19874b2156ddc,26b11a8697ba56952a179d2a2cdede28768a9c2d..511eb17b92aa76c3887ca0bc07b88827acb04304
@@@ -2,9 -2,11 +2,11 @@@
  # 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
+ helper=${__PORTAGE_HELPER:-${0##*/}}
+ if [[ ${helper} == dodoc ]] ; then
        if [ $# -eq 0 ] ; then
                # default_src_install may call dodoc with no arguments
                # when DOC is defined but empty, so simply return
@@@ -35,18 -37,9 +37,18 @@@ if [[ ${INSDESTTREE#${ED}} != "${INSDES
        vecho "You should not use \${D} or \${ED} with helpers." 1>&2
        vecho "  --> ${INSDESTTREE}" 1>&2
        vecho "-------------------------------------------------------" 1>&2
-       helpers_die "${0##*/} used with \${D} or \${ED}"
+       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
  
  case "$EAPI" in
        0|1|2|3)
index 0f2f6370be5c73fafd9a958aea9e32e7f8cc86b5,24ec20587907eaee1ba2e2b0eacdc4a3203726b5..3e903fcb3f0ad85ed16c7f8f346f7248f07637a4
@@@ -1,7 -1,16 +1,16 @@@
 -#!/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
  
+ case "${EAPI}" in
+       0|1|2|3)
+               ;;
+       *)
+               die "'${0##*/}' has been banned for EAPI '$EAPI'"
+               exit 1
+               ;;
+ esac
  if [[ $# -lt 1 ]] ; then
        echo "!!! ${0##*/}: at least one argument needed" >&2
        exit 1
Simple merge
index 648efbaf9190e709ee70c9b63f3874fb4e73a9ba,c9226d603e5fe68c534719d730e19f4c7dee9c5d..a890801afaad831f02dff785bbce3c973469695a
@@@ -1,9 -1,18 +1,18 @@@
 -#!/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
  
+ case "${EAPI}" in
+       0|1|2|3)
+               ;;
+       *)
+               die "'${0##*/}' has been banned for EAPI '$EAPI'"
+               exit 1
+               ;;
+ esac
  if [[ -n $1 ]] ; then
        vecho "${0##*/}: invalid usage; takes no arguments" 1>&2
  fi
diff --cc bin/ebuild.sh
Simple merge
diff --cc bin/egencache
Simple merge
diff --cc bin/emaint
Simple merge
diff --cc bin/emerge
Simple merge
diff --cc bin/env-update
index 32c251e0201a13c3b4d2722558d5cd079bec7a90,cee3fd68344e4130932c9072d73521f810d44e1b..ef3433f5afc7aa8c5360eac5b4744e6f62100608
@@@ -1,5 -1,5 +1,5 @@@
 -#!/usr/bin/python -O
 +#!@PREFIX_PORTAGE_PYTHON@ -O
- # Copyright 1999-2006 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/etc-update
Simple merge
diff --cc bin/fixpackages
index 57b6db3b22639941e9e268ce5c2c9e981846b6be,da08520e56c697abef598e1fc2a610ac984959ee..3f37e3f37ff5f10b4d1b685709126a5ae4188906
@@@ -1,5 -1,5 +1,5 @@@
 -#!/usr/bin/python
 +#!@PREFIX_PORTAGE_PYTHON@
- # 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/glsa-check
index f513b583cc42fdda4c5af30a03ac409b49bb84a6,eddc9050efaa25a12a2df80ec05cf13f0926c923..7b8e98ab7e429f8ace5b090e578a2b49f094134a
@@@ -1,5 -1,5 +1,5 @@@
 -#!/usr/bin/python
 +#!@PREFIX_PORTAGE_PYTHON@
- # Copyright 2008-2011 Gentoo Foundation
+ # Copyright 2008-2012 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
  from __future__ import print_function
index fdf17d879a1aed841a35be1a1a14deabe8c0cb05,68a33a87145297b2032e7f3874488b62a6740e8e..37ee7f2180bb82bc80994c4c902c6e10b868ba33
@@@ -29,7 -29,7 +29,7 @@@ PORTAGE_READONLY_VARS="D EBUILD EBUILD_
        PORTAGE_TMPDIR PORTAGE_UPDATE_ENV PORTAGE_USERNAME \
        PORTAGE_VERBOSE PORTAGE_WORKDIR_MODE PORTDIR PORTDIR_OVERLAY \
        PROFILE_PATHS REPLACING_VERSIONS REPLACED_BY_VERSION T WORKDIR \
-       __PORTAGE_TEST_HARDLINK_LOCKS ED EROOT"
 -      __PORTAGE_HELPER __PORTAGE_TEST_HARDLINK_LOCKS"
++      __PORTAGE_HELPER __PORTAGE_TEST_HARDLINK_LOCKS ED EROOT"
  
  PORTAGE_SAVED_READONLY_VARS="A CATEGORY P PF PN PR PV PVR"
  
index 10a7b3e5848b8b688a4dad6eb2c2cc0f4ff689c0,0587991f990613414777bc5be90a053b6f8e41e3..df51a5bbad702040383e397f755c0c0414ca705c
@@@ -611,10 -688,10 +688,10 @@@ has_version() 
                        ;;
        esac
        if [[ -n $PORTAGE_IPC_DAEMON ]] ; then
-               "$PORTAGE_BIN_PATH"/ebuild-ipc has_version "${eroot}" "$1"
+               "$PORTAGE_BIN_PATH"/ebuild-ipc has_version "${eroot}" "${atom}"
        else
                PYTHONPATH=${PORTAGE_PYM_PATH}${PYTHONPATH:+:}${PYTHONPATH} \
-               "${PORTAGE_PYTHON:-@PORTAGE_PREFIX_PYTHON@}" "${PORTAGE_BIN_PATH}/portageq" has_version "${eroot}" "$1"
 -              "${PORTAGE_PYTHON:-/usr/bin/python}" "${PORTAGE_BIN_PATH}/portageq" has_version "${eroot}" "${atom}"
++              "${PORTAGE_PYTHON:-@PORTAGE_PREFIX_PYTHON@}" "${PORTAGE_BIN_PATH}/portageq" has_version "${eroot}" "${atom}"
        fi
        local retval=$?
        case "${retval}" in
@@@ -646,10 -745,10 +745,10 @@@ best_version() 
                        ;;
        esac
        if [[ -n $PORTAGE_IPC_DAEMON ]] ; then
-               "$PORTAGE_BIN_PATH"/ebuild-ipc best_version "${eroot}" "$1"
+               "$PORTAGE_BIN_PATH"/ebuild-ipc best_version "${eroot}" "${atom}"
        else
                PYTHONPATH=${PORTAGE_PYM_PATH}${PYTHONPATH:+:}${PYTHONPATH} \
-               "${PORTAGE_PYTHON:-@PORTAGE_PREFIX_PYTHON@}" "${PORTAGE_BIN_PATH}/portageq" best_version "${eroot}" "$1"
 -              "${PORTAGE_PYTHON:-/usr/bin/python}" "${PORTAGE_BIN_PATH}/portageq" best_version "${eroot}" "${atom}"
++              "${PORTAGE_PYTHON:-@PORTAGE_PREFIX_PYTHON@}" "${PORTAGE_BIN_PATH}/portageq" best_version "${eroot}" "${atom}"
        fi
        local retval=$?
        case "${retval}" in
diff --cc bin/portageq
Simple merge
diff --cc bin/quickpkg
Simple merge
diff --cc bin/regenworld
index 44e821b5e5f1ebc4200482811bae4cdfa93dc0b9,a2833445a79b50a2b43ab5bd9f3ebf65a6f23bea..0b7da44c844b3d7978fe1d0adcd7a1a23ac1a92e
@@@ -1,19 -1,17 +1,15 @@@
 -#!/usr/bin/python
 +#!@PREFIX_PORTAGE_PYTHON@
- # 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
  
  import sys
- # 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")) 
- import portage 
+ pym_path = osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), "pym")
+ sys.path.insert(0, pym_path)
+ import portage
  from portage import os
 -from portage._sets.files import StaticFileSet, WorldSelectedSet
 -
  import re
  import tempfile
  import textwrap
diff --cc bin/repoman
Simple merge
index 1169c0900ea8c017969f6be1cb4b568c8e5f6915,6d6ed41b69d2b2b5dd9d3e474a7ff49ad4a2a3e7..74193e79e5553653783159d891d0f546f5f9d1d8
@@@ -1,5 -1,5 +1,5 @@@
 -#!/bin/bash
 +#!@PORTAGE_PREFIX_BASH@
- # Copyright 1999-2011 Gentoo Foundation
+ # Copyright 1999-2012 Gentoo Foundation
  # Distributed under the terms of the GNU General Public License v2
  
  # @FUNCTION: save_ebuild_env
Simple merge
diff --cc man/emerge.1
Simple merge
diff --cc man/make.conf.5
Simple merge
index 5e2c0345522780581974667a9da5de4bc47b9b3e,5d6a26232a652fb669981b7ce13b9680bcd7a417..7cabee0da46b14a51f882ac01b7f5893c54102dc
@@@ -5,10 -5,8 +5,9 @@@ from _emerge.AsynchronousLock import As
  
  import portage
  from portage import os
 +import sys
  from portage.exception import PortageException
  from portage.util.SlotObject import SlotObject
- import errno
  
  class EbuildBuildDir(SlotObject):
  
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index ff8ad1252880178fce0439b55d5edb3e9e2673d0,471a5daebdd4efcfda76ca368b650b113352e5f4..1c5ac389ff1918ff1a0b19511c69fb34a472b3aa
@@@ -131,13 -147,16 +149,13 @@@ def _doebuild_path(settings, eapi=None)
        eprefix = settings["EPREFIX"]
        prerootpath = [x for x in settings.get("PREROOTPATH", "").split(":") if x]
        rootpath = [x for x in settings.get("ROOTPATH", "").split(":") if x]
 -
 -      prefixes = []
 -      if eprefix:
 -              prefixes.append(eprefix)
 -      prefixes.append("/")
 -
 +      # PREFIX LOCAL: use DEFAULT_PATH and EXTRA_PATH from make.globals
 +      defaultpath = [x for x in settings.get("DEFAULT_PATH", "").split(":") if x]
 +      extrapath = [x for x in settings.get("EXTRA_PATH", "").split(":") if x]
        path = []
  
-       if eapi not in (None, "0", "1", "2", "3"):
-               path.append(os.path.join(portage_bin_path, "ebuild-helpers", "4"))
+       if settings.get("USERLAND", "GNU") != "GNU":
+               path.append(os.path.join(portage_bin_path, "ebuild-helpers", "bsd"))
  
        path.append(os.path.join(portage_bin_path, "ebuild-helpers"))
        path.extend(prerootpath)
Simple merge