Skip to content

Commit

Permalink
[Flatpak] Expand submodule recursively
Browse files Browse the repository at this point in the history
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 5eefce5
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 7 deletions.
15 changes: 15 additions & 0 deletions Tools/ChangeLog
@@ -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
Expand Down
23 changes: 19 additions & 4 deletions Tools/flatpak/flatpakutils.py
Expand Up @@ -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:
Expand All @@ -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]
Expand Down
6 changes: 3 additions & 3 deletions Tools/flatpak/org.webkit.WPEModules.yaml
Expand Up @@ -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.