Bug 791684 - Rename clang.tar.bz2 to its sha512 after building. r=rail.
authorRafael Ávila de Espíndola <respindola@mozilla.org>
Mon, 17 Sep 2012 10:33:00 -0400
changeset 107228 5bfe70eff7791f337c1e8c991d8e0b9c5aa8363f
parent 107227 8bf7fa20ea33983c7d587c640d3caf354d95bc80
child 107229 cf303be47402657cf5dbadef5b33636624e14516
push id14920
push userrespindola@mozilla.com
push dateMon, 17 Sep 2012 14:33:58 +0000
treeherdermozilla-inbound@5bfe70eff779 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrail
bugs791684
milestone18.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 791684 - Rename clang.tar.bz2 to its sha512 after building. r=rail.
build/unix/build-clang/build-clang.py
--- a/build/unix/build-clang/build-clang.py
+++ b/build/unix/build-clang/build-clang.py
@@ -82,24 +82,27 @@ def build_tooltool_manifest():
         if item == 'algorithm':
             return 3
         return 4
 
     basedir = os.path.split(os.path.realpath(sys.argv[0]))[0]
     tooltool = basedir + '/tooltool.py'
     setup = basedir + '/setup.sh'
     manifest = 'clang.manifest'
-    check_run(['python', tooltool, '-m', 'clang.manifest', 'add',
+    check_run(['python', tooltool, '-m', manifest, 'add',
                setup, 'clang.tar.bz2'])
-    data = simplejson.load(file('clang.manifest'))
+    data = simplejson.load(file(manifest))
     data = [{'clang_version' : 'r%s' % llvm_revision }] + data
-    out = file('clang.manifest','w')
+    out = file(manifest,'w')
     simplejson.dump(data, out, indent=0, item_sort_key=key_sort)
     out.write('\n')
 
+    assert data[2]['filename'] == 'clang.tar.bz2'
+    os.rename('clang.tar.bz2', data[2]['digest'])
+
 isDarwin = platform.system() == "Darwin"
 
 def build_one_stage_aux(stage_dir, is_stage_one):
     os.mkdir(stage_dir)
 
     build_dir = stage_dir + "/build"
     inst_dir = stage_dir + "/clang"