inject binpkg after fetch for pkg_pretend
authorZac Medico <zmedico@gentoo.org>
Mon, 6 Dec 2010 00:56:04 +0000 (16:56 -0800)
committerZac Medico <zmedico@gentoo.org>
Mon, 6 Dec 2010 00:57:46 +0000 (16:57 -0800)
pym/_emerge/Scheduler.py

index ca460e07962309985aea06314ab09b0b7ab9b8e0..89313e8832c1f01c31a7ad1cbca858fb13b9f492 100644 (file)
@@ -1021,6 +1021,7 @@ class Scheduler(PollScheduler):
                                if x.built:
                                        tree = "bintree"
                                        bintree = root_config.trees["bintree"].dbapi.bintree
+                                       fetched = False
 
                                        # Display fetch on stdout, so that it's always clear what
                                        # is consuming time here.
@@ -1031,6 +1032,7 @@ class Scheduler(PollScheduler):
                                                if fetcher.wait() != os.EX_OK:
                                                        failures += 1
                                                        continue
+                                               fetched = fetcher.pkg_path
 
                                        verifier = BinpkgVerifier(pkg=x,
                                                scheduler=sched_iface)
@@ -1039,6 +1041,8 @@ class Scheduler(PollScheduler):
                                                failures += 1
                                                continue
 
+                                       if fetched:
+                                               bintree.inject(x.cpv, filename=fetched)
                                        tbz2_file = bintree.getname(x.cpv)
                                        infloc = os.path.join(tmpdir, x.category, x.pf, "build-info")
                                        os.makedirs(infloc)