summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/aspera-cli/package.py
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2019-10-15 05:35:14 +0200
committerTodd Gamblin <tgamblin@llnl.gov>2019-10-14 20:35:14 -0700
commit5cd28847e81b3a1bf659d184c990ba9144974624 (patch)
tree94d3f2fabd68edbb399128793a62734824d09e91 /var/spack/repos/builtin/packages/aspera-cli/package.py
parent3f46f03c837da9959b4257c710e521fc9bf777bb (diff)
downloadspack-5cd28847e81b3a1bf659d184c990ba9144974624.tar.gz
spack-5cd28847e81b3a1bf659d184c990ba9144974624.tar.bz2
spack-5cd28847e81b3a1bf659d184c990ba9144974624.tar.xz
spack-5cd28847e81b3a1bf659d184c990ba9144974624.zip
filter_file uses "surrogateescape" error handling (#12765)
From Python docs: -- 'surrogateescape' will represent any incorrect bytes as code points in the Unicode Private Use Area ranging from U+DC80 to U+DCFF. These private code points will then be turned back into the same bytes when the surrogateescape error handler is used when writing data. This is useful for processing files in an unknown encoding. -- This will allow us to process files with unknown encodings. To accommodate the case of self-extracting bash scripts, filter_file can now stop filtering text input if a certain marker is found. The marker must be passed at call time via the "stop_at" function argument. At that point the file will be reopened in binary mode and copied verbatim. * use "surrogateescape" error handling to ignore unknown chars * permit to stop filtering if a marker is found * add unit tests for non-ASCII and mixed text/binary files
Diffstat (limited to 'var/spack/repos/builtin/packages/aspera-cli/package.py')
-rw-r--r--var/spack/repos/builtin/packages/aspera-cli/package.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/aspera-cli/package.py b/var/spack/repos/builtin/packages/aspera-cli/package.py
index f0a2debfa6..00253a1973 100644
--- a/var/spack/repos/builtin/packages/aspera-cli/package.py
+++ b/var/spack/repos/builtin/packages/aspera-cli/package.py
@@ -26,7 +26,8 @@ class AsperaCli(Package):
filter_file('INSTALL_DIR=~/.aspera',
'INSTALL_DIR=%s' % prefix,
runfile,
- string=True)
+ string=True,
+ stop_at='__ARCHIVE_FOLLOWS__')
# Install
chmod = which('chmod')
chmod('+x', runfile)