forked from spack/spack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
spack env track
command (spack#41897)
This PR adds a sub-command to `spack env` (`track`) which allows users to add/link anonymous environments into their installation as named environments. This allows users to more easily track their installed packages and the environments they're dependencies of. For example, with the addition of spack#41731 it's now easier to remove all packages not required by any environments with, ``` spack gc -bE ``` #### Usage ``` spack env track /path/to/env ==> Linked environment in /path/to/env ==> You can activate this environment with: ==> spack env activate env ``` By default `track /path/to/env` will use the last directory in the path as the name of the environment. However users may customize the name of the linked environment with `-n | --name`. Shown below. ``` spack env track /path/to/env --name foo ==> Tracking environment in /path/to/env ==> You can activate this environment with: ==> spack env activate foo ``` When removing a linked environment, Spack will remove the link to the environment but will keep the structure of the environment within the directory. This will allow users to remove a linked environment from their installation without deleting it from a shared repository. There is a `spack env untrack` command that can be used to *only* untrack a tracked environment -- it will fail if it is used on a managed environment. Users can also use `spack env remove` to untrack an environment. This allows users to continue to share environments in git repositories while also having the dependencies of those environments be remembered by Spack. --------- Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
- Loading branch information
Showing
5 changed files
with
331 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.