Added a sub-command to show if packages are relocatable (#9199)

* Added the `spack buildcache preview` sub-command

This is similar to `spack spec -I` but highlights which nodes in a DAG
are relocatable and which are not.

spec.tree has been generalized a little to accept a status function,
instead of always showing the install status

The current implementation works only for ELF, and needs to be
generalized to other platforms.

* Added a test to check if an executable is relocatable or not

This test requires a few commands to be present in the environment.
Currently it will run only under python 3.7 (which uses Xenial instead
of Trusty).

* Added tests for the 'buildcache preview' command.

* Fixed codebase after rebase

* Fixed the list of apt addons for Python 3.7 in travis.yaml

* Only check ELF executables and shared libraries. Skip checking virtual or external packages. (#229)

* Fixed flake8 issues

* Add handling for macOS mach binaries (#231)
This commit is contained in:
Massimiliano Culpo
2019-02-28 22:36:47 +01:00
committed by Patrick Gartung
parent 6d20e938da
commit e3af8ed454
11 changed files with 327 additions and 25 deletions

View File

@@ -324,7 +324,7 @@ def foo(self, **kwargs):
if kwargs:
raise TypeError(
"'%s' is an invalid keyword argument for function %s()."
% (next(kwargs.iterkeys()), fun.__name__))
% (next(iter(kwargs)), fun.__name__))
def match_predicate(*args):