-#!/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
-#!/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
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
-#!/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
-#!/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
"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)
-#!/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)