summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorL. E. Segovia <amy@centricular.com>2024-05-15 19:19:10 -0300
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2024-05-21 13:55:14 +0000
commitc29b8d95b91e9aa414adeb61a49046edec7c5b85 (patch)
treed19c0bee4ec6cdc3c1ca8f75401bf061c527d782
parent135aa73b5d682fc66e1ad21f9fa7fdcb2704fa43 (diff)
WiX: fix empty modules causing build failures
These modules were previously affected by base-crypto overriding the Package superclass: - gstreamer-1.0-qt5 (both runtime and devel) - gstreamer-1.0-qt6 (both runtime and devel) - vsintegration-1.0 (runtime only) - gstreamer-1.0-vs-templates (runtime only) Fixes #480 Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1474>
-rw-r--r--cerbero/packages/wix_packager.py22
1 files changed, 13 insertions, 9 deletions
diff --git a/cerbero/packages/wix_packager.py b/cerbero/packages/wix_packager.py
index 5e5b753c..8c6f8ee4 100644
--- a/cerbero/packages/wix_packager.py
+++ b/cerbero/packages/wix_packager.py
@@ -45,17 +45,23 @@ class MergeModulePackager(PackagerBase):
# create runtime package
p = self.create_merge_module(output_dir, PackageType.RUNTIME, force, self.package.version, keep_temp)
- paths.append(p)
+ if p:
+ paths.append(p)
if devel:
p = self.create_merge_module(output_dir, PackageType.DEVEL, force, self.package.version, keep_temp)
- paths.append(p)
+ if p:
+ paths.append(p)
return paths
def create_merge_module(self, output_dir, package_type, force, version, keep_temp, keep_strip_temp_dir=False):
self.package.set_mode(package_type)
- files_list = self.files_list(package_type, force)
+ try:
+ files_list = self.files_list(package_type, force)
+ except EmptyPackageError:
+ m.warning('Package %s is empty, skipping module generation' % self.package.name)
+ return None
if isinstance(self.package, VSTemplatePackage):
mergemodule = VSMergeModule(self.config, files_list, self.package)
else:
@@ -209,15 +215,13 @@ class MSIPackager(PackagerBase):
package.wix_use_fragment = self.package.wix_use_fragment
m.action('Creating Merge Module for %s' % package)
packager = MergeModulePackager(self.config, package, self.store)
- try:
- path = packager.create_merge_module(
- self.output_dir, package_type, self.force, self.package.version, self.keep_temp, True
- )
+ path = packager.create_merge_module(
+ self.output_dir, package_type, self.force, self.package.version, self.keep_temp, True
+ )
+ if path:
packagedeps[package] = path[0]
if path[1]:
tmp_dirs.append(path[1])
- except EmptyPackageError:
- m.warning('Package %s is empty' % package)
self.packagedeps = packagedeps
self.merge_modules[package_type] = list(packagedeps.values())
return tmp_dirs