Bug 535090, Nightly partial updater doesn't preserve +x bit on new binaries, r=ccooper (NPOTB)
authorNick Thomas <nthomas@mozilla.com>
Fri, 05 Feb 2010 16:30:34 +1300
changeset 37935 d72639947a60c896d18a59d67daac15df854b88e
parent 37934 2d873df39b6af3126b39de6aa8da7b3984273028
child 37936 0031d9f7f0f140871a435ac2fe9a0aa3da995c5e
push idunknown
push userunknown
push dateunknown
reviewersccooper
bugs535090
milestone1.9.3a2pre
Bug 535090, Nightly partial updater doesn't preserve +x bit on new binaries, r=ccooper (NPOTB)
tools/update-packaging/make_incremental_update.sh
--- a/tools/update-packaging/make_incremental_update.sh
+++ b/tools/update-packaging/make_incremental_update.sh
@@ -110,30 +110,32 @@ for ((i=0; $i<$num_oldfiles; i=$i+1)); d
   # If this file exists in the new directory as well, then check if it differs.
   if [ -f "$newdir/$f" ]; then
 
     if check_for_forced_update "$requested_forced_updates" "$f"; then
       echo 1>&2 "  FORCING UPDATE for file '$f'..."
       # The full workdir may not exist yet, so create it if necessary. 
       mkdir -p `dirname "$workdir/$f"`
       $BZIP2 -cz9 "$newdir/$f" > "$workdir/$f"
+      copy_perm "$newdir/$f" "$workdir/$f"
       make_add_instruction "$f" >> $manifest
       archivefiles="$archivefiles \"$f\""
       continue 1
     fi
 
     if ! diff "$olddir/$f" "$newdir/$f" > /dev/null; then
       # Compute both the compressed binary diff and the compressed file, and
       # compare the sizes.  Then choose the smaller of the two to package.
       echo "  diffing $f"
       dir=$(dirname "$workdir/$f")
       mkdir -p "$dir"
       $MBSDIFF "$olddir/$f" "$newdir/$f" "$workdir/$f.patch"
       $BZIP2 -z9 "$workdir/$f.patch"
       $BZIP2 -cz9 "$newdir/$f" > "$workdir/$f"
+      copy_perm "$newdir/$f" "$workdir/$f"
       patchfile="$workdir/$f.patch.bz2"
       patchsize=$(get_file_size "$patchfile")
       fullsize=$(get_file_size "$workdir/$f")
 
       if [ $patchsize -lt $fullsize -a "$f" != "removed-files" ]; then
         make_patch_instruction "$f" >> $manifest
         mv -f "$patchfile" "$workdir/$f.patch"
         rm -f "$workdir/$f"
@@ -161,16 +163,17 @@ for ((i=0; $i<$num_newfiles; i=$i+1)); d
       continue 2
     fi
   done
   
   dir=$(dirname "$workdir/$f")
   mkdir -p "$dir"
 
   $BZIP2 -cz9 "$newdir/$f" > "$workdir/$f"
+  copy_perm "$newdir/$f" "$workdir/$f"
 
   make_add_instruction "$f" >> "$manifest"
   archivefiles="$archivefiles \"$f\""
 done
 
 # Append remove instructions for any dead files.
 append_remove_instructions "$newdir" >> $manifest