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

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

Issue 11946002: [NaCl SDK] Fix update issues in sdk_tools. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: feedback Created 7 years, 11 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
« no previous file with comments | « no previous file | native_client_sdk/src/build_tools/tests/sdktools_commands_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/build_tools/sdk_tools/command/update.py
diff --git a/native_client_sdk/src/build_tools/sdk_tools/command/update.py b/native_client_sdk/src/build_tools/sdk_tools/command/update.py
index 674c6e90f54b587756fe02343cc1f70cce4ddd9b..c8fb9435ac4584faf0ffb07b0874d0e8c194b758 100644
--- a/native_client_sdk/src/build_tools/sdk_tools/command/update.py
+++ b/native_client_sdk/src/build_tools/sdk_tools/command/update.py
@@ -131,8 +131,8 @@ class RealUpdateDelegate(UpdateDelegate):
def Update(delegate, remote_manifest, local_manifest, bundle_names, force):
valid_bundles = set([bundle.name for bundle in remote_manifest.GetBundles()])
- requested_bundles = _GetRequestedBundlesFromArgs(remote_manifest,
- bundle_names)
+ requested_bundles = _GetRequestedBundleNamesFromArgs(remote_manifest,
+ bundle_names)
invalid_bundles = requested_bundles - valid_bundles
if invalid_bundles:
logging.warn('Ignoring unknown bundle(s): %s' % (
@@ -175,17 +175,17 @@ def UpdateBundleIfNeeded(delegate, remote_manifest, local_manifest,
logging.error('Bundle %s does not exist.' % (bundle_name,))
-def _GetRequestedBundlesFromArgs(remote_manifest, requested_bundles):
+def _GetRequestedBundleNamesFromArgs(remote_manifest, requested_bundles):
requested_bundles = set(requested_bundles)
if RECOMMENDED in requested_bundles:
requested_bundles.discard(RECOMMENDED)
- requested_bundles |= set(_GetRecommendedBundles(remote_manifest))
+ requested_bundles |= set(_GetRecommendedBundleNames(remote_manifest))
return requested_bundles
-def _GetRecommendedBundles(remote_manifest):
- return [bundle for bundle in remote_manifest.GetBundles() if
+def _GetRecommendedBundleNames(remote_manifest):
+ return [bundle.name for bundle in remote_manifest.GetBundles() if
bundle.recommended]
@@ -217,15 +217,15 @@ def _UpdateBundle(delegate, bundle, local_manifest):
if repath_dir:
# If repath is specified:
# The files are extracted to nacl_sdk/<bundle.name>_update/<repath>/...
- # The destination directory is nacl_sdk/<repath>/...
+ # The destination directory is nacl_sdk/<bundle.name>/...
rename_from_dir = os.path.join(extract_dir, repath_dir)
- rename_to_dir = repath_dir
else:
# If no repath is specified:
# The files are extracted to nacl_sdk/<bundle.name>_update/...
# The destination directory is nacl_sdk/<bundle.name>/...
rename_from_dir = extract_dir
- rename_to_dir = bundle.name
+
+ rename_to_dir = bundle.name
delegate.ExtractArchive(dest_filename, extract_dir, rename_from_dir,
rename_to_dir)
« no previous file with comments | « no previous file | native_client_sdk/src/build_tools/tests/sdktools_commands_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698