Skip to content

Fix satisfaction rules for concrete specs #1992

@tgamblin

Description

@tgamblin

From @adamjstewart:

I'm still seeing a problem on our CentOS 6 cluster. Here is the output:

$ spack install gmp %pgi
==> Installing gmp
==> Installing m4
==> libsigsegv is already installed in /blues/gpfs/home/software/spack-0.9.1/opt/spack/linux-centos6-x86_64/pgi-16.5-0/libsigsegv-2.10-3zrk2bhqrgknreumylyvff2tzpqlrt2d
Traceback (most recent call last):
  File "/soft/spack-0.9.1/bin/spack", line 192, in <module>
    main()
  File "/soft/spack-0.9.1/bin/spack", line 169, in main
    return_val = command(parser, args)
  File "/blues/gpfs/home/software/spack-0.9.1/lib/spack/spack/cmd/install.py", line 97, in install
    explicit=True)
  File "/blues/gpfs/home/software/spack-0.9.1/lib/spack/spack/package.py", line 1007, in do_install
    dirty=dirty)
  File "/blues/gpfs/home/software/spack-0.9.1/lib/spack/spack/package.py", line 1007, in do_install
    dirty=dirty)
  File "/blues/gpfs/home/software/spack-0.9.1/lib/spack/spack/package.py", line 985, in do_install
    rec = spack.installed_db.get_record(self.spec)
  File "/blues/gpfs/home/software/spack-0.9.1/lib/spack/spack/database.py", line 79, in converter
    return function(self, spec_like, *args, **kwargs)
  File "/blues/gpfs/home/software/spack-0.9.1/lib/spack/spack/database.py", line 527, in get_record
    key = self._get_matching_spec_key(spec, **kwargs)
  File "/blues/gpfs/home/software/spack-0.9.1/lib/spack/spack/database.py", line 519, in _get_matching_spec_key
    match = self.query_one(spec, **kwargs)
  File "/blues/gpfs/home/software/spack-0.9.1/lib/spack/spack/database.py", line 653, in query_one
    assert len(concrete_specs) <= 1
AssertionError

Two things are going on here:

  1. OS descriptors are read incorrectly and get assigned None if Spack doesn't know about the particular OS, which is wrong.
  2. Concrete specs that have hashes should compare by hash for satisfies(). This is faster, cheaper, and it avoids cases where a concrete spec might match several non-concrete ones that have supersets of its attributes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions