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

Unified Diff: native_client_sdk/src/build_tools/sdk_tools/command/info.py

Issue 11228013: [NaCl SDK] Refactor sdk_update*. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix build_updater 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 side-by-side diff with in-line comments
Download patch
Index: native_client_sdk/src/build_tools/sdk_tools/command/info.py
diff --git a/native_client_sdk/src/build_tools/sdk_tools/command/info.py b/native_client_sdk/src/build_tools/sdk_tools/command/info.py
new file mode 100644
index 0000000000000000000000000000000000000000..d45c4ca5bc8c9cd10cfb2720ae13c619240af426
--- /dev/null
+++ b/native_client_sdk/src/build_tools/sdk_tools/command/info.py
@@ -0,0 +1,34 @@
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import logging
+import manifest_util
+
+def Info(manifest, bundle_names):
+ valid_bundles = [bundle.name for bundle in manifest.GetBundles()]
+ valid_bundles = set(bundle_names) & set(valid_bundles)
+ invalid_bundles = set(bundle_names) - valid_bundles
+ if invalid_bundles:
+ logging.warn('Unknown bundle(s): %s\n' % (', '.join(invalid_bundles)))
+
+ for bundle_name in bundle_names:
+ if bundle_name not in valid_bundles:
+ continue
+
+ bundle = manifest.GetBundle(bundle_name)
+
+ print bundle.name
+ for key in sorted(bundle.iterkeys()):
+ value = bundle[key]
+ if key == manifest_util.ARCHIVES_KEY:
+ archive = bundle.GetHostOSArchive()
+ print ' Archive:'
+ if archive:
+ for archive_key in sorted(archive.iterkeys()):
+ print ' %s: %s' % (archive_key, archive[archive_key])
+ else:
+ print ' No archives for this host.'
+ elif key not in (manifest_util.ARCHIVES_KEY, manifest_util.NAME_KEY):
+ print ' %s: %s' % (key, value)
+ print

Powered by Google App Engine
This is Rietveld 408576698