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

Side by Side Diff: native_client_sdk/src/build_tools/sdk_tools/commands/info.py

Issue 11228013: [NaCl SDK] Refactor sdk_update*. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: windows fixes Created 8 years, 2 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import logging
6 import manifest_util
7
8 __all__ = ['Info']
9
10 def Info(manifest, bundle_names):
11 valid_bundles = [bundle.name for bundle in manifest.GetBundles()]
12 valid_bundles = set(bundle_names) & set(valid_bundles)
13 invalid_bundles = set(bundle_names) - valid_bundles
14 if invalid_bundles:
15 logging.warn('Unknown bundle(s): %s\n' % (', '.join(invalid_bundles)))
16
17 for bundle_name in bundle_names:
18 if bundle_name not in valid_bundles:
19 continue
20
21 bundle = manifest.GetBundle(bundle_name)
22
23 print bundle.name
24 for key, value in bundle.iteritems():
25 if key == manifest_util.ARCHIVES_KEY:
26 archive = bundle.GetHostOSArchive()
27 print ' Archive:'
28 if archive:
29 for archive_key, archive_value in archive.iteritems():
30 print ' %s: %s' % (archive_key, archive_value)
31 else:
32 print ' No archives for this host.'
33 elif key not in (manifest_util.ARCHIVES_KEY, manifest_util.NAME_KEY):
34 print ' %s: %s' % (key, value)
35 print
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698