diff options
author | Stanislav Ochotnicky <sochotnicky@gmail.com> | 2009-07-02 21:29:04 +0200 |
---|---|---|
committer | Stanislav Ochotnicky <sochotnicky@gmail.com> | 2009-07-02 22:17:15 +0200 |
commit | 73941c3907497fd214802400154daa9c271a0638 (patch) | |
tree | a376482da365c1ea4da9064c7639a531fb057068 /src/tinderbox/__init__.py | |
parent | Bit of documentation + whitespace fixes (diff) | |
download | collagen-73941c3907497fd214802400154daa9c271a0638.tar.gz collagen-73941c3907497fd214802400154daa9c271a0638.tar.bz2 collagen-73941c3907497fd214802400154daa9c271a0638.zip |
Quick hack to enable dep resolution
we definitely want to get rid of import _emerge eventually
Diffstat (limited to 'src/tinderbox/__init__.py')
-rw-r--r-- | src/tinderbox/__init__.py | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/tinderbox/__init__.py b/src/tinderbox/__init__.py index 463d1a7..a8943c1 100644 --- a/src/tinderbox/__init__.py +++ b/src/tinderbox/__init__.py @@ -148,11 +148,18 @@ class Tinderbox(object): deps_processed = [] for dep in group: - dep_ebuild = portdb.findname(dep) - ret = portage.doebuild(dep_ebuild, "merge", portage.root, settings, debug = False, tree="porttree") - - if ret != 0: - log.error("Unable to merge dependency %s for package %s (ebuild %s)" % (dep, pkg, dep_ebuild)) + orig_args = sys.argv + try: + # this will need to change since it's only a quick hack so that + # we don't have to do dep resolion ourselves + import _emerge as emerge + sys.argv = ["emerge","--verbose","=%s" % dep] + ret = emerge.emerge_main() + if ret != 0: + raise Exception("emerge_main() failed with error code %d" % ret) + except Exception, e: + log.error(format_exc()) + log.error("Unable to merge dependency %s for package %s" % (dep, pkg)) dep_failed = True break deps_processed.append(dep) |