Bug 658094 - Partial updates for 5.0b1 on Mac fail. r=nrthomas UPDATE_PACKAGING_R14 UPDATE_PACKAGING_R15 UPDATE_PACKAGING_R16
authorRobert Strong <robert.bugzilla@gmail.com>
Thu, 19 May 2011 10:04:06 -0700
changeset 69724 462c726144bc1fb45b61e774f64ac5d61b4e047c
parent 69723 13d78477bc73b1512a55b0d5f27e7c480dca53e0
child 69725 2a0f98717c90e9eca689e11d7df0297563270dbd
push id20081
push userrstrong@mozilla.com
push dateThu, 19 May 2011 17:04:13 +0000
treeherdermozilla-central@462c726144bc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnrthomas
bugs658094
milestone6.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 658094 - Partial updates for 5.0b1 on Mac fail. r=nrthomas
tools/update-packaging/common.sh
tools/update-packaging/make_incremental_updates.py
--- a/tools/update-packaging/common.sh
+++ b/tools/update-packaging/common.sh
@@ -103,17 +103,17 @@ append_remove_instructions() {
           fixedprefix="$prefix"
           if [ $prefix ]; then
             if [ $(echo "$f" | grep -c '^\.\./') = 1 ]; then
               if [ $(echo "$f" | grep -c '^\.\./\.\./') = 1 ]; then
                 f=$(echo $f | sed -e 's:^\.\.\/\.\.\/::')
                 fixedprefix=""
               else
                 f=$(echo $f | sed -e 's:^\.\.\/::')
-                fixedprefix=$(echo "$prefix" | sed -e 's:^[^\/]*\/::')
+                fixedprefix=$(echo "$prefix" | sed -e 's:[^\/]*\/$::')
               fi
             fi
           fi
           if [ $(echo "$f" | grep -c '\/$') = 1 ]; then
             notice "      rmdir: $fixedprefix$f"
             echo "rmdir \"$fixedprefix$f\"" >> $filev2
           elif [ $(echo "$f" | grep -c '\/\*$') = 1 ]; then
             # Remove the *
--- a/tools/update-packaging/make_incremental_updates.py
+++ b/tools/update-packaging/make_incremental_updates.py
@@ -297,19 +297,25 @@ def process_explicit_remove_files(dir_pa
         lines = []
         for line in list_file:
             lines.append(line.strip())
 
         lines.sort(reverse=True)
         for line in lines:
             # Exclude any blank and comment lines.
             if line and not line.startswith("#"):
+                if prefix != "":
+                    if line.startswith("../"):
+                        line = line.replace("../../", "")
+                        line = line.replace("../", "Contents/")
+                    else:
+                        line = os.path.join(prefix,line)
                 # Python on windows uses \ for path separators and the update
                 # manifests expects / for path separators on all platforms.
-                line=os.path.join(prefix,line).replace("\\", "/")
+                line = line.replace("\\", "/")
                 patch_info.append_remove_instruction(line)
 
 def create_partial_patch(from_dir_path, to_dir_path, patch_filename, shas, patch_info, forced_updates):
     """ Builds a partial patch by comparing the files in from_dir_path to thoes of to_dir_path"""
     # Cannocolize the paths for safey
     from_dir_path = os.path.abspath(from_dir_path)
     to_dir_path = os.path.abspath(to_dir_path)
     # Create a hashtable of the from  and to directories