diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-08-17 11:55:13 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-08-17 11:55:13 -0700 |
commit | 7c30e35b614171fa26097944fa0d48e8de88f486 (patch) | |
tree | abf0e27e7f9e7d05d3ec1c21ec55cb268dd7e2e5 | |
parent | 0649dbd48ed6628b97810b52590dcea28faa449f (diff) | |
download | portage-7c30e35b614171fa26097944fa0d48e8de88f486.tar.gz portage-7c30e35b614171fa26097944fa0d48e8de88f486.tar.bz2 portage-7c30e35b614171fa26097944fa0d48e8de88f486.zip |
Use binarytree._ensure_dir() to create the binpkg parent dir.
-rw-r--r-- | pym/portage/package/ebuild/doebuild.py | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py index 75dab8738..f77c9a456 100644 --- a/pym/portage/package/ebuild/doebuild.py +++ b/pym/portage/package/ebuild/doebuild.py @@ -722,12 +722,17 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0, # Make sure the package directory exists before executing # this phase. This can raise PermissionDenied if # the current user doesn't have write access to $PKGDIR. - parent_dir = os.path.join(mysettings["PKGDIR"], - mysettings["CATEGORY"]) - portage.util.ensure_dirs(parent_dir) - if not os.access(parent_dir, os.W_OK): - raise PermissionDenied( - "access('%s', os.W_OK)" % parent_dir) + if hasattr(portage, 'db'): + bintree = portage.db[mysettings["ROOT"]]["bintree"] + bintree._ensure_dir(os.path.join( + bintree.pkgdir, mysettings["CATEGORY"])) + else: + parent_dir = os.path.join(mysettings["PKGDIR"], + mysettings["CATEGORY"]) + portage.util.ensure_dirs(parent_dir) + if not os.access(parent_dir, os.W_OK): + raise PermissionDenied( + "access('%s', os.W_OK)" % parent_dir) retval = spawnebuild(mydo, actionmap, mysettings, debug, logfile=logfile, fd_pipes=fd_pipes, returnpid=returnpid) |