Skip to content
Snippets Groups Projects

Remove cmd

Merged Ashwin Kumar Karnad requested to merge continue-with-remove-cmd into main
1 file
+ 11
1
Compare changes
  • Side-by-side
  • Inline
@@ -1144,6 +1144,16 @@ def remove_spack_environment(spack_dir, environment_name):
@@ -1144,6 +1144,16 @@ def remove_spack_environment(spack_dir, environment_name):
run(" && ".join(commands_to_execute), shell=True, check=True)
run(" && ".join(commands_to_execute), shell=True, check=True)
 
def remove_spack_package(spack_dir, package):
 
"""Remove spack package."""
 
logging.info(f"Removing spack package {package}")
 
spack_env = spack_dir / "share" / "spack" / "setup-env.sh"
 
commands_to_execute = [
 
f"source {spack_env}",
 
f"spack uninstall -y {package}",
 
]
 
run(" && ".join(commands_to_execute), shell=True, check=True)
 
def start_new_environment(release, from_release, target_dir):
def start_new_environment(release, from_release, target_dir):
"""Start new MPSD software environment version."""
"""Start new MPSD software environment version."""
@@ -1345,7 +1355,7 @@ def main():
@@ -1345,7 +1355,7 @@ def main():
("available", "What is available for installation?"),
("available", "What is available for installation?"),
("install", "Install a software environment"),
("install", "Install a software environment"),
# ("reinstall", "Reinstall a package_set"),
# ("reinstall", "Reinstall a package_set"),
# ("remove", "Remove a package set"),
("remove", "Remove a package set"),
# ("start-new", "Start a new MPSD software release version"),
# ("start-new", "Start a new MPSD software release version"),
("status", "Show status: what is installed?"),
("status", "Show status: what is installed?"),
("prepare", "Prepare installation of MPSD-release (dev only)"),
("prepare", "Prepare installation of MPSD-release (dev only)"),
Loading