Allow forced deactivation -- best effort unlinking
spack deactivate -f will unlink even if Spack thinks the package isn't enabled. Made deactivate routines idempotent.
This commit is contained in:
@@ -175,6 +175,10 @@ def unmerge(self, dest_root, **kwargs):
|
||||
kwargs['order'] = 'post'
|
||||
for src, dest in traverse_tree(self._root, dest_root, **kwargs):
|
||||
if os.path.isdir(src):
|
||||
# Skip non-existing links.
|
||||
if not os.path.exists(dest):
|
||||
continue
|
||||
|
||||
if not os.path.isdir(dest):
|
||||
raise ValueError("File blocks directory: %s" % dest)
|
||||
|
||||
|
Reference in New Issue
Block a user