From: Zac Medico Date: Sat, 24 May 2008 22:24:58 +0000 (-0000) Subject: Fix broken dep_getusedeps() cache behavior so that it returns the X-Git-Tag: v2.2_pre8~119 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2c109703e505ac3d17e261f6fd16bb49f9dcb23c;p=portage.git Fix broken dep_getusedeps() cache behavior so that it returns the correct type. svn path=/main/trunk/; revision=10395 --- diff --git a/pym/portage/dep.py b/pym/portage/dep.py index fa87a7719..3e642b517 100644 --- a/pym/portage/dep.py +++ b/pym/portage/dep.py @@ -345,6 +345,7 @@ class _use_dep(object): disabled_flags.append(x[1:]) else: enabled_flags.append(x) + self.tokens = use self.enabled = frozenset(enabled_flags) self.disabled = frozenset(disabled_flags) self.required = self.enabled.union(self.disabled) @@ -499,8 +500,8 @@ def dep_getusedeps( depend ): @return: List of use flags ( or [] if no flags exist ) """ use = getattr(depend, "use", None) - if use is not None: - return use + if use is not None and hasattr(use, "tokens"): + return use.tokens use_list = [] open_bracket = depend.find('[') # -1 = failure (think c++ string::npos)