7178978 still cannot do concurrent DC build after fix for 7178336 went in
authorGinnie Wray<virginia.wray@oracle.com>
Mon, 25 Jun 2012 23:37:20 -0600
changeset 1729 f381cfe49a42
parent 1728 d2b605802650
child 1730 088803910c27
7178978 still cannot do concurrent DC build after fix for 7178336 went in
usr/src/cmd/distro_const/__init__.py
--- a/usr/src/cmd/distro_const/__init__.py	Mon Jun 25 16:27:55 2012 -0700
+++ b/usr/src/cmd/distro_const/__init__.py	Mon Jun 25 23:37:20 2012 -0600
@@ -65,7 +65,7 @@
 DC_LOCKFILE = "distro_const.lock"
 DC_LOGGER = None
 LOG_TIMESTAMP = time.strftime("%Y-%m-%d.%H:%M")
-DEFAULTLOG = system_temp_path("dc/default_log" + '.' + str(os.getpid()))
+DEFAULTLOG = system_temp_path("dc" + str(os.getpid()) + "/default_log")
 
 
 class Lockfile(object):
@@ -501,8 +501,10 @@
                 DC_LOGGER.transfer_log(destination=new_detaillog)
                 simple_fh.transfer_log(destination=new_simplelog)
 
-                # Remove the original DEFAULTLOG. It's no longer needed
-                shutil.rmtree(base)
+                # Remove the directory containing DEFAULTLOG and the original
+		# simple log. Their contents have been transferred to the DC
+		# log location.
+		shutil.rmtree(os.path.dirname(DEFAULTLOG))
 
                 # set the http_proxy if one is specified in the manifest
                 dc_set_http_proxy(DC_LOGGER)