bug 557260 - clobber old packages as part of automation instead of in the makefiles r=aki buildbot-0.7
authorJohn Ford <jhford@mozilla.com>
Tue, 17 May 2011 19:14:18 -0700
branchbuildbot-0.7
changeset 1535 dbe12d03c8a81b4e8bbe01432eb1eb0952f4efc6
parent 1474 84dd2e06593b163c4e9beb206dfc13079117b166
child 1536 e67bae2f2f8a247c5e825d0308f60037bf0f79ee
push id1061
push userjford@mozilla.com
push dateWed, 18 May 2011 02:15:35 +0000
reviewersaki
bugs557260
bug 557260 - clobber old packages as part of automation instead of in the makefiles r=aki
process/factory.py
--- a/process/factory.py
+++ b/process/factory.py
@@ -5764,16 +5764,24 @@ class MobileDesktopBuildFactory(MobileBu
                 description=['compile'],
                 workdir=self.baseWorkDir + "/" +  self.branchName,
                 env=self.env,
                 haltOnFailure=True
             )
 
     def addPackageSteps(self):
         self.addStep(ShellCommand,
+            name='rm_mobile_pkg',
+            command=['rm', '-rvf', 'dist/fennec*'],
+            workdir='%s/%s/%s' % (self.baseWorkDir,
+            self.branchName, self.objdir),
+            env=self.env,
+            haltOnFailure=True,
+        )
+        self.addStep(ShellCommand,
             name='make_mobile_pkg',
             command=['make', 'package'],
             workdir='%s/%s/%s' % (self.baseWorkDir,
             self.branchName, self.objdir),
             description=['make', 'mobile', 'package'],
             env=self.env,
             haltOnFailure=True,
         )
@@ -5933,16 +5941,23 @@ class MaemoBuildFactory(MobileBuildFacto
 
     def addPackageSteps(self, multiLocale=False, packageTests=False):
         extraArgs=''
         env = self.env
         if multiLocale:
             extraArgs='AB_CD=multi'
             env['MOZ_CHROME_MULTILOCALE'] = ' '.join(self.locales)
         self.addStep(ShellCommand,
+            name='rm_pkg',
+            command=[self.scratchboxPath, '-p', '-d',
+                     '%s' % (self.objdirRelPath),
+                     'rm -rfv dist/fennec*'],
+            haltOnFailure=True
+        )
+        self.addStep(ShellCommand,
             name='make_pkg',
             command=[self.scratchboxPath, '-p', '-k', '-d',
                      '%s' % (self.objdirRelPath),
                      'make package', extraArgs],
             description=['make', 'package'],
             env=env,
             haltOnFailure=True
         )
@@ -7514,16 +7529,23 @@ class AndroidBuildFactory(MobileBuildFac
 
         makePackageCommand = ['make', 'package']
         makePackageTestsCommand = ['make', 'package-tests']
         if locale:
             makePackageCommand += ['AB_CD=%s' % locale]
             makePackageTestsCommand += ['AB_CD=%s' % locale]
 
         self.addStep(ShellCommand,
+            name='rm_android_pkg',
+            command=['rm', '-rfv', 'dist/fennec*'],
+            workdir='%s/%s/%s' % (self.baseWorkDir, self.branchName, self.objdir),
+            env=envJava,
+            haltOnFailure=True,
+        )
+        self.addStep(ShellCommand,
             name='make_android_pkg',
             command=makePackageCommand,
             workdir='%s/%s/%s' % (self.baseWorkDir, self.branchName, self.objdir),
             description=['make', 'android', 'package'],
             env=envJava,
             haltOnFailure=True,
         )
         self.addStep(ShellCommand,