Is it possible to relocate a Spack installation? #43307
-
The system I have spack on is phase out the mount point I have spack on. It is possible to relocate a spack installation? It seems that rebuilding modules would work. But what about the paths in spack packages like in package/.spack/* ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Spack does have relocation logic for:
Right now, none of that is implemented for prefix to prefix relocation (though I don't think it would be super hard to make a Relocation doesn't work 100% unless you're relocating to a destination path that's the same or shorter length than the source path (because we can't lengthen certain fields in binaries). We solve that in CI with So, if you are moving to a shorter path, you could create buildcaches out of all your installations and reinstall them in the new location. Otherwise your options are to rebuild or to implement the |
Beta Was this translation helpful? Give feedback.
Spack does have relocation logic for:
link_type: copy
Right now, none of that is implemented for prefix to prefix relocation (though I don't think it would be super hard to make a
spack relocate
command to move an entire install tree.Relocation doesn't work 100% unless you're relocating to a destination path that's the same or shorter length than the source path (because we can't lengthen certain fields in binaries). We solve that in CI with
spack config add "config:install_tree:padded_length:128"
(see the tutorial), but normal installs aren't done that way.So, if you are moving to a shorter path, you could create buildcache…