[Flatpak] Expand submodule recursively
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Mar 2019 15:33:01 +0000 (15:33 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Mar 2019 15:33:01 +0000 (15:33 +0000)
https://bugs.webkit.org/show_bug.cgi?id=195672

Building WPE with flatpak was impossible without that as it was raising an exception.
Also update wpebackend-fdo to match what is built in jhbuild

Patch by Thibault Saunier <tsaunier@igalia.com> on 2019-03-13
Reviewed by Philippe Normand.

* flatpak/flatpakutils.py:
(expand_submodules_recurse):
(expand_manifest):
* flatpak/org.webkit.WPEModules.yaml:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242882 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/flatpak/flatpakutils.py
Tools/flatpak/org.webkit.WPEModules.yaml

index 03eb164..dcd457b 100644 (file)
@@ -1,3 +1,18 @@
+2019-03-13  Thibault Saunier  <tsaunier@igalia.com>
+
+        [Flatpak] Expand submodule recursively
+        https://bugs.webkit.org/show_bug.cgi?id=195672
+
+        Building WPE with flatpak was impossible without that as it was raising an exception.
+        Also update wpebackend-fdo to match what is built in jhbuild
+
+        Reviewed by Philippe Normand.
+
+        * flatpak/flatpakutils.py:
+        (expand_submodules_recurse):
+        (expand_manifest):
+        * flatpak/org.webkit.WPEModules.yaml:
+
 2019-03-13  Aakash Jain  <aakash_jain@apple.com>
 
         [ews-app] status bubble should be hidden for certain builds
index 172ad1c..0e3d132 100644 (file)
@@ -164,6 +164,24 @@ def load_manifest(manifest_path, port_name=None, command=None):
     return manifest
 
 
+def expand_submodules_recurse(modules, manifest_path, port_name, command):
+    all_modules = []
+    if type(modules) is str:
+        submanifest_path = os.path.join(os.path.dirname(manifest_path), modules)
+        submanifest = load_manifest(submanifest_path, port_name=port_name, command=command)
+        all_modules.extend(expand_submodules_recurse(submanifest, submanifest_path, port_name, command))
+        return all_modules
+
+    for module in modules:
+        if type(module) is str:
+            submanifest_path = os.path.join(os.path.dirname(manifest_path), module)
+            submanifest = load_manifest(submanifest_path, port_name=port_name, command=command)
+            all_modules.extend(expand_submodules_recurse(submanifest, submanifest_path, port_name, command))
+        else:
+            all_modules.append(module)
+
+    return all_modules
+
 def expand_manifest(manifest_path, outfile, port_name, source_root, command):
     """Creates the manifest file."""
     try:
@@ -188,10 +206,7 @@ def expand_manifest(manifest_path, outfile, port_name, source_root, command):
         if not overriden_modules:
             overriden_modules = []
     for modules in manifest["modules"]:
-        submanifest_path = None
-        if type(modules) is str:
-            submanifest_path = os.path.join(os.path.dirname(manifest_path), modules)
-            modules = load_manifest(submanifest_path, port_name=port_name, command=command)
+        modules = expand_submodules_recurse(modules, manifest_path, port_name, command)
 
         if not isinstance(modules, list):
             modules = [modules]
index 962c967..54391b6 100644 (file)
@@ -7,6 +7,6 @@
 - name: wpebackend-fdo
   buildsystem: cmake-ninja
   sources:
-    - type: archive
-      url: https://wpewebkit.org/releases/wpebackend-fdo-1.1.0.tar.xz
-      sha256: f6c72130d16e50860cb83eb0f6e109c76f1826d2c6bee39025fb3651941761e7
+    - type: git
+      url: https://github.com/Igalia/wpebackend-fdo.git
+      commit: fa227dac7c6a133d62b35d7a6af0332582b64d4d