Bug 528457, always force components.list in partial updates for nightlies, r=ccooper (NPOTB)
authorNick Thomas <nthomas@mozilla.com>
Fri, 20 Nov 2009 21:55:25 +1300
changeset 35169 8265be625bb0a659689ad9e22ae5c9254cb47be0
parent 35168 804dd55dd1f1ca95799777877fcb9390ffd42a55
child 35170 bacd85de3ef8f01f583f270851334dc7d055b7d9
push idunknown
push userunknown
push dateunknown
reviewersccooper
bugs528457
milestone1.9.3a1pre
Bug 528457, always force components.list in partial updates for nightlies, 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
@@ -43,17 +43,17 @@ check_for_forced_update() {
   return 1;
 }
 
 if [ $# = 0 ]; then
   print_usage
   exit 1
 fi
 
-requested_forced_updates=''
+requested_forced_updates='components/components.list Contents/MacOS/components/components.list'
 
 while getopts "hf:" flag
 do
    case "$flag" in
       h) print_usage; exit 0
       ;;
       f) requested_forced_updates="$requested_forced_updates $OPTARG"
       ;;
@@ -104,37 +104,38 @@ 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'..."
+      $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"