PATH="$PORTAGE_BIN_PATH/ebuild-helpers:$PREROOTPATH${PREROOTPATH:+:}${DEFAULT_PATH}:${ROOTPATH:+:}$ROOTPATH"
export PATH
-if [[ -z $PORTAGE_SETSID && -n $1 && $1 != depend ]] ; then
- # If available, use setsid to create a new login session so that we can use
- # SIGHUP to ensure that no orphaned subprocesses are left running.
- if type -P setsid >/dev/null ; then
- export PORTAGE_SETSID=1
- exec setsid "$PORTAGE_BIN_PATH/ebuild.sh" "$@"
- elif [[ -x $PORTAGE_BIN_PATH/setsid ]] ; then
- export PORTAGE_SETSID=1
- exec "$PORTAGE_BIN_PATH/setsid" "$PORTAGE_BIN_PATH/ebuild.sh" "$@"
- fi
-fi
-[[ $PORTAGE_SETSID = 1 ]] && trap 'trap : SIGHUP ; kill -s SIGHUP 0 ;' EXIT
-
# These two functions wrap sourcing and calling respectively. At present they
# perform a qa check to make sure eclasses and ebuilds and profiles don't mess
# with shell opts (shopts). Ebuilds/eclasses changing shopts should reset them
PORTAGE_DEPCACHEDIR PORTAGE_GID PORTAGE_INST_GID \
PORTAGE_INST_UID PORTAGE_LOG_FILE PORTAGE_MASTER_PID \
PORTAGE_QUIET \
- PORTAGE_REPO_NAME PORTAGE_RESTRICT \
- PORTAGE_SETSID PORTAGE_UPDATE_ENV \
+ PORTAGE_REPO_NAME PORTAGE_RESTRICT PORTAGE_UPDATE_ENV \
PORTAGE_VERBOSE PORTAGE_WORKDIR_MODE PORTDIR \
PORTDIR_OVERLAY ${!PORTAGE_SANDBOX_*} PREROOTPATH \
PROFILE_PATHS PWORKDIR QA_INTERCEPTORS \
"DEPEND.badmaskedindev":"Masked ebuilds with bad DEPEND settings (matched against *all* ebuilds) in developing arch",
"RDEPEND.badmaskedindev":"Masked ebuilds with RDEPEND settings (matched against *all* ebuilds) in developing arch",
"PDEPEND.badmaskedindev":"Masked ebuilds with PDEPEND settings (matched against *all* ebuilds) in developing arch",
+ "PDEPEND.suspect":"PDEPEND contains a package that usually only belongs in DEPEND.",
"DEPEND.syntax":"Syntax error in DEPEND (usually an extra/missing space/parenthesis)",
"RDEPEND.syntax":"Syntax error in RDEPEND (usually an extra/missing space/parenthesis)",
"PDEPEND.syntax":"Syntax error in PDEPEND (usually an extra/missing space/parenthesis)",
"KEYWORDS.missing",
"IUSE.invalid",
"IUSE.undefined",
+"PDEPEND.suspect",
"RDEPEND.implicit",
"RDEPEND.suspect",
"RESTRICT.invalid",
for token in mydepstr.split():
if token in operator_tokens or \
token[-1:] == "?":
- if token == "test?" and mytype == "RDEPEND":
- stats['RDEPEND.suspect'] += 1
- fails['RDEPEND.suspect'].append(relative_path + \
- ": 'test?' USE conditional in RDEPEND")
+ if token == "test?" and \
+ mytype in ("RDEPEND", "PDEPEND"):
+ stats[mytype + '.suspect'] += 1
+ fails[mytype + '.suspect'].append(relative_path + \
+ ": 'test?' USE conditional in %s" % mytype)
continue
try:
atom = portage.dep.Atom(token)
portage.dep_getkey(atom) == "virtual/jdk":
stats['java.eclassesnotused'] += 1
fails['java.eclassesnotused'].append(relative_path)
- elif mytype == "RDEPEND":
+ elif mytype in ("PDEPEND", "RDEPEND"):
if not is_blocker and \
portage.dep_getkey(atom) in suspect_rdepend:
- stats['RDEPEND.suspect'] += 1
- fails['RDEPEND.suspect'].append(
+ stats[mytype + '.suspect'] += 1
+ fails[mytype + '.suspect'].append(
relative_path + ": '%s'" % atom)
if eapi == "0":
if portage.dep.dep_getslot(atom):
+++ /dev/null
-#!@PORTAGE_PYTHON@ -O
-# Copyright 2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-import os
-import sys
-
-os.setsid()
-os.execl(sys.argv[1], *sys.argv[1:])
.B PDEPEND.badmaskedindev
Masked ebuilds with PDEPEND settings (matched against *all* ebuilds) in developing arch
.TP
+.B PDEPEND.suspect
+PDEPEND contains a package that usually only belongs in DEPEND
+.TP
.B PDEPEND.syntax
Syntax error in PDEPEND (usually an extra/missing space/parenthesis)
.TP
else:
# Do not backtrack if only USE have to be changed in
# order to satisfy the dependency.
- atom_without_use = dep.atom
- if dep.atom.use:
- atom_without_use = portage.dep.remove_slot(dep.atom)
- if dep.atom.slot:
- atom_without_use += ":" + dep.atom.slot
- atom_without_use = portage.dep.Atom(atom_without_use)
dep_pkg, existing_node = \
- self._select_package(dep.root, atom_without_use,
+ self._select_package(dep.root, dep.atom.without_use,
onlydeps=dep.onlydeps)
if dep_pkg is None:
self._dynamic_config._runtime_pkg_mask.setdefault(
def _show_unsatisfied_dep(self, root, atom, myparent=None, arg=None):
atom = portage.dep.Atom(atom)
atom_set = InternalPackageSet(initial_atoms=(atom,))
- atom_without_use = atom
- if atom.use:
- atom_without_use = portage.dep.remove_slot(atom)
- if atom.slot:
- atom_without_use += ":" + atom.slot
- atom_without_use = portage.dep.Atom(atom_without_use)
xinfo = '"%s"' % atom
if arg:
xinfo='"%s"' % arg
continue
match = db.match
if hasattr(db, "xmatch"):
- cpv_list = db.xmatch("match-all", atom_without_use)
+ cpv_list = db.xmatch("match-all", atom.without_use)
else:
- cpv_list = db.match(atom_without_use)
+ cpv_list = db.match(atom.without_use)
# descending order
cpv_list.reverse()
for cpv in cpv_list:
import _emerge.help
import portage.xpak, commands, errno, re, time
-from portage.output import colorize, xtermTitleReset
+from portage.output import colorize, xtermTitle, xtermTitleReset
from portage.output import create_color_func
good = create_color_func("GOOD")
bad = create_color_func("BAD")
portdb = trees[settings["ROOT"]]["porttree"].dbapi
xterm_titles = "notitles" not in settings.features
+ if xterm_titles:
+ xtermTitle("emerge")
tmpcmdline = []
if "--ignore-default-opts" not in myopts:
"""This gets out final log message in before we quit."""
if "--pretend" not in myopts:
emergelog(xterm_titles, " *** terminating.")
- if "notitles" not in settings.features:
+ if xterm_titles:
xtermTitleReset()
portage.atexit_register(emergeexit)
"EBUILD_PHASE", "EMERGE_FROM", "HOMEPAGE", "INHERITED", "IUSE",
"KEYWORDS", "LICENSE", "PDEPEND", "PF", "PKGUSE",
"PORTAGE_CONFIGROOT", "PORTAGE_IUSE", "PORTAGE_REPO_NAME",
- "PORTAGE_SETSID",
"PORTAGE_USE", "PROPERTIES", "PROVIDE", "RDEPEND", "RESTRICT",
"ROOT", "SLOT", "SRC_URI", "EPREFIX", "EROOT"
]
if portage.dep._dep_check_strict:
raise portage.exception.ParseError(
"invalid atom: '%s'" % x)
+ else:
+ # Only real Atom instances are allowed past this point.
+ continue
else:
if x.blocker and x.blocker.overlap.forbid and \
eapi in ("0", "1") and portage.dep._dep_check_strict:
for atom in atoms:
if atom[:1] == "!":
continue
- avail_pkg = mydbapi.match(atom)
+ # Ignore USE dependencies here since we don't want USE
+ # settings to adversely affect || preference evaluation.
+ avail_pkg = mydbapi.match(atom.without_use)
if avail_pkg:
avail_pkg = avail_pkg[-1] # highest (ascending order)
avail_slot = "%s:%s" % (dep_getkey(atom),
_atoms = weakref.WeakValueDictionary()
__slots__ = ("__weakref__", "blocker", "cp", "cpv", "operator",
- "slot", "use", "_str")
+ "slot", "use", "without_use", "_str",)
class _blocker(object):
__slots__ = ("overlap",)
use = dep_getusedeps(s)
if use:
use = _use_dep(use)
+ without_use = remove_slot(self)
+ if self.slot is not None:
+ without_use += ":" + self.slot
+ without_use = Atom(without_use)
else:
use = None
+ without_use = self
+
obj_setattr(self, "use", use)
+ obj_setattr(self, "without_use", without_use)
def __setattr__(self, name, value):
raise AttributeError("Atom instances are immutable",