From 429fc858aed713a5dcb086c89f4eb0563fe44aaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eric=20M=C3=BCller?= <mueller@kip.uni-heidelberg.de> Date: Thu, 6 Mar 2025 09:01:40 +0100 Subject: [PATCH] fix(BSS2): cache content when downloading oppulance first --- packages/oppulance/package.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/oppulance/package.py b/packages/oppulance/package.py index 7df3c70f..7e0d22b6 100644 --- a/packages/oppulance/package.py +++ b/packages/oppulance/package.py @@ -4,6 +4,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * +import unittest.mock class Oppulance(Package): @@ -137,6 +138,15 @@ class Oppulance(Package): expand=False, ) + # see build-brainscales package for a description; we need to duplicate + # here, as the cache content is shared between the two repositories + @when("@9:") + def do_fetch(self, mirror_only=False): + # in the configure step, we need access to all archived .git folders + def custom_archive(self, destination): + super(spack.fetch_strategy.GitFetchStrategy, self).archive(destination) + with unittest.mock.patch('spack.fetch_strategy.GitFetchStrategy.archive', new=custom_archive): + super().do_fetch(mirror_only) def install(self, spec, prefix): ln = which('ln') -- GitLab