Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: build/linux/sysroot_scripts/merge-package-lists.py

Issue 2859323002: Remove Trusty sysroot (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | build/linux/sysroot_scripts/packagelist.trusty.arm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2016 The Chromium Authors. All rights reserved. 2 # Copyright 2016 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Merge package entries from different package lists. 6 """Merge package entries from different package lists.
7 """ 7 """
8 8
9 # This is used for replacing packages in eg. trusty with those in 9 # This is used for replacing packages in eg. jessie with those in
10 # trusty-updates. The updated packages are ABI compatible, but 10 # jessie-updates. The updated packages are ABI compatible, but
11 # include security patches, so we should use those instead in our 11 # include security patches, so we should use those instead in our
12 # sysroots. 12 # sysroots.
13 13
14 import sys 14 import sys
15 15
16 if len(sys.argv) != 2: 16 if len(sys.argv) != 2:
17 exit(1) 17 exit(1)
18 18
19 packages = {} 19 packages = {}
20 20
21 def AddPackagesFromFile(file): 21 def AddPackagesFromFile(file):
22 global packages 22 global packages
23 lines = file.readlines() 23 lines = file.readlines()
24 if len(lines) % 3 != 0: 24 if len(lines) % 3 != 0:
25 exit(1) 25 exit(1)
26 for i in xrange(0, len(lines), 3): 26 for i in xrange(0, len(lines), 3):
27 packages[lines[i]] = (lines[i + 1], lines[i + 2]) 27 packages[lines[i]] = (lines[i + 1], lines[i + 2])
28 28
29 AddPackagesFromFile(open(sys.argv[1], 'r')) 29 AddPackagesFromFile(open(sys.argv[1], 'r'))
30 AddPackagesFromFile(sys.stdin) 30 AddPackagesFromFile(sys.stdin)
31 31
32 output_file = open(sys.argv[1], 'w') 32 output_file = open(sys.argv[1], 'w')
33 33
34 for (package, (filename, sha256)) in packages.iteritems(): 34 for (package, (filename, sha256)) in packages.iteritems():
35 output_file.write(package + filename + sha256) 35 output_file.write(package + filename + sha256)
OLDNEW
« no previous file with comments | « no previous file | build/linux/sysroot_scripts/packagelist.trusty.arm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698