summaryrefslogtreecommitdiffstats
path: root/native_client_sdk
diff options
context:
space:
mode:
authormgiuca <mgiuca@chromium.org>2014-08-26 04:53:17 -0700
committerCommit bot <commit-bot@chromium.org>2014-08-26 11:54:23 +0000
commitee69a3bdc3311bdda864a9e3e042aa382ef9996b (patch)
tree26629d26f10585c4bb0863c315287e32e0deb289 /native_client_sdk
parent2d454cf9a5f405dfd78cf581f0e414ff628857b8 (diff)
downloadchromium_src-ee69a3bdc3311bdda864a9e3e042aa382ef9996b.zip
chromium_src-ee69a3bdc3311bdda864a9e3e042aa382ef9996b.tar.gz
chromium_src-ee69a3bdc3311bdda864a9e3e042aa382ef9996b.tar.bz2
NaCl SDK: Fixed getos.py crashing due to Git migration.
Was trying to parse a Git commit hash as an int. getos --check-version no longer compares exact revision numbers, only major version numbers (because the Git hashes can't directly be compared, unlike SVN numbers). Added a TODO to compare Cr-Commit-Position when it becomes available. BUG=406993 Review URL: https://codereview.chromium.org/502883002 Cr-Commit-Position: refs/heads/master@{#291888}
Diffstat (limited to 'native_client_sdk')
-rwxr-xr-xnative_client_sdk/src/tools/getos.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/native_client_sdk/src/tools/getos.py b/native_client_sdk/src/tools/getos.py
index c4e31c3..62c2b5b 100755
--- a/native_client_sdk/src/tools/getos.py
+++ b/native_client_sdk/src/tools/getos.py
@@ -80,7 +80,6 @@ def GetSDKVersion():
raise Error("error parsing SDK README: %s" % readme)
try:
- revision = int(revision)
version = int(version)
except ValueError:
raise Error("error parsing SDK README: %s" % readme)
@@ -233,10 +232,14 @@ def main(args):
elif options.check_version:
required_version = ParseVersion(options.check_version)
version = GetSDKVersion()
- if version < required_version:
- raise Error("SDK version too old (current: %s.%s, required: %s.%s)"
- % (version[0], version[1],
- required_version[0], required_version[1]))
+ # We currently ignore the revision and just check the major version number.
+ # Currently, version[1] is just a Git hash, which cannot be compared.
+ # TODO(mgiuca): Compare the minor revision numbers (which should be
+ # Cr-Commit-Position values), when http://crbug.com/406783 is fixed.
+ # Then Cr-Commit-Position should be available: see http://crbug.com/406993.
+ if version[0] < required_version[0]:
+ raise Error("SDK version too old (current: %s, required: %s)"
+ % (version[0], required_version[0]))
out = None
if out: