summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-06-29 23:56:36 -0700
committerZac Medico <zmedico@gentoo.org>2011-06-29 23:56:36 -0700
commit2942ff81aab3accf6e2408b7cc84056700b667db (patch)
tree26868873dca4234cb55ac40e92d2a0cdf939934f
parent86c8167c2ef23655d8e45bd3f1f547332546b424 (diff)
downloadportage-2942ff81aab3accf6e2408b7cc84056700b667db.tar.gz
portage-2942ff81aab3accf6e2408b7cc84056700b667db.tar.bz2
portage-2942ff81aab3accf6e2408b7cc84056700b667db.zip
ebuild(1): use bintree.inject for "package" phase
-rw-r--r--pym/portage/package/ebuild/doebuild.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package/ebuild/doebuild.py
index 4b4eaecad..267f4aff7 100644
--- a/pym/portage/package/ebuild/doebuild.py
+++ b/pym/portage/package/ebuild/doebuild.py
@@ -826,14 +826,18 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
actionmap[x]["dep"] = ' '.join(actionmap_deps[x])
if mydo in actionmap:
+ bintree = None
if mydo == "package":
# 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.
if hasattr(portage, 'db'):
bintree = portage.db[mysettings["ROOT"]]["bintree"]
- bintree._ensure_dir(os.path.join(
- bintree.pkgdir, mysettings["CATEGORY"]))
+ mysettings["PORTAGE_BINPKG_TMPFILE"] = \
+ bintree.getname(mysettings.mycpv) + \
+ ".%s" % (os.getpid(),)
+ bintree._ensure_dir(os.path.dirname(
+ mysettings["PORTAGE_BINPKG_TMPFILE"]))
else:
parent_dir = os.path.join(mysettings["PKGDIR"],
mysettings["CATEGORY"])
@@ -844,6 +848,11 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
retval = spawnebuild(mydo,
actionmap, mysettings, debug, logfile=logfile,
fd_pipes=fd_pipes, returnpid=returnpid)
+
+ if retval == os.EX_OK:
+ if mydo == "package" and bintree is not None:
+ bintree.inject(mysettings.mycpv,
+ filename=mysettings["PORTAGE_BINPKG_TMPFILE"])
elif mydo=="qmerge":
# check to ensure install was run. this *only* pops up when users
# forget it and are using ebuild