Fix order of deserialization in subprocess context (#45229)
Since the the MetaPathFinder now owns a lazily constructed RepoPath object, we need to deserialize environments before the package that needs to be restored. Before we were relying on globals to be inconsistent in a way that let the entire process go.
This commit is contained in:
parent
b539eb5aab
commit
ce1b569b69
@ -79,9 +79,11 @@ def restore(self):
|
||||
self.test_state.restore()
|
||||
spack.main.spack_working_dir = self.spack_working_dir
|
||||
env = pickle.load(self.serialized_env) if _SERIALIZE else self.env
|
||||
pkg = pickle.load(self.serialized_pkg) if _SERIALIZE else self.pkg
|
||||
if env:
|
||||
spack.environment.activate(env)
|
||||
# Order of operation is important, since the package might be retrieved
|
||||
# from a repo defined within the environment configuration
|
||||
pkg = pickle.load(self.serialized_pkg) if _SERIALIZE else self.pkg
|
||||
return pkg
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user