summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorL. E. Segovia <amy@centricular.com>2024-05-15 19:15:42 -0300
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2024-05-21 13:55:14 +0000
commit135aa73b5d682fc66e1ad21f9fa7fdcb2704fa43 (patch)
treecd3f11a279006c68ec438de47b21d5561e08dd31
parent9857cbb20a147b9919826e21754d13b6755a8990 (diff)
package: Ensure instance is cleanly initialized by the constructor
Fixes base-crypto overriding the Package class's internal state, since it doesn't have deps of its own. See #480 Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1474>
-rw-r--r--cerbero/packages/package.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/cerbero/packages/package.py b/cerbero/packages/package.py
index 98e84447..73d558cb 100644
--- a/cerbero/packages/package.py
+++ b/cerbero/packages/package.py
@@ -257,16 +257,22 @@ class Package(PackageBase):
@type osx_framework_library: tuple
"""
- deps = list()
- files = list()
- platform_files = dict()
- files_devel = list()
- platform_files_devel = dict()
+ deps = None
+ files = None
+ platform_files = None
+ files_devel = None
+ platform_files_devel = None
osx_framework_library = None
def __init__(self, config, store, cookbook):
PackageBase.__init__(self, config, store)
self.cookbook = cookbook
+ self.deps = self.deps or []
+ self.files = self.files or []
+ self.platform_files = self.platform_files or {}
+ self.files_devel = self.files_devel or []
+ self.platform_files_devel = self.platform_files_devel or {}
+ self.osx_framework_library = self.osx_framework_library or None
def load_files(self):
self._files = self.files + self.platform_files.get(self.config.target_platform, [])