summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJohn W. Parent <45471568+johnwparent@users.noreply.github.com>2022-05-09 13:28:14 -0400
committerGitHub <noreply@github.com>2022-05-09 10:28:14 -0700
commit9bcf496f2185d1a379379606f8793b966c703655 (patch)
tree69b725827ac19bafc20aa3b057a2767cafbd780f /bin
parent060e88387e7fd27c6e13dc1ca222e3c6b7d7f1fe (diff)
downloadspack-9bcf496f2185d1a379379606f8793b966c703655.tar.gz
spack-9bcf496f2185d1a379379606f8793b966c703655.tar.bz2
spack-9bcf496f2185d1a379379606f8793b966c703655.tar.xz
spack-9bcf496f2185d1a379379606f8793b966c703655.zip
Windows permissions: uninstalling and cleaning stages (#29714)
When running on Windows, Spack may generate files in the stage/install prefixes that do not have write permissions, which prevents the removal of those directories (e.g. when cleaning stages or uninstalling). There should be a refactoring to avoid this in the first place, but that is assumed to be longer term, so the temporary fix is to make such files writable if they are not. This PR: * Automatically handles these permissions errors when uninstalling packages from the Spack root (makes then writable) * Updates similar already-existing logic when removing Spack-managed stage directories (the error-handling was assuming all errors were permissions errors and was therefore handling other errors inappropriately) Note: these permissions issues only appear on Windows so this logic is only applied there (permissions are not modified for this purpose on Linux etc.). This also adds special handling for a case where calling `isdir` on an `os.DirEntry` object would fail for improperly-created symlinks (e.g. on Windows, using `os.symlink` without `target_is_directory=True`). Note this specific issue only came up when enabling link_tree tests (specifically `source_merge_visitor_cant_be_cyclical`).
Diffstat (limited to 'bin')
0 files changed, 0 insertions, 0 deletions