bug 896223 - Remove the version 1 manifest from the mar creation scripts. r=nthomas
authorRobert Strong <robert.bugzilla@gmail.com>
Wed, 05 Mar 2014 11:42:48 -0800
changeset 172045 c6123402c5f6bc949c0c37dacad1c3a913758cf1
parent 171972 714c8927d6afe94183f270a8606b5052e3e1dc99
child 172046 3b71d879000c73a5988d7010db70b9688d5204ea
push id40632
push userryanvm@gmail.com
push dateWed, 05 Mar 2014 21:07:42 +0000
treeherdermozilla-inbound@9f57c9fd8d52 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnthomas
bugs896223
milestone30.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 896223 - Remove the version 1 manifest from the mar creation scripts. r=nthomas
tools/update-packaging/common.sh
tools/update-packaging/make_full_update.sh
tools/update-packaging/make_incremental_update.sh
tools/update-packaging/make_incremental_updates.py
tools/update-packaging/test/catmanifest.sh
tools/update-packaging/test/common.sh
tools/update-packaging/test/diffmar.sh
tools/update-packaging/test/make_full_update.sh
tools/update-packaging/test_make_incremental_updates.py
--- a/tools/update-packaging/common.sh
+++ b/tools/update-packaging/common.sh
@@ -72,18 +72,17 @@ make_patch_instruction() {
   else
     notice "      patch: $f"
     echo "patch \"$f.patch\" \"$f\""
   fi
 }
 
 append_remove_instructions() {
   dir="$1"
-  filev1="$2"
-  filev2="$3"
+  filev2="$2"
   if [ -f "$dir/removed-files" ]; then
     prefix=
     listfile="$dir/removed-files"
   elif [ -f "$dir/Contents/MacOS/removed-files" ]; then
     prefix=Contents/MacOS/
     listfile="$dir/Contents/MacOS/removed-files"
   fi
   if [ -n "$listfile" ]; then
@@ -117,17 +116,16 @@ append_remove_instructions() {
             echo "rmdir \"$fixedprefix$f\"" >> $filev2
           elif [ $(echo "$f" | grep -c '\/\*$') = 1 ]; then
             # Remove the *
             f=$(echo "$f" | sed -e 's:\*$::')
             notice "    rmrfdir: $fixedprefix$f"
             echo "rmrfdir \"$fixedprefix$f\"" >> $filev2
           else
             notice "     remove: $fixedprefix$f"
-            echo "remove \"$fixedprefix$f\"" >> $filev1
             echo "remove \"$fixedprefix$f\"" >> $filev2
           fi
         fi
       fi
     done
   fi
 }
 
--- a/tools/update-packaging/make_full_update.sh
+++ b/tools/update-packaging/make_full_update.sh
@@ -38,19 +38,18 @@ archive="$1"
 targetdir="$2"
 # Prevent the workdir from being inside the targetdir so it isn't included in
 # the update mar.
 if [ $(echo "$targetdir" | grep -c '\/$') = 1 ]; then
   # Remove the /
   targetdir=$(echo "$targetdir" | sed -e 's:\/$::')
 fi
 workdir="$targetdir.work"
-updatemanifestv1="$workdir/update.manifest"
 updatemanifestv2="$workdir/updatev2.manifest"
-targetfiles="update.manifest updatev2.manifest"
+targetfiles="updatev2.manifest"
 
 mkdir -p "$workdir"
 
 # On Mac, the precomplete file added by Bug 386760 will cause OS X to reload the
 # Info.plist so it launches the right architecture, bug 600098
 
 # Generate a list of all files in the target directory.
 pushd "$targetdir"
@@ -62,53 +61,45 @@ if [ ! -f "precomplete" ]; then
   notice "precomplete file is missing!"
   exit 1
 fi
 
 list_files files
 
 popd
 
+# Add the type of update to the beginning of version 2 update manifest.
+> $updatemanifestv2
 notice ""
-notice "Adding file add instructions to file 'update.manifest'"
-> $updatemanifestv1
+notice "Adding type instruction to file 'updatev2.manifest'"
+notice "       type: complete"
+echo "type \"complete\"" >> $updatemanifestv2
 
+notice ""
+notice "Adding file add instructions to file 'updatev2.manifest'"
 num_files=${#files[*]}
 
 for ((i=0; $i<$num_files; i=$i+1)); do
   f="${files[$i]}"
 
-  make_add_instruction "$f" >> $updatemanifestv1
+  make_add_instruction "$f" >> $updatemanifestv2
 
   dir=$(dirname "$f")
   mkdir -p "$workdir/$dir"
   $BZIP2 -cz9 "$targetdir/$f" > "$workdir/$f"
   copy_perm "$targetdir/$f" "$workdir/$f"
 
   targetfiles="$targetfiles \"$f\""
 done
 
-# Add the type of update to the beginning of and cat the contents of the version
-# 1 update manifest to the version 2 update manifest.
-> $updatemanifestv2
-notice ""
-notice "Adding type instruction to file 'updatev2.manifest'"
-notice "       type: complete"
-echo "type \"complete\"" >> $updatemanifestv2
-
-notice ""
-notice "Concatenating file 'update.manifest' to file 'updatev2.manifest'"
-cat $updatemanifestv1 >> $updatemanifestv2
-
 # Append remove instructions for any dead files.
 notice ""
 notice "Adding file and directory remove instructions from file 'removed-files'"
-append_remove_instructions "$targetdir" "$updatemanifestv1" "$updatemanifestv2"
+append_remove_instructions "$targetdir" "$updatemanifestv2"
 
-$BZIP2 -z9 "$updatemanifestv1" && mv -f "$updatemanifestv1.bz2" "$updatemanifestv1"
 $BZIP2 -z9 "$updatemanifestv2" && mv -f "$updatemanifestv2.bz2" "$updatemanifestv2"
 
 eval "$MAR -C \"$workdir\" -c output.mar $targetfiles"
 mv -f "$workdir/output.mar" "$archive"
 
 # cleanup
 rm -fr "$workdir"
 
--- a/tools/update-packaging/make_incremental_update.sh
+++ b/tools/update-packaging/make_incremental_update.sh
@@ -81,19 +81,18 @@ olddir="$2"
 newdir="$3"
 # Prevent the workdir from being inside the targetdir so it isn't included in
 # the update mar.
 if [ $(echo "$newdir" | grep -c '\/$') = 1 ]; then
   # Remove the /
   newdir=$(echo "$newdir" | sed -e 's:\/$::')
 fi
 workdir="$newdir.work"
-updatemanifestv1="$workdir/update.manifest"
 updatemanifestv2="$workdir/updatev2.manifest"
-archivefiles="update.manifest updatev2.manifest"
+archivefiles="updatev2.manifest"
 
 mkdir -p "$workdir"
 
 # On Mac, the precomplete file added by Bug 386760 will cause OS X to reload the
 # Info.plist so it launches the right architecture, bug 600098
 
 # Generate a list of all files in the target directory.
 pushd "$olddir"
@@ -116,19 +115,25 @@ if [ ! -f "precomplete" ]; then
   exit 1
 fi
 
 list_dirs newdirs
 list_files newfiles
 
 popd
 
+# Add the type of update to the beginning of version 2 update manifest.
 notice ""
-notice "Adding file patch and add instructions to file 'update.manifest'"
-> $updatemanifestv1
+notice "Adding type instruction to file 'updatev2.manifest'"
+> $updatemanifestv2
+notice "       type: partial"
+echo "type \"partial\"" >> $updatemanifestv2
+
+notice ""
+notice "Adding file patch and add instructions to file 'updatev2.manifest'"
 
 num_oldfiles=${#oldfiles[*]}
 remove_array=
 num_removes=0
 
 for ((i=0; $i<$num_oldfiles; i=$i+1)); do
   f="${oldfiles[$i]}"
 
@@ -146,17 +151,17 @@ 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
       # 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" 1 >> $updatemanifestv1
+      make_add_instruction "$f" 1 >> $updatemanifestv2
       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.
       dir=$(dirname "$workdir/$f")
@@ -165,37 +170,37 @@ for ((i=0; $i<$num_oldfiles; i=$i+1)); d
       $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 ]; then
-        make_patch_instruction "$f" >> $updatemanifestv1
+        make_patch_instruction "$f" >> $updatemanifestv2
         mv -f "$patchfile" "$workdir/$f.patch"
         rm -f "$workdir/$f"
         archivefiles="$archivefiles \"$f.patch\""
       else
-        make_add_instruction "$f" >> $updatemanifestv1
+        make_add_instruction "$f" >> $updatemanifestv2
         rm -f "$patchfile"
         archivefiles="$archivefiles \"$f\""
       fi
     fi
   else
     # remove instructions are added after add / patch instructions for
     # consistency with make_incremental_updates.py
     remove_array[$num_removes]=$f
     (( num_removes++ ))
   fi
 done
 
 # Newly added files
 notice ""
-notice "Adding file add instructions to file 'update.manifest'"
+notice "Adding file add instructions to file 'updatev2.manifest'"
 num_newfiles=${#newfiles[*]}
 
 for ((i=0; $i<$num_newfiles; i=$i+1)); do
   f="${newfiles[$i]}"
 
   # removed-files is excluded by make_incremental_updates.py so it is excluded
   # here for consistency.
   if [ `basename $f` = "removed-files" ]; then
@@ -210,59 +215,46 @@ for ((i=0; $i<$num_newfiles; i=$i+1)); d
   done
 
   dir=$(dirname "$workdir/$f")
   mkdir -p "$dir"
 
   $BZIP2 -cz9 "$newdir/$f" > "$workdir/$f"
   copy_perm "$newdir/$f" "$workdir/$f"
 
-  make_add_instruction "$f" >> "$updatemanifestv1"
+  make_add_instruction "$f" >> "$updatemanifestv2"
   archivefiles="$archivefiles \"$f\""
 done
 
 notice ""
-notice "Adding file remove instructions to file 'update.manifest'"
+notice "Adding file remove instructions to file 'updatev2.manifest'"
 for ((i=0; $i<$num_removes; i=$i+1)); do
   f="${remove_array[$i]}"
   notice "     remove: $f"
-  echo "remove \"$f\"" >> $updatemanifestv1
+  echo "remove \"$f\"" >> $updatemanifestv2
 done
 
-# Add the type of update to the beginning of and cat the contents of the version
-# 1 update manifest to the version 2 update manifest.
-notice ""
-notice "Adding type instruction to file 'updatev2.manifest'"
-> $updatemanifestv2
-notice "       type: partial"
-echo "type \"partial\"" >> $updatemanifestv2
-
-notice ""
-notice "Concatenating file 'update.manifest' to file 'updatev2.manifest'"
-cat $updatemanifestv1 >> $updatemanifestv2
-
-# Append remove instructions for any dead files.
+# Add remove instructions for any dead files.
 notice ""
 notice "Adding file and directory remove instructions from file 'removed-files'"
-append_remove_instructions "$newdir" "$updatemanifestv1" "$updatemanifestv2"
+append_remove_instructions "$newdir" "$updatemanifestv2"
 
 notice ""
 notice "Adding directory remove instructions for directories that no longer exist"
 num_olddirs=${#olddirs[*]}
 
 for ((i=0; $i<$num_olddirs; i=$i+1)); do
   f="${olddirs[$i]}"
   # If this dir doesn't exist in the new directory remove it.
   if [ ! -d "$newdir/$f" ]; then
     notice "      rmdir: $f/"
     echo "rmdir \"$f/\"" >> $updatemanifestv2
   fi
 done
 
-$BZIP2 -z9 "$updatemanifestv1" && mv -f "$updatemanifestv1.bz2" "$updatemanifestv1"
 $BZIP2 -z9 "$updatemanifestv2" && mv -f "$updatemanifestv2.bz2" "$updatemanifestv2"
 
 eval "$MAR -C \"$workdir\" -c output.mar $archivefiles"
 mv -f "$workdir/output.mar" "$archive"
 
 # cleanup
 rm -fr "$workdir"
 
--- a/tools/update-packaging/make_incremental_updates.py
+++ b/tools/update-packaging/make_incremental_updates.py
@@ -15,93 +15,76 @@ import datetime
 import bz2
 import string
 import tempfile
 
 class PatchInfo:
     """ Represents the meta-data associated with a patch
         work_dir = working dir where files are stored for this patch
         archive_files = list of files to include in this patch
-        manifestv1 = set of manifest version 1 patch instructions
         manifestv2 = set of manifest version 2 patch instructions
         file_exclusion_list = 
         files to exclude from this patch. names without slashes will be
                               excluded anywhere in the directory hiearchy.   names with slashes
                               will only be excluded at that exact path
         """
     def __init__(self, work_dir, file_exclusion_list, path_exclusion_list):
         self.work_dir=work_dir
         self.archive_files=[]
-        self.manifestv1=[]
         self.manifestv2=[]
         self.file_exclusion_list=file_exclusion_list
         self.path_exclusion_list=path_exclusion_list
         
     def append_add_instruction(self, filename):
         """ Appends an add instruction for this patch.   
             if the filename starts with distribution/extensions/ adds an add-if
             instruction to test the existence of the subdirectory.  This was
             ported from mozilla/tools/update-packaging/common.sh's
             make_add_instruction.
         """
         m = re.match("((?:|.*/)distribution/extensions)/", filename)
         if m:
             # Directory immediately following extensions is used for the test
             testdir = m.group(1)
-            self.manifestv1.append('add-if "'+testdir+'" "'+filename+'"')
             self.manifestv2.append('add-if "'+testdir+'" "'+filename+'"')
         else:
-            self.manifestv1.append('add "'+filename+'"')
             self.manifestv2.append('add "'+filename+'"')
            
     def append_patch_instruction(self, filename, patchname):
         """ Appends an patch instruction for this patch.   
             
             filename = file to patch
             patchname = patchfile to apply to file
             
             if the filename starts with distribution/extensions/ adds a
             patch-if instruction to test the existence of the subdirectory.  
             This was ported from
             mozilla/tools/update-packaging/common.sh's make_patch_instruction.
         """
         m = re.match("((?:|.*/)distribution/extensions)/", filename)
         if m:
             testdir = m.group(1)
-            self.manifestv1.append('patch-if "'+testdir+'" "'+patchname+'" "'+filename+'"')
             self.manifestv2.append('patch-if "'+testdir+'" "'+patchname+'" "'+filename+'"')
         else:
-            self.manifestv1.append('patch "'+patchname+'" "'+filename+'"')
             self.manifestv2.append('patch "'+patchname+'" "'+filename+'"')
                 
     def append_remove_instruction(self, filename):
         """ Appends an remove instruction for this patch.   
             This was ported from
             mozilla/tools/update-packaging/common.sh/make_remove_instruction
         """
         if filename.endswith("/"):
             self.manifestv2.append('rmdir "'+filename+'"')
         elif filename.endswith("/*"):
             filename = filename[:-1]
             self.manifestv2.append('rmrfdir "'+filename+'"')
         else:
-            self.manifestv1.append('remove "'+filename+'"')
             self.manifestv2.append('remove "'+filename+'"')
 
     def create_manifest_files(self):
-        """ Createst the v1 manifest file in the root of the work_dir """
-        manifest_file_path = os.path.join(self.work_dir,"update.manifest")
-        manifest_file = open(manifest_file_path, "wb")
-        manifest_file.writelines(string.join(self.manifestv1, '\n'))
-        manifest_file.writelines("\n")
-        manifest_file.close()    
-
-        bzip_file(manifest_file_path)
-        self.archive_files.append('"update.manifest"')
-
         """ Createst the v2 manifest file in the root of the work_dir """
         manifest_file_path = os.path.join(self.work_dir,"updatev2.manifest")
         manifest_file = open(manifest_file_path, "wb")
         manifest_file.writelines("type \"partial\"\n")
         manifest_file.writelines(string.join(self.manifestv2, '\n'))
         manifest_file.writelines("\n")
         manifest_file.close()
 
--- a/tools/update-packaging/test/catmanifest.sh
+++ b/tools/update-packaging/test/catmanifest.sh
@@ -4,11 +4,11 @@
 mar="$1"
 workdir="/tmp/catmanifest"
 
 rm -rf "$workdir"
 mkdir -p "$workdir"
 cp "$1" "$workdir"
 cd "$workdir"
 mar -x "$1"
-mv update.manifest update.manifest.bz2
-bzip2 -d update.manifest.bz2
-cat update.manifest
+mv updatev2.manifest updatev2.manifest.bz2
+bzip2 -d updatev2.manifest.bz2
+cat updatev2.manifest
--- a/tools/update-packaging/test/common.sh
+++ b/tools/update-packaging/test/common.sh
@@ -1,9 +1,13 @@
 #!/bin/bash
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
 #
 # Code shared by update packaging scripts.
 # Author: Darin Fisher
 #
 # In here to use the local common.sh to allow the full mars to have unfiltered files
 
 # -----------------------------------------------------------------------------
 # By default just assume that these tools exist on our path
@@ -69,18 +73,17 @@ make_patch_instruction() {
   else
     notice "      patch: $f"
     echo "patch \"$f.patch\" \"$f\""
   fi
 }
 
 append_remove_instructions() {
   dir="$1"
-  filev1="$2"
-  filev2="$3"
+  filev2="$2"
   if [ -f "$dir/removed-files" ]; then
     prefix=
     listfile="$dir/removed-files"
   elif [ -f "$dir/Contents/MacOS/removed-files" ]; then
     prefix=Contents/MacOS/
     listfile="$dir/Contents/MacOS/removed-files"
   fi
   if [ -n "$listfile" ]; then
@@ -100,31 +103,30 @@ 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 *
             f=$(echo "$f" | sed -e 's:\*$::')
             notice "    rmrfdir: $fixedprefix$f"
             echo "rmrfdir \"$fixedprefix$f\"" >> $filev2
           else
             notice "     remove: $fixedprefix$f"
-            echo "remove \"$fixedprefix$f\"" >> $filev1
             echo "remove \"$fixedprefix$f\"" >> $filev2
           fi
         fi
       fi
     done
   fi
 }
 
--- a/tools/update-packaging/test/diffmar.sh
+++ b/tools/update-packaging/test/diffmar.sh
@@ -24,27 +24,23 @@ mkdir -p "$fromdir"
 mkdir -p "$todir"
 
 cp "$1" "$fromdir"
 cp "$2" "$todir"
 
 cd "$fromdir"
 mar -x "$1"
 rm "$1"
-mv update.manifest update.manifest.bz2
-bzip2 -d update.manifest.bz2
 mv updatev2.manifest updatev2.manifest.bz2
 bzip2 -d updatev2.manifest.bz2
 ls $lsargs > files.txt
 
 cd "$todir"
 mar -x "$2"
 rm "$2"
-mv update.manifest update.manifest.bz2
-bzip2 -d update.manifest.bz2
 mv updatev2.manifest updatev2.manifest.bz2
 bzip2 -d updatev2.manifest.bz2
 ls $lsargs > files.txt
 
 echo "diffing $fromdir and $todir"
 echo "on linux shell sort and python sort return different results"
 echo "which cause differences in the manifest files"
 diff -ru "$fromdir" "$todir"
--- a/tools/update-packaging/test/make_full_update.sh
+++ b/tools/update-packaging/test/make_full_update.sh
@@ -1,9 +1,13 @@
 #!/bin/bash
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
 #
 # This tool generates full update packages for the update system.
 # Author: Darin Fisher
 #
 # In here to use the local common.sh to allow the full mars to have unfiltered files
 
 . $(dirname "$0")/common.sh
 
@@ -35,19 +39,18 @@ archive="$1"
 targetdir="$2"
 # Prevent the workdir from being inside the targetdir so it isn't included in
 # the update mar.
 if [ $(echo "$targetdir" | grep -c '\/$') = 1 ]; then
   # Remove the /
   targetdir=$(echo "$targetdir" | sed -e 's:\/$::')
 fi
 workdir="$targetdir.work"
-updatemanifestv1="$workdir/update.manifest"
 updatemanifestv2="$workdir/updatev2.manifest"
-targetfiles="update.manifest updatev2.manifest"
+targetfiles="updatev2.manifest"
 
 mkdir -p "$workdir"
 
 # On Mac, the precomplete file added by Bug 386760 will cause OS X to reload the
 # Info.plist so it launches the right architecture, bug 600098
 
 # Generate a list of all files in the target directory.
 pushd "$targetdir"
@@ -59,53 +62,45 @@ if [ ! -f "precomplete" ]; then
   notice "precomplete file is missing!"
   exit 1
 fi
 
 list_files files
 
 popd
 
+# Add the type of update to the beginning of version 2 update manifest.
+> $updatemanifestv2
 notice ""
-notice "Adding file add instructions to file 'update.manifest'"
-> $updatemanifestv1
+notice "Adding type instruction to file 'updatev2.manifest'"
+notice "       type: complete"
+echo "type \"complete\"" >> $updatemanifestv2
 
+notice ""
+notice "Adding file add instructions to file 'updatev2.manifest'"
 num_files=${#files[*]}
 
 for ((i=0; $i<$num_files; i=$i+1)); do
   f="${files[$i]}"
 
-  make_add_instruction "$f" >> $updatemanifestv1
+  make_add_instruction "$f" >> $updatemanifestv2
 
   dir=$(dirname "$f")
   mkdir -p "$workdir/$dir"
   $BZIP2 -cz9 "$targetdir/$f" > "$workdir/$f"
   copy_perm "$targetdir/$f" "$workdir/$f"
 
   targetfiles="$targetfiles \"$f\""
 done
 
-# Add the type of update to the beginning of and cat the contents of the version
-# 1 update manifest to the version 2 update manifest.
-> $updatemanifestv2
-notice ""
-notice "Adding type instruction to file 'updatev2.manifest'"
-notice "       type: complete"
-echo "type \"complete\"" >> $updatemanifestv2
-
-notice ""
-notice "Concatenating file 'update.manifest' to file 'updatev2.manifest'"
-cat $updatemanifestv1 >> $updatemanifestv2
-
 # Append remove instructions for any dead files.
 notice ""
 notice "Adding file and directory remove instructions from file 'removed-files'"
-append_remove_instructions "$targetdir" "$updatemanifestv1" "$updatemanifestv2"
+append_remove_instructions "$targetdir" "$updatemanifestv2"
 
-$BZIP2 -z9 "$updatemanifestv1" && mv -f "$updatemanifestv1.bz2" "$updatemanifestv1"
 $BZIP2 -z9 "$updatemanifestv2" && mv -f "$updatemanifestv2.bz2" "$updatemanifestv2"
 
 eval "$MAR -C \"$workdir\" -c output.mar $targetfiles"
 mv -f "$workdir/output.mar" "$archive"
 
 # cleanup
 rm -fr "$workdir"
 
--- a/tools/update-packaging/test_make_incremental_updates.py
+++ b/tools/update-packaging/test_make_incremental_updates.py
@@ -13,33 +13,32 @@ class TestPatchInfo(unittest.TestCase):
         self.work_dir = 'work_dir'
         self.file_exclusion_list = ['channel-prefs.js','update.manifest','updatev2.manifest','removed-files']
         self.path_exclusion_list = ['/readme.txt']
         self.patch_info = PatchInfo(self.work_dir, self.file_exclusion_list, self.path_exclusion_list)
 
     def testPatchInfo(self):
         self.assertEquals(self.work_dir, self.patch_info.work_dir)
         self.assertEquals([], self.patch_info.archive_files)
-        self.assertEquals([], self.patch_info.manifestv1)
         self.assertEquals([], self.patch_info.manifestv2)
         self.assertEquals(self.file_exclusion_list, self.patch_info.file_exclusion_list)
         self.assertEquals(self.path_exclusion_list, self.patch_info.path_exclusion_list)
 
     def test_append_add_instruction(self):
         self.patch_info.append_add_instruction('file.test')
-        self.assertEquals(['add "file.test"'], self.patch_info.manifestv1)
+        self.assertEquals(['add "file.test"'], self.patch_info.manifestv2)
 
     def test_append_patch_instruction(self):
         self.patch_info.append_patch_instruction('file.test', 'patchname')
-        self.assertEquals(['patch "patchname" "file.test"'], self.patch_info.manifestv1)
+        self.assertEquals(['patch "patchname" "file.test"'], self.patch_info.manifestv2)
 
     """ FIXME touches the filesystem, need refactoring
     def test_append_remove_instruction(self):
         self.patch_info.append_remove_instruction('file.test')
-        self.assertEquals(['remove "file.test"'], self.patch_info.manifestv1)
+        self.assertEquals(['remove "file.test"'], self.patch_info.manifestv2)
 
     def test_create_manifest_file(self):
         self.patch_info.create_manifest_file()
     """
 
     def test_build_marfile_entry_hash(self):
         self.assertEquals(({}, set([]), set([])), self.patch_info.build_marfile_entry_hash('root_path'))