followup mac orange fix (so we can turn mac nightly update generation on ) for Bug 386760 - directory removal with software update. r=khuey, a=LegNeato
authorRobert Strong <robert.bugzilla@gmail.com>
Tue, 12 Apr 2011 17:31:47 -0700
changeset 68030 155da7ebad86bb2e8b6fedbd219d1f41e64b98ab
parent 68029 852f1e413b3dd33969043868611ac400293477d6
child 68031 66aad63375e28550a6436779c10bc316f273fa15
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey, LegNeato
bugs386760
milestone5.0a2
followup mac orange fix (so we can turn mac nightly update generation on ) for Bug 386760 - directory removal with software update. r=khuey, a=LegNeato
config/createprecomplete.py
--- a/config/createprecomplete.py
+++ b/config/createprecomplete.py
@@ -40,16 +40,20 @@ def get_build_entries(root_path):
     return rel_file_path_list, rel_dir_path_list
 
 def generate_precomplete():
     """ Creates the precomplete file containing the remove, remove-cc, and rmdir
         application update instructions. The current working directory is used
         for the location to enumerate and to create the precomplete file.
     """
     root_path = os.getcwd()
+    # If inside a Mac bundle use the root of the bundle for the path.
+    if os.path.basename(root_path) == "MacOS":
+        root_path = os.path.abspath(os.path.join(root_path, '../../'))
+
     rel_file_path_list, rel_dir_path_list = get_build_entries(root_path)
     precomplete_file_path = os.path.join(root_path,"precomplete")
     # open in binary mode to prevent OS specific line endings.
     precomplete_file = open(precomplete_file_path, "wb")
     for rel_file_path in rel_file_path_list:
         if rel_file_path.endswith("channel-prefs.js"):
             precomplete_file.writelines("remove-cc \""+rel_file_path+"\"\n")
         else: