diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2022-01-28 16:08:44 +0530 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2022-01-29 11:49:34 +0000 |
commit | 7a53942b4e4cb139871f22f27c3a5fc11dbfdc9a (patch) | |
tree | 7d9703c84035841fe272aa16a8a8ed81c32f3306 | |
parent | 0a5e13894bbe813ae5422dc9de9119a71817d5e7 (diff) |
cerbero: Allow skipping steps in the recipe definition
Removing steps at runtime is racy, and causes this error
intermittently on the CI during bootstrap:
KeyError: 'relocate_osx_libraries'
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/786>
-rw-r--r-- | cerbero/build/recipe.py | 4 | ||||
-rw-r--r-- | recipes/build-tools/moltenvk-tools.recipe | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/cerbero/build/recipe.py b/cerbero/build/recipe.py index da9c019e..7eeef654 100644 --- a/cerbero/build/recipe.py +++ b/cerbero/build/recipe.py @@ -237,6 +237,7 @@ class Recipe(FilesProvider, metaclass=MetaRecipe): platform_deps = None runtime_dep = False bash_completions = None + skip_steps = None # Internal properties force = False @@ -271,6 +272,7 @@ SOFTWARE LICENSE COMPLIANCE.\n\n''' config.bash_completions.update(self.bash_completions) self.deps.append('bash-completion') self.platform_deps = self.platform_deps or {} + self.skip_steps = self.skip_steps or [] self._steps = self._default_steps[:] if self.config.target_platform == Platform.WINDOWS: self._steps.append(BuildSteps.GEN_LIBFILES) @@ -279,6 +281,8 @@ SOFTWARE LICENSE COMPLIANCE.\n\n''' if self.config.target_platform == Platform.DARWIN and \ self.config.prefix == self.config.build_tools_prefix: self._steps.append(BuildSteps.CODE_SIGN) + for s in self.skip_steps: + self._steps.remove(s) FilesProvider.__init__(self, config) try: self.stype.__init__(self) diff --git a/recipes/build-tools/moltenvk-tools.recipe b/recipes/build-tools/moltenvk-tools.recipe index 0acb1455..08c31959 100644 --- a/recipes/build-tools/moltenvk-tools.recipe +++ b/recipes/build-tools/moltenvk-tools.recipe @@ -13,6 +13,8 @@ class Recipe(recipe.Recipe): url = 'https://gstreamer.freedesktop.org/data/src/mirror/' + tarball_dirname + '.dmg' tarball_checksum = '9e89291283e41d62673bf48007dac764e99a504d145ee4d70d2d32e328f7ee40' btype = BuildType.CUSTOM + # The binaries from the SDK are already signed and do not require relocation + skip_steps = [BuildSteps.RELOCATE_OSX_LIBRARIES, BuildSteps.CODE_SIGN] files_bins = [ 'glslangValidator', @@ -31,11 +33,6 @@ class Recipe(recipe.Recipe): def prepare(self): if self.config.target_platform not in (Platform.IOS, Platform.DARWIN): raise InvalidRecipeError(self, "Invalid platform") - # The binaries from the SDK are already signed and do not require relocation - if BuildSteps.RELOCATE_OSX_LIBRARIES in self._steps: - self._steps.remove(BuildSteps.RELOCATE_OSX_LIBRARIES) - if BuildSteps.CODE_SIGN in self._steps: - self._steps.remove(BuildSteps.CODE_SIGN) async def install(self): srcdir = self.config.moltenvk_prefix |