Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: packagerSafari.py

Issue 29322519: Issue 2796 - Added DeveloperIdentifier to Info.plist for Safari 9 (Closed)
Left Patch Set: Capitatized "Safari" in error message Created July 16, 2015, 3:50 p.m.
Right Patch Set: Fixed typo in comment Created July 17, 2015, 11:07 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « Info.plist.tmpl ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 # coding: utf-8 1 # coding: utf-8
2 2
3 # This Source Code Form is subject to the terms of the Mozilla Public 3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this 4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 6
7 import os 7 import os
8 import re 8 import re
9 import json 9 import json
10 import ConfigParser 10 import ConfigParser
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 165
166 subprocess.check_output( 166 subprocess.check_output(
167 ['xar', '-czf', os.path.abspath(outFile), '--distribution'] + os.listdir(d irname), 167 ['xar', '-czf', os.path.abspath(outFile), '--distribution'] + os.listdir(d irname),
168 cwd=dirname 168 cwd=dirname
169 ) 169 )
170 finally: 170 finally:
171 shutil.rmtree(dirname) 171 shutil.rmtree(dirname)
172 172
173 certificate_filenames = [] 173 certificate_filenames = []
174 try: 174 try:
175 # write each certificate in DER format to a seperate 175 # write each certificate in DER format to a separate
Wladimir Palant 2015/07/16 19:16:23 Nit: seperate => separate
Sebastian Noack 2015/07/17 11:07:22 Done.
176 # temporary file, that they can be passed to xar 176 # temporary file, that they can be passed to xar
177 for cert in certs: 177 for cert in certs:
178 fd, filename = tempfile.mkstemp() 178 fd, filename = tempfile.mkstemp()
179 try: 179 try:
180 certificate_filenames.append(filename) 180 certificate_filenames.append(filename)
181 os.write(fd, cert.as_der()) 181 os.write(fd, cert.as_der())
182 finally: 182 finally:
183 os.close(fd) 183 os.close(fd)
184 184
185 # add certificates and placeholder signature 185 # add certificates and placeholder signature
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 fixAbsoluteUrls(files) 269 fixAbsoluteUrls(files)
270 270
271 dirname = metadata.get('general', 'basename') + '.safariextension' 271 dirname = metadata.get('general', 'basename') + '.safariextension'
272 for filename in files.keys(): 272 for filename in files.keys():
273 files[os.path.join(dirname, filename)] = files.pop(filename) 273 files[os.path.join(dirname, filename)] = files.pop(filename)
274 274
275 if not devenv and keyFile: 275 if not devenv and keyFile:
276 createSignedXarArchive(outFile, files, certs, key) 276 createSignedXarArchive(outFile, files, certs, key)
277 else: 277 else:
278 files.zip(outFile) 278 files.zip(outFile)
LEFTRIGHT

Powered by Google App Engine
This is Rietveld