EbuildPhase: fix WORKDIR owner after unpack
authorZac Medico <zmedico@gentoo.org>
Mon, 10 Sep 2012 00:30:19 +0000 (17:30 -0700)
committerZac Medico <zmedico@gentoo.org>
Wed, 12 Sep 2012 06:45:52 +0000 (23:45 -0700)
See bug #332217, comment #24.

pym/_emerge/EbuildPhase.py

index 84e80189844795d766e5f7e6af6f5dbcd712baa7..61e9a6f84e443ec578550032f22c66fb6c1b7438 100644 (file)
@@ -11,6 +11,7 @@ from _emerge.BinpkgEnvExtractor import BinpkgEnvExtractor
 from _emerge.MiscFunctionsProcess import MiscFunctionsProcess
 from _emerge.EbuildProcess import EbuildProcess
 from _emerge.CompositeTask import CompositeTask
+from portage.package.ebuild.prepare_build_dirs import _prepare_workdir
 from portage.util import writemsg
 
 try:
@@ -216,8 +217,10 @@ class EbuildPhase(CompositeTask):
                if self.phase == "unpack":
                        # Bump WORKDIR timestamp, in case tar gave it a timestamp
                        # that will interfere with distfiles / WORKDIR timestamp
-                       # comparisons as reported in bug #332217.
+                       # comparisons as reported in bug #332217. Also, fix
+                       # ownership since tar can change that too.
                        os.utime(settings["WORKDIR"], None)
+                       _prepare_workdir(settings)
                elif self.phase == "install":
                        out = io.StringIO()
                        _post_src_install_write_metadata(settings)