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

Unified Diff: native_client_sdk/src/build_tools/update_nacl_manifest.py

Issue 11275081: [NaCl SDK] The auto-updater should only mark one version as stable, everything (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « native_client_sdk/src/build_tools/tests/test_update_nacl_manifest.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/build_tools/update_nacl_manifest.py
diff --git a/native_client_sdk/src/build_tools/update_nacl_manifest.py b/native_client_sdk/src/build_tools/update_nacl_manifest.py
index 4b05a000a90f60dcfe3c78dee5b242a128a28f19..c8fb442bf43d8278267f7f289b92919e6353ffda 100755
--- a/native_client_sdk/src/build_tools/update_nacl_manifest.py
+++ b/native_client_sdk/src/build_tools/update_nacl_manifest.py
@@ -479,6 +479,13 @@ class Updater(object):
Args:
manifest: The manifest used as a template for updating. Only pepper
bundles that contain no archives will be considered for auto-updating."""
+ # Make sure there is only one stable branch: the one with the max version.
+ # All others are post-stable.
+ stable_major_versions = [SplitVersion(version)[0] for _, version, channel, _
+ in self.versions_to_update if channel == 'stable']
+ # Add 0 in case there are no stable versions.
+ max_stable_version = max([0] + stable_major_versions)
+
for bundle_name, version, channel, archives in self.versions_to_update:
self.delegate.Print('Updating %s to %s...' % (bundle_name, version))
bundle = manifest.GetBundle(bundle_name)
@@ -489,7 +496,12 @@ class Updater(object):
# snippet.
platform_bundle.name = bundle_name
bundle.MergeWithBundle(platform_bundle)
- bundle.stability = channel
+
+ major_version = SplitVersion(version)[0]
+ if major_version < max_stable_version and channel == 'stable':
+ bundle.stability = 'post_stable'
+ else:
+ bundle.stability = channel
# We always recommend the stable version.
if channel == 'stable':
bundle.recommended = 'yes'
« no previous file with comments | « native_client_sdk/src/build_tools/tests/test_update_nacl_manifest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698