Bug 1217431 - Don't get 'latest' URLs for android updates; r=jlund, a=nightly-automation
authorMike Shal <mshal@mozilla.com>
Fri, 23 Oct 2015 13:15:34 -0400
changeset 296561 577654e32aa80ca6112845fc7c65a60ff735904d
parent 296560 455307d2ea2cc4ac12249b799ce11102757ad245
child 296562 4124a1b6799936fc99c7d0a6d1ad26b74461a2d7
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlund, nightly-automation
bugs1217431
milestone43.0a2
Bug 1217431 - Don't get 'latest' URLs for android updates; r=jlund, a=nightly-automation
testing/mozharness/mozharness/mozilla/building/buildbase.py
--- a/testing/mozharness/mozharness/mozilla/building/buildbase.py
+++ b/testing/mozharness/mozharness/mozilla/building/buildbase.py
@@ -124,20 +124,25 @@ class MakeUploadOutputParser(OutputParse
                 # package filename, then use that explicitly so we don't pick up
                 # just any random file and assume it's the package.
                 if not self.package_filename or m.endswith(self.package_filename):
                     self.matches['packageUrl'] = m
 
                     # For android builds, the package is also used as the mar file.
                     # Grab the first one, since that is the one in the
                     # nightly/YYYY/MM directory
-                    if self.use_package_as_marfile and 'completeMarUrl' not in self.matches:
-                        self.info("Using package as mar file: %s" % m)
-                        self.matches['completeMarUrl'] = m
-                        u, self.package_filename = os.path.split(m)
+                    if self.use_package_as_marfile:
+                        if 'tinderbox-builds' in m or 'nightly/latest-' in m:
+                            self.info("Skipping wrong packageUrl: %s" % m)
+                        else:
+                            if 'completeMarUrl' in self.matches:
+                                self.fatal("Found multiple package URLs. Please update buildbase.py")
+                            self.info("Using package as mar file: %s" % m)
+                            self.matches['completeMarUrl'] = m
+                            u, self.package_filename = os.path.split(m)
 
         if self.use_package_as_marfile and self.package_filename:
             # The checksum file is also dumped during 'make upload'. Look
             # through here to get the hash and filesize of the android package
             # for balrog submission.
             pat = r'''^([^ ]*) sha512 ([0-9]*) %s$''' % self.package_filename
             m = re.compile(pat).match(line)
             if m: