summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2013-02-27 16:24:54 -0800
committerZac Medico <zmedico@gentoo.org>2013-02-27 16:24:54 -0800
commit3507aa783cdf93fd28a58fb32df2fe7e03c46330 (patch)
tree6d9d0b835755f42dc2318309539a28af766ae10c
parentDisplay: unsplit _display_use method parts (diff)
downloadportage-3507aa783cdf93fd28a58fb32df2fe7e03c46330.tar.gz
portage-3507aa783cdf93fd28a58fb32df2fe7e03c46330.tar.bz2
portage-3507aa783cdf93fd28a58fb32df2fe7e03c46330.zip
_display_use: use local variables
-rw-r--r--pym/_emerge/resolver/output.py35
1 files changed, 15 insertions, 20 deletions
diff --git a/pym/_emerge/resolver/output.py b/pym/_emerge/resolver/output.py
index 1ebb24878..9e383e262 100644
--- a/pym/_emerge/resolver/output.py
+++ b/pym/_emerge/resolver/output.py
@@ -58,11 +58,6 @@ class Display(object):
self.oldlp = None
self.myfetchlist = None
self.indent = ''
- self.is_new = True
- self.cur_use = None
- self.cur_iuse = None
- self.old_use = ''
- self.old_iuse = ''
self.use_expand = None
self.use_expand_hidden = None
self.pkgsettings = None
@@ -185,28 +180,28 @@ class Display(object):
@param pkg: _emerge.Package.Package instance
@param pkg_info: PkgInfo instance
Modifies self.use_expand_hidden, self.use_expand, self.verboseadd,
- self.forced_flags, self.cur_iuse, self.old_iuse, self.old_use
+ self.forced_flags
"""
self.forced_flags = set()
self.forced_flags.update(pkg.use.force)
self.forced_flags.update(pkg.use.mask)
- self.cur_use = [flag for flag in self.conf.pkg_use_enabled(pkg) \
+ cur_use = [flag for flag in self.conf.pkg_use_enabled(pkg) \
if flag in pkg.iuse.all]
- self.cur_iuse = sorted(pkg.iuse.all)
+ cur_iuse = sorted(pkg.iuse.all)
if pkg_info.previous_pkg is not None:
previous_pkg = pkg_info.previous_pkg
- self.old_iuse = sorted(previous_pkg.iuse.all)
- self.old_use = previous_pkg.use.enabled
- self.is_new = False
+ old_iuse = sorted(previous_pkg.iuse.all)
+ old_use = previous_pkg.use.enabled
+ is_new = False
else:
- self.old_iuse = []
- self.old_use = []
- self.is_new = True
+ old_iuse = []
+ old_use = []
+ is_new = True
- self.old_use = [flag for flag in self.old_use if flag in self.old_iuse]
+ old_use = [flag for flag in old_use if flag in old_iuse]
self.use_expand = pkg.use.expand
self.use_expand_hidden = pkg.use.expand_hidden
@@ -233,10 +228,10 @@ class Display(object):
reinst_expand_map)
cur_iuse_map, iuse_forced = \
- self.map_to_use_expand(self.cur_iuse, forced_flags=True)
- cur_use_map = self.map_to_use_expand(self.cur_use)
- old_iuse_map = self.map_to_use_expand(self.old_iuse)
- old_use_map = self.map_to_use_expand(self.old_use)
+ self.map_to_use_expand(cur_iuse, forced_flags=True)
+ cur_use_map = self.map_to_use_expand(cur_use)
+ old_iuse_map = self.map_to_use_expand(old_iuse)
+ old_use_map = self.map_to_use_expand(old_use)
use_expand = sorted(self.use_expand)
use_expand.insert(0, "USE")
@@ -248,7 +243,7 @@ class Display(object):
self.verboseadd += _create_use_string(self.conf, key.upper(),
cur_iuse_map[key], iuse_forced[key],
cur_use_map[key], old_iuse_map[key],
- old_use_map[key], self.is_new, feature_flags,
+ old_use_map[key], is_new, feature_flags,
reinst_flags_map.get(key))
return