From 67f2caa5d98c9a0cf6bdbb6739f016c01ce2387f Mon Sep 17 00:00:00 2001 From: fuzzyray Date: Thu, 29 Mar 2007 22:17:01 +0000 Subject: [PATCH] Change package.get_???_deps() methods to try the portage tree first, since emerge always uses the portage tree for dependencies. (Bug #164678) svn path=/; revision=368 --- trunk/ChangeLog | 5 +++++ trunk/src/gentoolkit/package.py | 21 +++++++++++++++------ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/trunk/ChangeLog b/trunk/ChangeLog index 1a36199..80e6d75 100644 --- a/trunk/ChangeLog +++ b/trunk/ChangeLog @@ -1,3 +1,8 @@ +2007-03-29: Paul Varner + * gentoolkit: Change package.get_???_deps() methods to try the portage + tree first, since emerge always uses the portage tree for dependencies. + (Bug #164678) + 2007-03-29: Paul Varner * equery: Convert deprecated strings functions to str methods (Bug #172694) diff --git a/trunk/src/gentoolkit/package.py b/trunk/src/gentoolkit/package.py index 71ebb11..480467b 100644 --- a/trunk/src/gentoolkit/package.py +++ b/trunk/src/gentoolkit/package.py @@ -72,24 +72,33 @@ class Package: def get_runtime_deps(self): """Returns a linearised list of first-level run time dependencies for this package, on the form [(comparator, [use flags], cpv), ...]""" - # Always use the portage tree, since emerge only uses the tree when calculating dependencies - cd = self.get_env_var("RDEPEND").split() + # Try to use the portage tree first, since emerge only uses the tree when calculating dependencies + try: + cd = self.get_env_var("RDEPEND", porttree).split() + except KeyError: + cd = self.get_env_var("RDEPEND", vartree).split() r,i = self._parse_deps(cd) return r def get_compiletime_deps(self): """Returns a linearised list of first-level compile time dependencies for this package, on the form [(comparator, [use flags], cpv), ...]""" - # Always use the portage tree, since emerge only uses the tree when calculating dependencies - rd = self.get_env_var("DEPEND").split() + # Try to use the portage tree first, since emerge only uses the tree when calculating dependencies + try: + rd = self.get_env_var("DEPEND", porttree).split() + except KeyError: + rd = self.get_env_var("DEPEND", vartree).split() r,i = self._parse_deps(rd) return r def get_postmerge_deps(self): """Returns a linearised list of first-level post merge dependencies for this package, on the form [(comparator, [use flags], cpv), ...]""" - # Always use the portage tree, since emerge only uses the tree when calculating dependencies - pd = self.get_env_var("PDEPEND").split() + # Try to use the portage tree first, since emerge only uses the tree when calculating dependencies + try: + pd = self.get_env_var("PDEPEND", porttree).split() + except KeyError: + pd = self.get_env_var("PDEPEND", vartree).split() r,i = self._parse_deps(pd) return r -- 2.26.2