Skip to content

verify.py: os.path.exists exception handling#13656

Merged
becker33 merged 1 commit intospack:developfrom
DarylGrunau:bugfix/verify-path-exists-exception
Nov 11, 2019
Merged

verify.py: os.path.exists exception handling#13656
becker33 merged 1 commit intospack:developfrom
DarylGrunau:bugfix/verify-path-exists-exception

Conversation

@DarylGrunau
Copy link
Copy Markdown
Contributor

@DarylGrunau DarylGrunau commented Nov 8, 2019

This PR adds exception handling around the os.stat() call during manifest creation so that installation of packages can run to completion should the package itself insert bogus files (e.g. a dangling symlink) into its install directory. Without this patch, if any package so misbehaves, the post_install() section fails like this (even if the package itself successfully builds!):

==> Error: FileNotFoundError: [Errno 2] No such file or directory: '/usr/projects/packages/user_contrib/spack/opt/spack/linux-centos7-sandybridge/gcc-9.2.0/trilinos-12.12.1-wi5tyjl6gogocxjy4nvbv6nme7drcpzs/lib/cmake/tribits/doc/developers_guide/TribitsBuildReference.html'

/usr/projects/packages/user_contrib/spack/lib/spack/spack/package.py:1718, in build_process:
       1715                    echo = logger.echo
       1716                    self.log()
       1717
  >>   1718                # Run post install hooks before build stage is removed.
       1719                spack.hooks.post_install(self.spec)
       1720
       1721            # Stop timer.

Fixes #13648
Fixes #13649

@adamjstewart
Copy link
Copy Markdown
Member

I just hit this same bug today when trying to install [email protected] on macOS.

@alalazo alalazo added the bugfix Something wasn't working, here's a fix label Nov 11, 2019
@becker33 becker33 merged commit 5a9389a into spack:develop Nov 11, 2019
@DarylGrunau DarylGrunau deleted the bugfix/verify-path-exists-exception branch November 18, 2019 19:05
tgamblin added a commit that referenced this pull request Dec 5, 2019
v0.13.2

This release contains major performance improvements for Spack environments, as well as some bugfixes and minor changes.

* allow missing modules if they are blacklisted (#13540)
* speed up environment activation (#13557)
* mirror path works for unknown versions (#13626)
* environments: don't try to modify run-env if a spec is not installed (#13589)
* use semicolons instead of newlines in module/python command (#13904)
* verify.py: os.path.exists exception handling (#13656)
* Document use of the maintainers field (#13479)
* bugfix with config caching (#13755)
* hwloc: added 'master' version pointing at the HEAD of the master branch (#13734)
* config option to allow gpg warning suppression (#13744)
* fix for relative symlinks when relocating binary packages (#13727)
* allow binary relocation of strings in relative binaries (#13724)
tgamblin added a commit that referenced this pull request Dec 5, 2019
v0.13.2

This release contains major performance improvements for Spack environments, as well as some bugfixes and minor changes.

* allow missing modules if they are blacklisted (#13540)
* speed up environment activation (#13557)
* mirror path works for unknown versions (#13626)
* environments: don't try to modify run-env if a spec is not installed (#13589)
* use semicolons instead of newlines in module/python command (#13904)
* verify.py: os.path.exists exception handling (#13656)
* Document use of the maintainers field (#13479)
* bugfix with config caching (#13755)
* hwloc: added 'master' version pointing at the HEAD of the master branch (#13734)
* config option to allow gpg warning suppression (#13744)
* fix for relative symlinks when relocating binary packages (#13727)
* allow binary relocation of strings in relative binaries (#13724)
samiilvonen pushed a commit to CSCfi/spack that referenced this pull request Jan 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Something wasn't working, here's a fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"spack install" aborts when installed software contains dangling symlink charmpp build failing in post_install

4 participants