[gnome-continuous] mozjs60 patch to ignore unknown configure args



commit 82a9562ada9b9af1922dac44d628a27969129ce5
Author: Philip Chimento <philip chimento gmail com>
Date:   Sun Jul 29 10:54:56 2018 -0400

    mozjs60 patch to ignore unknown configure args
    
    I mistakenly thought this was already included in the buildapi patch.

 manifest.json                               |  3 +-
 patches/mozjs60-unknown-build-options.patch | 47 +++++++++++++++++++++++++++++
 2 files changed, 49 insertions(+), 1 deletion(-)
---
diff --git a/manifest.json b/manifest.json
index 98beb66..e72593e 100644
--- a/manifest.json
+++ b/manifest.json
@@ -495,7 +495,8 @@
                  "checksum": "834ffe877fdbbd81315ae3c101221fa404096c354483a86c1a02ece19fca68fd",
                  "name": "mozjs60",
                  "component": "minimal",
-                 "patches": ["mozjs60-buildapi.patch"],
+                 "patches": ["mozjs60-buildapi.patch",
+                             "mozjs60-unknown-build-options.patch"],
                  "config-opts": ["--enable-posix-nspr-emulation",
                                  "--disable-jemalloc",
                                  "--disable-tests",
diff --git a/patches/mozjs60-unknown-build-options.patch b/patches/mozjs60-unknown-build-options.patch
new file mode 100644
index 0000000..d97f339
--- /dev/null
+++ b/patches/mozjs60-unknown-build-options.patch
@@ -0,0 +1,47 @@
+From 0231f76f27266c62a5b41bb61fe8e0008790da5f Mon Sep 17 00:00:00 2001
+From: Philip Chimento <philip chimento gmail com>
+Date: Wed, 5 Jul 2017 22:57:09 -0700
+Subject: [PATCH] build: Be nicer about options
+
+We have to account for JHbuild passing extra unknown
+options like --disable-Werror.
+
+This has been rejected upstream and is only needed for GNOME Continuous
+which passes --build automatically. JHbuild uses
+supports-unknown-configure-options although it is debatable whether we
+want to keep that.
+---
+ python/mozbuild/mozbuild/configure/__init__.py | 2 +-
+ python/mozbuild/mozbuild/configure/options.py  | 6 +++++-
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/python/mozbuild/mozbuild/configure/__init__.py b/python/mozbuild/mozbuild/configure/__init__.py
+index 0fe640cae..09b460d3a 100644
+--- a/python/mozbuild/mozbuild/configure/__init__.py
++++ b/python/mozbuild/mozbuild/configure/__init__.py
+@@ -356,7 +356,7 @@ def run(self, path=None):
+         # All options should have been removed (handled) by now.
+         for arg in self._helper:
+             without_value = arg.split('=', 1)[0]
+-            raise InvalidOptionError('Unknown option: %s' % without_value)
++            print('Ignoring', without_value, ': Unknown option')
+ 
+         # Run the execution queue
+         for func, args in self._execution_queue:
+diff --git a/python/mozbuild/mozbuild/configure/options.py b/python/mozbuild/mozbuild/configure/options.py
+index 4310c8627..15bfe4254 100644
+--- a/python/mozbuild/mozbuild/configure/options.py
++++ b/python/mozbuild/mozbuild/configure/options.py
+@@ -402,7 +402,11 @@ def __init__(self, environ=os.environ, argv=sys.argv):
+ 
+     def add(self, arg, origin='command-line', args=None):
+         assert origin != 'default'
+-        prefix, name, values = Option.split_option(arg)
++        try:
++            prefix, name, values = Option.split_option(arg)
++        except InvalidOptionError as e:
++            print('Ignoring', arg, ':', e)
++            return
+         if args is None:
+             args = self._extra_args
+         if args is self._extra_args and name in self._extra_args:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]