not finding buildid should not be fatal, warn instead b=410806 r=bsmedberg
authorrhelmer@mozilla.com
Fri, 18 Jan 2008 08:58:31 -0800
changeset 10401 019aed1117cf1db923ec93fa49061a0873eeb2dd
parent 10400 e5c64ade7391f70907a093fc49bff792c1ec789a
child 10402 be9ec7c85bb6eb9a01ad47b4272a4e5fad4a04cc
push idunknown
push userunknown
push dateunknown
reviewersbsmedberg
bugs410806
milestone1.9b3pre
not finding buildid should not be fatal, warn instead b=410806 r=bsmedberg
tools/update-packaging/make_incremental_updates.py
--- a/tools/update-packaging/make_incremental_updates.py
+++ b/tools/update-packaging/make_incremental_updates.py
@@ -303,25 +303,32 @@ def create_partial_patch(from_dir_path, 
     shutil.copy2(os.path.join(patch_info.work_dir,"output.mar"), patch_filename)
     return patch_filename
     
 def usage():
     print "-h for help"
     print "-f for patchlist_file"
 
 def get_buildid(work_dir, platform):
-    """ extracts buildid from MAR """
+    """ extracts buildid from MAR
+        TODO: this should handle 1.8 branch too
+    """
     if platform == 'mac':
       ini = '%s/Contents/MacOS/application.ini' % work_dir
     else:
       ini = '%s/application.ini' % work_dir
+    if not os.path.exists(ini):
+        print 'WARNING: application.ini not found, cannot find build ID'
+        return ''
     file = bz2.BZ2File(ini)
     for line in file:
       if line.find('BuildID') == 0:
         return line.strip().split('=')[1]
+    print 'WARNING: cannot find build ID in application.ini'
+    return ''
 
 def decode_filename(filename):
     """ Breaks filename into component parts based on regex
         for example: firefox-3.0b3pre.en-US.linux-i686.complete.mar
         Returns dict with keys product, version, locale, platform, type
     """
     try:
       m = re.search(