Skip to content
Permalink
Browse files
[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

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:

Canonical link: https://commits.webkit.org/209974@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242882 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
thiblahute authored and webkit-commit-queue committed Mar 13, 2019
1 parent dd63c57 commit 5eefce516fba269742d914d9ccd25cf387c30862
Showing 3 changed files with 37 additions and 7 deletions.
@@ -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
@@ -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]
@@ -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

0 comments on commit 5eefce5

Please sign in to comment.