+2006-03-01 Paul Varner <fuzzyray@gentoo.org>
+ * gentoolkit: Fix depends parsing to properly handle conjunction. (bug
+ #123725). Thanks to tgl for the patch.
+ * gentoolkit: Added function to get post-merge dependencies (PDEPEND)
+ (bug #99191)
+ * gentoolkit: Change get_dependency functions to always use the
+ portage tree
+ * equery: Added post-merge dependencies to depends and depgraph
+ actions. (bug #99191)
+ * equery: Removed requirement for package to be installed to use
+ depgraph action.
+
2006-02-16 Marius Mauch <genone@gentoo.org>
* euse: add/remove use flags even if there is no USE= statement in make.conf
(bug #95432)
matches = gentoolkit.find_packages(query, True)
for pkg in matches:
- if not pkg.is_installed():
- continue
if not Config["piping"] and Config["verbosityLevel"] >= 3:
print_info(3, pp.section("* ") + "dependency graph for " + pp.cpv(pkg.get_cpv()))
else:
pkgtbl.append(cpv)
- pkgdeps = pkg.get_runtime_deps() + pkg.get_compiletime_deps()
+ pkgdeps = pkg.get_runtime_deps() + pkg.get_compiletime_deps() + pkg.get_postmerge_deps()
for x in pkgdeps:
suffix = ""
cpv = x[2]
print_info(1, pp.section("* ") + "Dependencies for " + pp.cpv(pkg.get_cpv()) + ":")
try:
- deps = pkg.get_runtime_deps() + pkg.get_compiletime_deps()
+ deps = pkg.get_runtime_deps() + pkg.get_compiletime_deps() + pkg.get_postmerge_deps()
except KeyError, e:
# If the ebuild is not found...
continue
for pkg in packages:
try:
- deps = pkg.get_runtime_deps() + pkg.get_compiletime_deps()
+ deps = pkg.get_runtime_deps() + pkg.get_compiletime_deps() + pkg.get_postmerge_deps()
except KeyError, e:
# If the ebuild is not found...
continue
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), ...]"""
- cd = self.get_env_var("RDEPEND").split()
+ # Always use the portage tree, since emerge only uses the tree when calculating dependencies
+ cd = self.get_env_var("RDEPEND", porttree).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), ...]"""
- rd = self.get_env_var("DEPEND").split()
+ # Always use the portage tree, since emerge only uses the tree when calculating dependencies
+ rd = self.get_env_var("DEPEND", porttree).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), ...]"""
- pd = self.get_env_var("PDEPEND").split()
+ # Always use the portage tree, since emerge only uses the tree when calculating dependencies
+ pd = self.get_env_var("PDEPEND", porttree).split()
r,i = self._parse_deps(pd)
return r
r += sr
i += l + 3
continue
- # conjunction, like in "|| ( ( foo bar ) baz )" => recurse
+ # conjonction, like in "|| ( ( foo bar ) baz )" => recurse
if tok == "(":
sr,l = self._parse_deps(deps[i+1:],curuse,level=level+1)
r += sr
if len(sp):
return string.join(sp[:-1],"/")
- def get_env_var(self, var):
+ def get_env_var(self, var, tree=""):
"""Returns one of the predefined env vars DEPEND, RDEPEND, SRC_URI,...."""
- mytree = vartree
- if not self.is_installed():
- mytree = porttree
+ if tree == "":
+ mytree = vartree
+ if not self.is_installed():
+ mytree = porttree
+ else:
+ mytree = tree
r = mytree.dbapi.aux_get(self._cpv,[var])
if not r:
raise FatalError("Could not find the package tree")