diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-04-07 14:16:52 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-04-07 14:16:52 -0700 |
commit | e74fe3dead966f61b8ee1b0c5774dbfe6ba55ef0 (patch) | |
tree | b6d8896e7e9216d31b6e7f0717552f4c73682ced | |
parent | In _run_pkg_pretend(), write ebuild bytes from tbz2.getfile() in binary mode (diff) | |
download | portage-idfetch-e74fe3dead966f61b8ee1b0c5774dbfe6ba55ef0.tar.gz portage-idfetch-e74fe3dead966f61b8ee1b0c5774dbfe6ba55ef0.tar.bz2 portage-idfetch-e74fe3dead966f61b8ee1b0c5774dbfe6ba55ef0.zip |
Use tbz2.unpackinfo() to unpack the xpak when running pkg_pretend, since we
need evironment.bz2 to get unpacked here.
-rw-r--r-- | pym/_emerge/Scheduler.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py index 7a0b95a9..d89fa480 100644 --- a/pym/_emerge/Scheduler.py +++ b/pym/_emerge/Scheduler.py @@ -897,13 +897,10 @@ class Scheduler(PollScheduler): fetcher.wait() tbz2_file = bintree.getname(x.cpv) - ebuild_file_name = x.cpv.split("/")[1] + ".ebuild" - ebuild_file_contents = portage.xpak.tbz2(tbz2_file).getfile(ebuild_file_name) - os.makedirs(os.path.join(tmpdir, x.category, x.pf)) - ebuild_path = os.path.join(tmpdir, x.category, x.pf, ebuild_file_name) - file = open(ebuild_path, 'wb') - file.write(ebuild_file_contents) - file.close() + infloc = os.path.join(tmpdir, x.category, x.pf, "build-info") + os.makedirs(infloc) + portage.xpak.tbz2(tbz2_file).unpackinfo(infloc) + ebuild_path = os.path.join(infloc, x.pf + ".ebuild") else: tree = "porttree" |