| |
@@ -55,8 +55,8 @@
|
| |
return release_name
|
| |
|
| |
|
| |
- def _get_runtime_packages():
|
| |
- builds = get_module_builds('flatpak-runtime', dataset_release_branch())
|
| |
+ def _get_runtime_packages(runtime_module):
|
| |
+ builds = get_module_builds(runtime_module, dataset_release_branch())
|
| |
# Each flatpak-runtime stream should be built against a single context
|
| |
assert len(builds) == 1
|
| |
build = builds[0]
|
| |
@@ -67,8 +67,8 @@
|
| |
return set(mmd.peek_profiles()['runtime'].peek_rpms().get())
|
| |
|
| |
|
| |
- def _get_common_packages():
|
| |
- builds = get_module_builds('flatpak-common', dataset_release_branch(), include_rpms=True)
|
| |
+ def _get_common_packages(common_module):
|
| |
+ builds = get_module_builds(common_module, dataset_release_branch(), include_rpms=True)
|
| |
# Each flatpak-common stream should be built against a single context
|
| |
assert len(builds) == 1
|
| |
build = builds[0]
|
| |
@@ -139,9 +139,16 @@
|
| |
|
| |
self.api_srpms = {rpm_name_only(_depchase.get_srpm_for_rpm(pool, pkg))}
|
| |
|
| |
- hint_packages = _get_runtime_packages()
|
| |
+ if self.kde:
|
| |
+ runtime_module = 'flatpak-kde5-runtime'
|
| |
+ common_module = 'flatpak-kde5-common'
|
| |
+ else:
|
| |
+ runtime_module = 'flatpak-runtime'
|
| |
+ common_module = 'flatpak-common'
|
| |
+
|
| |
+ hint_packages = _get_runtime_packages(runtime_module)
|
| |
if self.include_flatpak_common:
|
| |
- hint_packages.update(_get_common_packages())
|
| |
+ hint_packages.update(_get_common_packages(common_module))
|
| |
|
| |
all_needed_packages = _depchase.ensure_installable(
|
| |
pool, [pkg], hints=hint_packages)
|
| |
@@ -152,9 +159,9 @@
|
| |
for dep in pkgs}
|
| |
self.run_srpms = run_srpms - self.api_srpms
|
| |
|
| |
- self.module_run_deps = {'flatpak-runtime': [dataset_release_branch()]}
|
| |
+ self.module_run_deps = {runtime_module: [dataset_release_branch()]}
|
| |
if self.include_flatpak_common:
|
| |
- self.module_run_deps['flatpak-common'] = [dataset_release_branch()]
|
| |
+ self.module_run_deps[common_module] = [dataset_release_branch()]
|
| |
self.module_run_deps['platform'] = [dataset_release_branch()]
|
| |
|
| |
def _update_module_md(self):
|
| |
@@ -236,10 +243,11 @@
|
| |
f" Please edit appropriately.")
|
| |
|
| |
def run(self, output_modulemd, output_containerspec,
|
| |
- force=False, flathub=None, include_flatpak_common=False):
|
| |
+ force=False, flathub=None, include_flatpak_common=False, kde=False):
|
| |
flathub_manifest = _load_flathub_manifest(flathub) if flathub else None
|
| |
|
| |
self.include_flatpak_common = include_flatpak_common
|
| |
+ self.kde = kde
|
| |
|
| |
if output_modulemd is None:
|
| |
pkg = self.pkgs[0]
|
| |
@@ -263,7 +271,7 @@
|
| |
def do_flatpak_report(pkgs, quiet=False):
|
| |
if not quiet:
|
| |
print("Initializing", file=sys.stderr)
|
| |
- runtime_packages = _get_runtime_packages()
|
| |
+ runtime_packages = _get_runtime_packages('flatpak-runtime')
|
| |
pool = _depchase.make_pool()
|
| |
|
| |
packages = {}
|
| |
This helps simplify the creation of new apps using the KDE 5 runtime. I'm not sure how to make this also handle KDE 6 simultaneously (but I'm open to suggestions!), but that's more manageable because so few applications currently use Qt 6. (The idea being that if not otherwise changed by then, that this would be switched to use kde6 runtime/common when KDE itself switches to Qt 6.)
I haven't tested this broadly yet, but so far it seems to be doing what I want, and shouldn't break non-KDE usage.