Merged from trunk -r15497:15507
authorFabian Groffen <grobian@gentoo.org>
Wed, 3 Mar 2010 18:44:28 +0000 (18:44 -0000)
committerFabian Groffen <grobian@gentoo.org>
Wed, 3 Mar 2010 18:44:28 +0000 (18:44 -0000)
   | 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

pym/_emerge/depgraph.py
pym/portage/__init__.py
pym/portage/package/ebuild/config.py
pym/portage/package/ebuild/doebuild.py
pym/portage/tests/runTests

index d7adea83e2d6a31dec844699cb6dd0024a7cb100..73ff21cf81957df1521029dabb4960a8e050602e 100644 (file)
@@ -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
 
index a2f9b4ab2f87b679a1d5a9d1a4cee480b188bb7a..8309fb03c5ca4aa56ea625df7559e58e66906bde 100644 (file)
@@ -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")
index f2095995a13b5f6a92de2a2c94b23342ce401667..c39c05614516e113cba5b9fb8416f92a1a051a47 100644 (file)
@@ -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)
 
index c6a85adccfd8de351dffaa123e928b2bb9077b05..a900758b6c50ea3672034fbbb427403fb8486268 100644 (file)
@@ -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)
 
index 57e23f583594955ef49f712c0556d0ba8c55e5fb..8c944bf256e7f33e4fc3b6319bcb2bda6799dd68 100755 (executable)
@@ -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