From: Fabian Groffen Date: Wed, 3 Mar 2010 18:44:28 +0000 (-0000) Subject: Merged from trunk -r15497:15507 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=db841a2190a5cd9a2898fc71b38a31226c828e5f;p=portage.git Merged from trunk -r15497:15507 | 15501 | Remove unused imports. | | zmedico | | | 15502 | Remove unused print() import. | | zmedico | | | 15503 | Bug #307235 - Inside depgraph._add_dep, discard child | | zmedico | choices for deps that will be not be processed immediately, | | | since "complete" mode may select a different child later. | | 15504 | Remove unused print_function. | | zmedico | | | 15505 | Remove redundant local elog_process import that can trigger | | zmedico | UnboundLocalError in some cases. | | 15506 | Remove redundant eerror import. | | zmedico | | | 15507 | Call stack_lists on profile_only_variables for incremental | | zmedico | processing. | svn path=/main/branches/prefix/; revision=15735 --- diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index d7adea83e..73ff21cf8 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -827,6 +827,10 @@ class depgraph(object): # should have been masked. raise if not myarg: + # Existing child selection may not be valid unless + # it's added to the graph immediately, since "complete" + # mode may select a different child later. + dep.child = None self._dynamic_config._ignored_deps.append(dep) return 1 diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index a2f9b4ab2..8309fb03c 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -3,8 +3,6 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ -from __future__ import print_function - VERSION="$Rev$"[6:-2] + "-svn" # =========================================================================== @@ -14,21 +12,17 @@ VERSION="$Rev$"[6:-2] + "-svn" try: import sys import codecs - import copy import errno if not hasattr(errno, 'ESTALE'): # ESTALE may not be defined on some systems, such as interix. errno.ESTALE = -1 - import logging import re - import time import types try: import cPickle as pickle except ImportError: import pickle - import stat try: from subprocess import getstatusoutput as subprocess_getstatusoutput except ImportError: @@ -43,7 +37,6 @@ try: from StringIO import StringIO import platform - import warnings # Temporarily delete these imports, to ensure that only the # wrapped versions are imported by portage internals. @@ -154,8 +147,6 @@ try: INCREMENTALS, EAPI, MISC_SH_BINARY, REPO_NAME_LOC, REPO_NAME_FILE, \ EPREFIX, EPREFIX_LSTRIP, BPREFIX, rootuid - from portage.localization import _ - except ImportError as e: sys.stderr.write("\n\n") sys.stderr.write("!!! Failed to complete portage imports. There are internal modules for\n") diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py index f2095995a..c39c05614 100644 --- a/pym/portage/package/ebuild/config.py +++ b/pym/portage/package/ebuild/config.py @@ -730,6 +730,7 @@ class config(object): # Don't allow the user to override certain variables in make.conf profile_only_variables = self.configdict["defaults"].get( "PROFILE_ONLY_VARIABLES", "").split() + profile_only_variables = stack_lists([profile_only_variables]) for k in profile_only_variables: self.mygcfg.pop(k, None) diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py index c6a85adcc..a900758b6 100644 --- a/pym/portage/package/ebuild/doebuild.py +++ b/pym/portage/package/ebuild/doebuild.py @@ -996,7 +996,6 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0, # The merge phase handles this already. Callers don't know how # far this function got, so we have to call elog_process() here # so that it's only called once. - from portage.elog import elog_process elog_process(mysettings.mycpv, mysettings) if retval == os.EX_OK: retval = merge(mysettings["CATEGORY"], mysettings["PF"], @@ -1624,7 +1623,6 @@ def _post_src_install_uid_fix(mysettings, out=None): break if unicode_errors: - from portage.elog.messages import eerror for l in _merge_unicode_error(unicode_errors): eerror(l, phase='install', key=mysettings.mycpv, out=out) diff --git a/pym/portage/tests/runTests b/pym/portage/tests/runTests index 57e23f583..8c944bf25 100755 --- a/pym/portage/tests/runTests +++ b/pym/portage/tests/runTests @@ -4,8 +4,6 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ -from __future__ import print_function - import os, sys import os.path as osp