Bakcing out bug 528457 check-in on relbranch GECKO1914_20091006_RELBRANCH
authorChris Cooper <ccooper@deadsquid.com>
Mon, 23 Nov 2009 20:22:56 -0500
branchGECKO1914_20091006_RELBRANCH
changeset 26602 7adf11d2258146ab54be4c9fbfd79d540f141ced
parent 26601 59125e2f683b97930a82fb5b794b82a8b7c7e46f
push id2140
push usercoop@mozilla.com
push dateTue, 24 Nov 2009 01:23:15 +0000
bugs528457
milestone1.9.1.5
Bakcing out bug 528457 check-in on relbranch
tools/update-packaging/make_incremental_update.sh
--- a/tools/update-packaging/make_incremental_update.sh
+++ b/tools/update-packaging/make_incremental_update.sh
@@ -43,17 +43,17 @@ check_for_forced_update() {
   return 1;
 }
 
 if [ $# = 0 ]; then
   print_usage
   exit 1
 fi
 
-requested_forced_updates='components/components.list Contents/MacOS/components/components.list'
+requested_forced_updates=''
 
 while getopts "hf:" flag
 do
    case "$flag" in
       h) print_usage; exit 0
       ;;
       f) requested_forced_updates="$requested_forced_updates $OPTARG"
       ;;
@@ -104,40 +104,37 @@ for ((i=0; $i<$num_oldfiles; i=$i+1)); d
 
   # This file is created by Talkback, so we can ignore it
   if [ "$f" = "readme.txt" ]; then
     continue 1
   fi
 
   # 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"
-      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"
       patchfile="$workdir/$f.patch.bz2"
       patchsize=$(get_file_size "$patchfile")
       fullsize=$(get_file_size "$workdir/$f")
 
+      if check_for_forced_update "$requested_forced_updates" "$f"; then
+        echo 1>&2 "  FORCING UPDATE for file '$f'..."
+        make_add_instruction "$f" >> $manifest
+        rm -f "$patchfile"
+        archivefiles="$archivefiles \"$f\""
+        continue 1
+      fi
+
       if [ $patchsize -lt $fullsize -a "$f" != "removed-files" ]; then
         make_patch_instruction "$f" >> $manifest
         mv -f "$patchfile" "$workdir/$f.patch"
         rm -f "$workdir/$f"
         archivefiles="$archivefiles \"$f.patch\""
       else
         make_add_instruction "$f" >> $manifest
         rm -f "$patchfile"