From: Fabian Groffen Date: Sat, 26 Feb 2011 21:13:21 +0000 (+0100) Subject: Merge remote-tracking branch 'overlays-gentoo-org/master' into prefix X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2c30998a168fbb2f0ebca7d5e409be000793e816;p=portage.git Merge remote-tracking branch 'overlays-gentoo-org/master' into prefix Conflicts: bin/ebuild-helpers/4/dodoc bin/ebuild-helpers/doins bin/ebuild.sh bin/isolated-functions.sh bin/misc-functions.sh --- 2c30998a168fbb2f0ebca7d5e409be000793e816 diff --cc bin/ebuild-helpers/doins index 882e19c63,0aedcb9e5..e354ee415 --- a/bin/ebuild-helpers/doins +++ b/bin/ebuild-helpers/doins @@@ -1,9 -1,20 +1,20 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ - # Copyright 1999-2010 Gentoo Foundation + # Copyright 1999-2011 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 + # default_src_install may call dodoc with no arguments + # when DOC is defined but empty, so simply return + # sucessfully in this case. + exit 0 + fi + export INSOPTIONS=-m0644 + export INSDESTTREE=usr/share/doc/${PF}/${_E_DOCDESTTREE_} + fi + if [ $# -lt 1 ] ; then helpers_die "${0##*/}: at least one argument needed" exit 1 diff --cc bin/ebuild.sh index 629942d1d,59bf46e91..81af7477f --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@@ -1,9 -1,9 +1,9 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ - # Copyright 1999-2010 Gentoo Foundation + # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -PORTAGE_BIN_PATH="${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}" -PORTAGE_PYM_PATH="${PORTAGE_PYM_PATH:-/usr/lib/portage/pym}" +PORTAGE_BIN_PATH="${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}" +PORTAGE_PYM_PATH="${PORTAGE_PYM_PATH:-@PORTAGE_BASE@/pym}" if [[ $PORTAGE_SANDBOX_COMPAT_LEVEL -lt 22 ]] ; then # Ensure that /dev/std* streams have appropriate sandbox permission for @@@ -1154,15 -1148,10 +1154,12 @@@ dyn_install() fi vecho - vecho ">>> Install ${PF} into ${D} category ${CATEGORY}" + vecho ">>> Install ${PF} into ${ED} category ${CATEGORY}" #our custom version of libtool uses $S and $D to fix #invalid paths in .la files + # PREFIX: I think this is very old, and all patches (both to + # libtool and in ELT-patches) that did this are gone export S D - #some packages uses an alternative to $S to build in, cause - #our libtool to create problematic .la files - export PWORKDIR="$WORKDIR" # Reset exeinto(), docinto(), insinto(), and into() state variables # in case the user is running the install phase multiple times diff --cc bin/isolated-functions.sh index 52008277f,2f144a084..def1a547e --- a/bin/isolated-functions.sh +++ b/bin/isolated-functions.sh @@@ -1,5 -1,5 +1,5 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ - # Copyright 1999-2010 Gentoo Foundation + # Copyright 1999-2011 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/misc-functions.sh index 4174f1539,ae4cc9e71..59cc9d454 mode 100644,100755..100644 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@@ -1,5 -1,5 +1,5 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ - # Copyright 1999-2010 Gentoo Foundation + # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # # Miscellaneous shell functions that make use of the ebuild env but don't need diff --cc pym/_emerge/actions.py index 21f0d10ab,20220fc57..37a9b4a8d --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@@ -2401,56 -2412,10 +2412,58 @@@ def action_sync(settings, trees, mtimed "cd %s; exec cvs -z0 -q update -dP" % \ (portage._shell_quote(myportdir),), **spawn_kwargs) if retval != os.EX_OK: + writemsg_level("!!! cvs update error; exiting.\n", + noiselevel=-1, level=logging.ERROR) sys.exit(retval) dosyncuri = syncuri + elif syncuri[:11]=="svn+http://" or syncuri[:6]=="svn://" or syncuri[:12]=="svn+https://": + # Gentoo Prefix hardcoded SVN support + if not os.path.exists(EPREFIX + "/usr/bin/svn"): + print("!!! " + EPREFIX + "/usr/bin/svn does not exist, so SVN support is disabled.") + print("!!! Type \"emerge dev-util/subversion\" to enable SVN support.") + sys.exit(1) + svndir=os.path.dirname(myportdir) + if not os.path.exists(myportdir+"/.svn"): + #initial checkout + if syncuri[:4] == "svn+": + syncuri = syncuri[4:] + print(">>> Starting initial svn checkout with "+syncuri+"...") + if os.path.exists(svndir+"/prefix-overlay"): + print("!!! existing",svndir+"/prefix-overlay directory; exiting.") + sys.exit(1) + try: + os.rmdir(myportdir) + except OSError, e: + if e.errno != errno.ENOENT: + sys.stderr.write( + "!!! existing '%s' directory; exiting.\n" % myportdir) + sys.exit(1) + del e + if portage.spawn("cd "+svndir+"; svn checkout "+syncuri,settings,free=1): + print("!!! svn checkout error; exiting.") + sys.exit(1) + os.rename(os.path.join(svndir, "prefix-overlay"), myportdir) + else: + #svn update + print(">>> Starting svn update...") + retval = portage.spawn("cd '%s'; svn update" % myportdir, \ + settings, free=1) + if retval != os.EX_OK: + sys.exit(retval) + + # write timestamp.chk + try: + if not os.path.exists(os.path.join(myportdir, "metadata")): + os.mkdir(os.path.join(myportdir, "metadata")) + f = open(os.path.join(myportdir, "metadata", "timestamp.chk"), 'w') + f.write(time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime())) + f.write('\n') + f.close() + except IOError, e: + # too bad, next time better luck! + pass + + dosyncuri = syncuri else: writemsg_level("!!! Unrecognized protocol: SYNC='%s'\n" % (syncuri,), noiselevel=-1, level=logging.ERROR) diff --cc runtests.sh index f3d91a926,6c00ce530..0ae49315f --- a/runtests.sh +++ b/runtests.sh @@@ -1,6 -1,6 +1,6 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ - PYTHON_VERSIONS="2.6 2.7 3.1 3.2" + PYTHON_VERSIONS="2.6 2.7 3.1 3.2 3.3" case "${NOCOLOR:-false}" in yes|true)