Bug 1279151 - Version'ize the result of yasm_version. r?chmanchester draft
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 09 Jun 2016 15:27:59 +0900
changeset 376929 2507006e8ed0f3fe1ff1c45a674be398d2d6505b
parent 376908 511a2389ca48a403386aeb8f0025f26bab1e882e
child 376936 d27874d4d712def61610f5174f83cd0d3eca99f7
push id20719
push userbmo:mh+mozilla@glandium.org
push dateThu, 09 Jun 2016 06:39:55 +0000
reviewerschmanchester
bugs1279151, 1269513, 0, 19615
milestone50.0a1
Bug 1279151 - Version'ize the result of yasm_version. r?chmanchester Before bug 1269513, yasm_version returned a Version object, and it doesn't anymore, which made the assignment of _YASM_*_VERSION skipped silently. Then, configure would go through the yasm version checks as if they were false and skipping over the AC_MSG_ERRORs, printing out: /builds/slave/try-m64-0000000000000000000000/build/src/old-configure: line 19615: test: : integer expression expected which is why this went undetected: the version checks were simply ignored. Some shells, however, evaluated the yasm version checks as true, hitting the AC_MSG_ERRORs.
build/moz.configure/toolchain.configure
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -10,17 +10,17 @@ yasm = check_prog('YASM', ['yasm'], allo
 
 @depends_if(yasm)
 @checking('yasm version')
 def yasm_version(yasm):
     version = check_cmd_output(
         yasm, '--version',
         onerror=lambda: die('Failed to get yasm version.')
     ).splitlines()[0].split()[1]
-    return version
+    return Version(version)
 
 # Until we move all the yasm consumers out of old-configure.
 # bug 1257904
 add_old_configure_assignment('_YASM_MAJOR_VERSION',
                              delayed_getattr(yasm_version, 'major'))
 add_old_configure_assignment('_YASM_MINOR_VERSION',
                              delayed_getattr(yasm_version, 'minor'))