-#!/usr/bin/python
+#!@PORTAGE_PYTHON@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
#
# archive-conf -- save off a config file in the dispatch-conf archive dir
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
die "'${0##*/}' has been banned for EAPI '$EAPI'"
exit 1
-#!/usr/bin/python -O
+#!@PORTAGE_PYTHON@ -O
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
from __future__ import print_function
-#!/usr/bin/python -O
+#!@PORTAGE_PYTHON@ -O
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
#
# dispatch-conf -- Integrate modified configs, post-emerge
-#!/usr/bin/python
+#!@PORTAGE_PYTHON@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
#
# Typical usage:
-#!/usr/bin/python -O
+#!@PORTAGE_PYTHON@ -O
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
from __future__ import print_function
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
+source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
if [ $# -lt 1 ] ; then
vecho "${0##*/}: at least one argument needed" 1>&2
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
# TODO: Eliminate race condition in signal delivery by using pipe or socket
# IPC to guarantee that the ebuild process and all of its children (including
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
+source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
if [[ $# -lt 1 ]] ; then
vecho "$0: at least one argument needed" 1>&2
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
if [[ $# -lt 1 ]] ; then
echo "$0: at least one argument needed" 1>&2
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
-exec install -d ${DIROPTIONS} "${@/#/${D}/}"
+exec install -d ${DIROPTIONS} "${@/#/${ED}/}"
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
if [ $# -lt 1 ] ; then
- source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
+ source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
vecho "${0##*/}: at least one argument needed" 1>&2
exit 1
fi
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
if [[ $# -lt 1 ]] ; then
echo "$0: at least one argument needed" 1>&2
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
+source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
if [[ $# -lt 1 ]] ; then
echo "$0: at least one argument needed" 1>&2
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
if [[ $# -ne 2 ]] ; then
echo "$0: two arguments needed" 1>&2
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
-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}
# Set EPYTHON variable as empty so that dohtml doesn't try
# to use potentially unsupported version of Python.
EPYTHON= PYTHONPATH=$PORTAGE_PYM_PATH${PYTHONPATH:+:}$PYTHONPATH \
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
if [[ -z $1 ]] ; then
vecho "${0##*/}: at least one argument needed"
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
if [[ $# -lt 1 ]] ; then
echo "$0: at least one argument needed" 1>&2
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
+source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
if [ $# -lt 1 ] ; then
echo "${0##*/}: at least one argument needed" 1>&2
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
# Setup ABI cruft
LIBDIR_VAR="LIBDIR_${ABI}"
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
exec env LIBOPTIONS="-m0644" \
dolib "$@"
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
exec env LIBOPTIONS="-m0755" \
dolib "$@"
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
+source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
if [[ $# -lt 1 ]] ; then
echo "$0: at least one argument needed" 1>&2
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
mynum=${#}
if [ ${mynum} -lt 1 ] ; then
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
if [[ $# -lt 1 ]] ; then
echo "$0: at least one argument needed" 1>&2
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
if [[ $# -lt 1 ]] ; then
echo "!!! ${0##*/}: at least one argument needed" >&2
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
if [[ $# -ne 2 ]] ; then
echo "$0: two arguments needed" 1>&2
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
+source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
if [[ -z $1 ]] ; then
vecho "${0##*/}: at least one argument needed" 1>&2
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
+source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
if [[ -z $1 ]] ; then
vecho "${0##*/}: at least one argument needed" 1>&2
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
+source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
${0##*/} "$@"
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
#
# emake: Supplies some default parameters to GNU make. At the moment the
# only parameter supplied is -jN, where N is a number of
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
# we can't prefix all arguments because
# chown takes random options
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
# we can't prefix all arguments because
# chmod takes random options
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
echo "$0: Need two arguments, old file and new file" 1>&2
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
echo "$0: Need two arguments, old file and new file" 1>&2
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
echo "$0: Need two arguments, old file and new file" 1>&2
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
echo "$0: Need two arguments, old file and new file" 1>&2
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
echo "$0: Need two arguments, old file and new file" 1>&2
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
echo "$0: Need two arguments, old file and new file" 1>&2
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
echo "$0: Need two arguments, old file and new file" 1>&2
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
echo "$0: Need two arguments, old file and new file" 1>&2
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
echo "$0: Need two arguments, old file and new file" 1>&2
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
echo "$0: Need two arguments, old file and new file" 1>&2
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
echo "$0: Need two arguments, old file and new file" 1>&2
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
-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}
# Set EPYTHON variable as empty so that dohtml doesn't try
# to use potentially unsupported version of Python.
EPYTHON= PYTHONPATH=$PORTAGE_PYM_PATH${PYTHONPATH:+:}$PYTHONPATH \
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
+source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
if hasq chflags $FEATURES ; then
# Save all the file flags for restoration at the end of prepall.
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
+source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
if [[ -n $1 ]] ; then
vecho "${0##*/}: invalid usage; takes no arguments" 1>&2
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
-
-[[ ! -d ${D}usr/share/info ]] && exit 0
+[[ ! -d ${ED}usr/share/info ]] && exit 0
exec prepinfo
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
-
ret=0
-find "${D}" -type d -name man > "${T}"/prepallman.filelist
+[[ -d ${ED} ]] || exit ${ret}
+
+find "${ED}" -type d -name man > "${T}"/prepallman.filelist
while read mandir ; do
- mandir=${mandir#${D}}
+ mandir=${mandir#${ED}}
prepman "${mandir%/man}"
((ret|=$?))
done < "${T}"/prepallman.filelist
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
-exec prepstrip "${D}"
+exec prepstrip "${ED}"
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
+source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
if [[ -z $1 ]] ; then
- infodir="/usr/share/info"
+ infodir="${EPREFIX}/usr/share/info"
else
- if [[ -d ${D}$1/share/info ]] ; then
- infodir="$1/share/info"
+ if [[ -d ${ED}$1/share/info ]] ; then
+ infodir="${EPREFIX}$1/share/info"
else
- infodir="$1/info"
+ infodir="${EPREFIX}$1/info"
fi
fi
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
+source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
eqawarn "QA Notice: Deprecated call to 'preplib'"
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
+source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
if [[ -z $1 ]] ; then
- mandir="${D}usr/share/man"
+ mandir="${ED}usr/share/man"
else
- mandir="${D}$1/man"
+ mandir="${ED}$1/man"
fi
if [[ ! -d ${mandir} ]] ; then
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
+source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
banner=false
SKIP_STRIP=false
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
scriptpath=${BASH_SOURCE[0]}
scriptname=${scriptpath##*/}
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
-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}"
# Don't use sandbox's BASH_ENV for new shells because it does
# 'source /etc/profile' which can interfere with the build
-#!/usr/bin/python
+#!@PORTAGE_PYTHON@
# Copyright 2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
from __future__ import print_function
-#!/usr/bin/python
+#!@PORTAGE_PYTHON@
# Copyright 2006-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
from __future__ import print_function
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
# Author: Karl Trygve Kalleberg <karltk@gentoo.org>
# Rewritten from the old, Perl-based emerge-webrsync script
# Author: Alon Bar-Lev <alon.barlev@gmail.com>
-#!/usr/bin/python -O
+#!@PORTAGE_PYTHON@ -O
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
from __future__ import print_function
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
# Author Brandon Low <lostlogic@gentoo.org>
#
-#!/usr/bin/python
+#!@PORTAGE_PYTHON@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
import codecs
import os, re, sys
-#!/usr/bin/python
+#!@PORTAGE_PYTHON@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
from __future__ import print_function
-#!/usr/bin/python
+#!@PORTAGE_PYTHON@
# Copyright 2008-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
from __future__ import print_function
-#!/bin/bash
+#!@PORTAGE_BASH@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
#
# Miscellaneous shell functions that make use of the ebuild env but don't need
# to be included directly in ebuild.sh.
-#!/usr/bin/python -O
+#!@PORTAGE_PYTHON@ -O
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
from __future__ import print_function
-#!/usr/bin/python
+#!@PORTAGE_PYTHON@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
from __future__ import print_function
-#!/usr/bin/python
+#!@PORTAGE_PYTHON@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
# NOTE: this file does not respect ROOT
-#!/usr/bin/python -O
+#!@PORTAGE_PYTHON@ -O
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
# Next to do: dep syntax checking in mask files
# Then, check to make sure deps are satisfiable (to avoid "can't find match for" problems)
-#!/usr/bin/python
+#!@PORTAGE_PYTHON@
# Copyright 2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
import optparse
import sys
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
from _emerge.DependencyArg import DependencyArg
-try:
- import portage
-except ImportError:
- from os import path as osp
- import sys
- sys.path.insert(0, osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), "pym"))
- import portage
+
+# for an explanation on this logic, see pym/_emerge/__init__.py
+import os
+import sys
+if os.environ.__contains__("PORTAGE_PYTHONPATH"):
+ sys.path.insert(0, os.environ["PORTAGE_PYTHONPATH"])
+else:
+ sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), "pym"))
+import portage
+
class AtomArg(DependencyArg):
def __init__(self, atom=None, **kwargs):
DependencyArg.__init__(self, **kwargs)
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
from _emerge.SpawnProcess import SpawnProcess
-import portage
+# for an explanation on this logic, see pym/_emerge/__init__.py
import os
+import sys
+if os.environ.__contains__("PORTAGE_PYTHONPATH"):
+ sys.path.insert(0, os.environ["PORTAGE_PYTHONPATH"])
+else:
+ sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), "pym"))
+import portage
class BinpkgExtractorAsync(SpawnProcess):
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
from _emerge.Task import Task
-try:
- import portage
-except ImportError:
- from os import path as osp
- import sys
- sys.path.insert(0, osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), "pym"))
- import portage
+# for an explanation on this logic, see pym/_emerge/__init__.py
+import os
+import sys
+if os.environ.__contains__("PORTAGE_PYTHONPATH"):
+ sys.path.insert(0, os.environ["PORTAGE_PYTHONPATH"])
+else:
+ sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), "pym"))
+import portage
class Blocker(Task):
__hash__ = Task.__hash__
# portage: Constants
# Copyright 1998-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
+# ===========================================================================
+# autotool supplied constants.
+# ===========================================================================
+from portage.const_autotool import *
+
import os
+# save the original prefix
+BPREFIX = EPREFIX
+# pick up EPREFIX from the environment if set
+if "EPREFIX" in os.environ:
+ EPREFIX = os.path.normpath(os.environ["EPREFIX"])
+
# ===========================================================================
# START OF CONSTANTS -- START OF CONSTANTS -- START OF CONSTANTS -- START OF
# ===========================================================================
LOCALE_DATA_PATH = PORTAGE_BASE_PATH + "/locale" # FIXME: not used
EBUILD_SH_BINARY = PORTAGE_BIN_PATH + "/ebuild.sh"
MISC_SH_BINARY = PORTAGE_BIN_PATH + "/misc-functions.sh"
-SANDBOX_BINARY = "/usr/bin/sandbox"
-FAKEROOT_BINARY = "/usr/bin/fakeroot"
-BASH_BINARY = "/bin/bash"
-MOVE_BINARY = "/bin/mv"
-PRELINK_BINARY = "/usr/sbin/prelink"
+SANDBOX_BINARY = BPREFIX + "/usr/bin/sandbox"
+FAKEROOT_BINARY = BPREFIX + "/usr/bin/fakeroot"
+BASH_BINARY = PORTAGE_BASH
+MOVE_BINARY = PORTAGE_MV
+PRELINK_BINARY = EPREFIX + "/usr/sbin/prelink"
+ PORTAGE_GROUPNAME = os.environ.get("PORTAGE_GROUPNAME", 'portage')
+ PORTAGE_USERNAME = os.environ.get("PORTAGE_USERNAME", 'portage')
+
INVALID_ENV_FILE = "/etc/spork/is/not/valid/profile.env"
REPO_NAME_FILE = "repo_name"
REPO_NAME_LOC = "profiles" + "/" + REPO_NAME_FILE
# data.py -- Calculated/Discovered Data Values
# Copyright 1998-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
import os, sys, pwd, grp, platform
- from portage.const import rootuid, portageuser, portagegroup, EPREFIX
-from portage.const import PORTAGE_GROUPNAME, PORTAGE_USERNAME
++from portage.const import PORTAGE_GROUPNAME, PORTAGE_USERNAME ,rootuid, EPREFIX
import portage
portage.proxy.lazyimport.lazyimport(globals(),
# Copyright 1998-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
__all__ = ["PreservedLibsRegistry", "LinkageMap",
+ "LinkageMapMachO", "LinkageMapPeCoff", "LinkageMapXCoff"
"vardbapi", "vartree", "dblink"] + \
["write_contents", "tar_contents"]
# Copyright 2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
- # $Id$
-import errno
import re
from itertools import chain