-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Installing packages using the -f option does not seem to work #10141
Description
Using the develop branch from today, I attempted to install a package from a .yaml file on disk, using the -f <yaml_file> option to spack install. Instead of installing the package, spack did not install anything or give any error information.
I did a little debugging, and inside lib/spack/spack/cmd/install.py, at the very bottom, the variable abstract_specs is an empty list, while specs is a list populated with a single item from the yaml file. Since those are zipped together before iterating to install, the zipped result is empty, and thus there is nothing to install.
Steps to reproduce the issue
- Save a yaml file for a concrete spec:
from spack.spec import Spec
s = Spec('zlib`)
s.concretize()
with open('/tmp/zlib.yaml`, 'w') as fd:
fd.write(s.to_yaml(all_deps=True)In my case, that generated the following file (/tmp/zlib.yaml):
spec:
- zlib:
version: 1.2.11
arch:
platform: linux
platform_os: ubuntu16.04
target: x86_64
compiler:
name: gcc
version: 5.5.0
namespace: builtin
parameters:
optimize: true
pic: true
shared: true
cflags: []
cppflags: []
cxxflags: []
fflags: []
ldflags: []
ldlibs: []
hash: omy635k24jq6hpqhkfvnqykyee6qami2Now attempting to install that version of zlib from the file:
spack -d -v install -f /tmp/zlib.yaml
==> Reading config file /data/scott/projects/spack/etc/spack/defaults/modules.yaml
==> Reading config file /data/scott/projects/spack/etc/spack/defaults/linux/modules.yaml
==> Reading config file /data/scott/projects/spack/etc/spack/defaults/config.yaml
==> Reading config file /home/scott/.spack/config.yamlNow check if it got installed:
spack find
==> 0 installed packagesInformation on your system
In case it's not clear from the zlib.yaml contents above, this happened on Ubuntu 16.04 w/ architecture x86_64.