diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/cmd/buildcache.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/spack/spack/cmd/buildcache.py b/lib/spack/spack/cmd/buildcache.py index 392984f852..1d105a0c0d 100644 --- a/lib/spack/spack/cmd/buildcache.py +++ b/lib/spack/spack/cmd/buildcache.py @@ -76,6 +76,10 @@ def setup_parser(subparser): install.add_argument('-u', '--unsigned', action='store_true', help="install unsigned buildcache" + " tarballs for testing") + install.add_argument('-o', '--otherarch', action='store_true', + help="install specs from other architectures" + + " instead of default platform and OS") + arguments.add_common_arguments(install, ['specs']) install.set_defaults(func=installtarball) @@ -252,7 +256,8 @@ def find_matching_specs(pkgs, allow_multiple_matches=False, env=None): return specs_from_cli -def match_downloaded_specs(pkgs, allow_multiple_matches=False, force=False): +def match_downloaded_specs(pkgs, allow_multiple_matches=False, force=False, + other_arch=False): """Returns a list of specs matching the not necessarily concretized specs given from cli @@ -266,7 +271,7 @@ def match_downloaded_specs(pkgs, allow_multiple_matches=False, force=False): # List of specs that match expressions given via command line specs_from_cli = [] has_errors = False - allarch = False + allarch = other_arch specs = bindist.get_specs(force, allarch) for pkg in pkgs: matches = [] @@ -387,7 +392,8 @@ def installtarball(args): tty.die("build cache file installation requires" + " at least one package spec argument") pkgs = set(args.specs) - matches = match_downloaded_specs(pkgs, args.multiple, args.force) + matches = match_downloaded_specs(pkgs, args.multiple, args.force, + args.otherarch) for match in matches: install_tarball(match, args) |