Backed out changeset c62948fc14e6 (bug 1502457) draft
authorSebastian Hengst <archaeopteryx@coole-files.de>
Mon, 19 Nov 2018 21:37:43 +0200
changeset 1764286 a9f52110f5825305957b2080365c320fc2662c7c
parent 1764285 05388a0632555e6a4caa45e4f47a66979d273141
child 1764287 9bc099b5479850349a6cdfa7f1262fadc5c790a3
push id316349
push userarchaeopteryx@coole-files.de
push dateMon, 19 Nov 2018 19:59:21 +0000
treeherdertry@f74cad46e59d [default view] [failures only]
bugs1502457
milestone65.0a1
backs outc62948fc14e698a9a987b8d8ec229d3f464bedb1
Backed out changeset c62948fc14e6 (bug 1502457)
build/moz.configure/init.configure
old-configure.in
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -1036,37 +1036,25 @@ set_define('MOZ_BUILD_APP', build_projec
 add_old_configure_assignment('MOZ_BUILD_APP', build_project)
 
 
 # set RELEASE_OR_BETA and NIGHTLY_BUILD variables depending on the cycle we're in
 # The logic works like this:
 # - if we have "a1" in GRE_MILESTONE, we're building Nightly (define NIGHTLY_BUILD)
 # - otherwise, if we have "a" in GRE_MILESTONE, we're building Nightly or Aurora
 # - otherwise, we're building Release/Beta (define RELEASE_OR_BETA)
-@depends(check_build_environment, build_project, '--help')
+@depends(check_build_environment, '--help')
 @imports(_from='__builtin__', _import='open')
 @imports('re')
-def milestone(build_env, build_project, _):
-    versions = []
-    paths = ['config/milestone.txt']
-    if build_project == 'js':
-        paths = paths * 3
-    else:
-        paths += [
-            'browser/config/version.txt',
-            'browser/config/version_display.txt',
-        ]
-    for p in paths:
-        with open(os.path.join(build_env.topsrcdir, p), 'r') as fh:
-            content = fh.read().splitlines()
-            if not content:
-                die('Could not find a version number in {}'.format(p))
-            versions.append(content[-1])
-
-    milestone, firefox_version, firefox_version_display = versions
+def milestone(build_env, _):
+    milestone_path = os.path.join(build_env.topsrcdir,
+                                  'config',
+                                  'milestone.txt')
+    with open(milestone_path, 'r') as fh:
+        milestone = fh.read().splitlines()[-1]
 
     is_nightly = is_release_or_beta = None
 
     if 'a1' in milestone:
         is_nightly = True
     elif 'a' not in milestone:
         is_release_or_beta = True
 
@@ -1078,19 +1066,17 @@ def milestone(build_env, build_project, 
     # patch leve (bugs 572659 and 870868).
     #
     # Only expose major milestone and alpha version in the symbolversion
     # string; as the name suggests, we use it for symbol versioning on Linux.
     return namespace(version=milestone,
                      uaversion='%s.0' % major_version,
                      symbolversion='%s%s' % (major_version, ab_patch),
                      is_nightly=is_nightly,
-                     is_release_or_beta=is_release_or_beta,
-                     firefox_version=firefox_version,
-                     firefox_version_display=firefox_version_display)
+                     is_release_or_beta=is_release_or_beta)
 
 
 set_config('GRE_MILESTONE', milestone.version)
 set_config('NIGHTLY_BUILD', milestone.is_nightly)
 set_define('NIGHTLY_BUILD', milestone.is_nightly)
 add_old_configure_assignment('NIGHTLY_BUILD', milestone.is_nightly)
 set_config('RELEASE_OR_BETA', milestone.is_release_or_beta)
 set_define('RELEASE_OR_BETA', milestone.is_release_or_beta)
@@ -1100,21 +1086,16 @@ set_define('MOZILLA_VERSION', depends(mi
 set_config('MOZILLA_VERSION', milestone.version)
 set_define('MOZILLA_VERSION_U', milestone.version)
 set_define('MOZILLA_UAVERSION', depends(milestone)(lambda m: '"%s"' % m.uaversion))
 set_config('MOZILLA_SYMBOLVERSION', milestone.symbolversion)
 # JS configure still wants to look at these.
 add_old_configure_assignment('MOZILLA_VERSION', milestone.version)
 add_old_configure_assignment('MOZILLA_SYMBOLVERSION', milestone.symbolversion)
 
-set_config('FIREFOX_VERSION', milestone.firefox_version)
-set_define('FIREFOX_VERSION', milestone.firefox_version)
-add_old_configure_assignment('FIREFOX_VERSION', milestone.firefox_version)
-add_old_configure_assignment('FIREFOX_VERSION_DISPLAY', milestone.firefox_version_display)
-
 # The app update channel is 'default' when not supplied. The value is used in
 # the application's confvars.sh (and is made available to a project specific
 # moz.configure).
 option('--enable-update-channel',
        nargs=1,
        help='Select application update channel',
        default='default')
 
--- a/old-configure.in
+++ b/old-configure.in
@@ -684,16 +684,28 @@ case "$host" in
     ;;
 
 *)
     HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
     HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O2}"
     ;;
 esac
 
+dnl Get version of various core apps from the version files.
+FIREFOX_VERSION=`cat $_topsrcdir/browser/config/version.txt`
+FIREFOX_VERSION_DISPLAY=`cat $_topsrcdir/browser/config/version_display.txt`
+
+if test -z "$FIREFOX_VERSION"; then
+    AC_MSG_ERROR([FIREFOX_VERSION is unexpectedly blank.])
+fi
+
+if test -z "$FIREFOX_VERSION_DISPLAY"; then
+    AC_MSG_ERROR([FIREFOX_VERSION_DISPLAY is unexpectedly blank.])
+fi
+
 MOZ_DOING_LTO(lto_is_enabled)
 
 dnl ========================================================
 dnl System overrides of the defaults for target
 dnl ========================================================
 
 case "$target" in
 *-darwin*)
@@ -4054,16 +4066,18 @@ AC_DEFINE_UNQUOTED(MOZ_APP_UA_NAME, "$MO
 AC_SUBST(MOZ_APP_UA_NAME)
 AC_DEFINE_UNQUOTED(MOZ_APP_UA_VERSION, "$MOZ_APP_VERSION")
 AC_SUBST(MOZ_APP_VERSION)
 AC_SUBST(MOZ_APP_VERSION_DISPLAY)
 AC_DEFINE_UNQUOTED(BROWSER_CHROME_URL, $BROWSER_CHROME_URL)
 AC_DEFINE_UNQUOTED(BROWSER_CHROME_URL_QUOTED, "$BROWSER_CHROME_URL")
 
 AC_SUBST(MOZ_APP_MAXVERSION)
+AC_DEFINE_UNQUOTED(FIREFOX_VERSION,$FIREFOX_VERSION)
+AC_SUBST(FIREFOX_VERSION)
 AC_SUBST(MOZ_UA_OS_AGNOSTIC)
 if test -n "$MOZ_UA_OS_AGNOSTIC"; then
   AC_DEFINE(MOZ_UA_OS_AGNOSTIC)
 fi
 
 AC_SUBST(MOZ_PKG_SPECIAL)
 AC_SUBST(MOZ_SIMPLE_PACKAGE_NAME)