summaryrefslogtreecommitdiff
path: root/.flake8
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2020-10-30 17:06:05 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2020-11-01 16:23:48 -0800
commita80d221bfa1c9be4b2b9eff9f057edf62c34e50b (patch)
treef37f8844e8b2c9176ba6d41cdd29d107dadd64fe /.flake8
parenta4dd8d5582d3d4bae74c4a8d500a950f2237500a (diff)
downloadspack-a80d221bfa1c9be4b2b9eff9f057edf62c34e50b.tar.gz
spack-a80d221bfa1c9be4b2b9eff9f057edf62c34e50b.tar.bz2
spack-a80d221bfa1c9be4b2b9eff9f057edf62c34e50b.tar.xz
spack-a80d221bfa1c9be4b2b9eff9f057edf62c34e50b.zip
sbang: fixes for sbang relocation
This fixes sbang relocation when using old binary packages, and updates code in `relocate.py`. There are really two places where we would want to handle an `sbang` relocation: 1. Installing an old package that uses `sbang` with shebang lines like `#!/bin/bash $spack_prefix/sbang` 2. Installing a *new* package that uses `sbang` with shebang lines like `#!/bin/sh $install_tree/sbang` The second case is actually handled automatically by our text relocation; we don't need any special relocation logic for new shebangs, as our relocation logic already changes references to the build-time `install_tree` to point to the `install_tree` at intall-time. Case 1 was not properly handled -- we would not take an old binary package and point its shebangs at the new `sbang` location. This PR fixes that and updates the code in `relocation.py` with some notes. There is one more case we don't currently handle: if a binary package is created from an installation in a short prefix that does *not* need `sbang` and is installed to a long prefix that *does* need `sbang`, we won't do anything. We should just patch the file as we would for a normal install. In some upcoming PR we should probably change *all* `sbang` relocation logic to be idempotent and to apply to any sort of shebang'd file. Then we'd only have to worry about which files to `sbang`-ify at install time and wouldn't need to care about these special cases.
Diffstat (limited to '.flake8')
0 files changed, 0 insertions, 0 deletions