Skip to content

Clingo concretizer does not respect hashes in spec #22613

@adamjstewart

Description

@adamjstewart

The new concretizer does not respect hashes of installed packages in the spec. With the old concretizer, it was possible to reuse previously-installed packages by explicitly specifying the hash of the package. This is no longer possible with the new concretizer.

Steps to reproduce the issue

  1. spack install B, keep track of the hash of this installation
  2. Add a new variant to package B
  3. spack install A ^B/hash for a package A that depends on B

Error Message

Here is an example with Python. Note that since the time Python was installed, the openssl dependency added a new ~docs variant:

$ spack find -lvd /3auqbnq
==> 1 installed package
-- darwin-catalina-x86_64 / [email protected] ------------------
3auqbnq [email protected]+bz2+ctypes+dbm~debug+libxml2+lzma~nis~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tix~tkinter~ucs4+uuid+zlib patches=0d98e93189bc278fbc37a50ed7f183bd8aaf249a8e1670a465f0db6bb4f8cf87
bdm4oka     [email protected]
6ntaixw     [email protected]+shared
s5jmr4n     [email protected]~libbsd
df3hxmr     [email protected]
4d3hjqd         [email protected]
eli4aax             [email protected]~symlinks+termlib
dti2z6r     [email protected]+bzip2+curses+git~libunistring+libxml2+tar+xz
xrjlxcv         [email protected]
dqzlvh6         [email protected]~python
gfa5h76             [email protected]~pic
x2anksg             [email protected]+optimize+pic+shared
dc675hk         [email protected]
5ye4c7r     [email protected] patches=26f26c6f29a7ce9bf370ad3ab2610f99365b4bdd7b82e7c31df41a3370d685c0
2qhvtbw     [email protected]+systemcerts
u72xuye     [email protected]+column_metadata+fts~functions~rtree
$ spack spec -lI py-setuptools ^/3auqbnq
Input spec
--------------------------------
 -   py-setuptools
[+]      ^[email protected]%[email protected]+bz2+ctypes+dbm~debug+libxml2+lzma~nis~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tix~tkinter~ucs4+uuid+zlib patches=0d98e93189bc278fbc37a50ed7f183bd8aaf249a8e1670a465f0db6bb4f8cf87 arch=darwin-catalina-x86_64
[+]          ^[email protected]%[email protected] arch=darwin-catalina-x86_64
[+]          ^[email protected]%[email protected]+shared arch=darwin-catalina-x86_64
[+]          ^[email protected]%[email protected]~libbsd arch=darwin-catalina-x86_64
[+]          ^[email protected]%[email protected] arch=darwin-catalina-x86_64
[+]              ^[email protected]%[email protected] arch=darwin-catalina-x86_64
[+]                  ^[email protected]%[email protected]~symlinks+termlib arch=darwin-catalina-x86_64
[+]          ^[email protected]%[email protected]+bzip2+curses+git~libunistring+libxml2+tar+xz arch=darwin-catalina-x86_64
[+]              ^[email protected]%[email protected] arch=darwin-catalina-x86_64
[+]              ^[email protected]%[email protected]~python arch=darwin-catalina-x86_64
[+]                  ^[email protected]%[email protected]~pic arch=darwin-catalina-x86_64
[+]                  ^[email protected]%[email protected]+optimize+pic+shared arch=darwin-catalina-x86_64
[+]              ^[email protected]%[email protected] arch=darwin-catalina-x86_64
[+]          ^[email protected]%[email protected] patches=26f26c6f29a7ce9bf370ad3ab2610f99365b4bdd7b82e7c31df41a3370d685c0 arch=darwin-catalina-x86_64
[+]          ^[email protected]%[email protected]+systemcerts arch=darwin-catalina-x86_64
[+]          ^[email protected]%[email protected]+column_metadata+fts~functions~rtree arch=darwin-catalina-x86_64

Concretized
--------------------------------
 -   ghaihoj  [email protected]%[email protected] arch=darwin-catalina-x86_64
 -   hw2eka5      ^[email protected]%[email protected]+bz2+ctypes+dbm~debug+libxml2+lzma~nis~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tix~tkinter~ucs4+uuid+zlib patches=0d98e93189bc278fbc37a50ed7f183bd8aaf249a8e1670a465f0db6bb4f8cf87 arch=darwin-catalina-x86_64
[+]  bdm4oka          ^[email protected]%[email protected] arch=darwin-catalina-x86_64
[+]  6ntaixw          ^[email protected]%[email protected]+shared arch=darwin-catalina-x86_64
[+]  6xq3pjn              ^[email protected]%[email protected] arch=darwin-catalina-x86_64
[+]  xrjlxcv                  ^[email protected]%[email protected] arch=darwin-catalina-x86_64
[+]  s5jmr4n          ^[email protected]%[email protected]~libbsd arch=darwin-catalina-x86_64
[+]  df3hxmr          ^[email protected]%[email protected] arch=darwin-catalina-x86_64
[+]  4d3hjqd              ^[email protected]%[email protected] arch=darwin-catalina-x86_64
[+]  eli4aax                  ^[email protected]%[email protected]~symlinks+termlib arch=darwin-catalina-x86_64
[+]  zhcbxzn                      ^[email protected]%[email protected] arch=darwin-catalina-x86_64
[+]  dti2z6r          ^[email protected]%[email protected]+bzip2+curses+git~libunistring+libxml2+tar+xz arch=darwin-catalina-x86_64
[+]  dqzlvh6              ^[email protected]%[email protected]~python arch=darwin-catalina-x86_64
[+]  gfa5h76                  ^[email protected]%[email protected]~pic arch=darwin-catalina-x86_64
[+]  x2anksg                  ^[email protected]%[email protected]+optimize+pic+shared arch=darwin-catalina-x86_64
[+]  dc675hk              ^[email protected]%[email protected] arch=darwin-catalina-x86_64
[+]  5ye4c7r          ^[email protected]%[email protected] patches=26f26c6f29a7ce9bf370ad3ab2610f99365b4bdd7b82e7c31df41a3370d685c0 arch=darwin-catalina-x86_64
[+]  6p633mh          ^[email protected]%[email protected]~docs+systemcerts arch=darwin-catalina-x86_64
[+]  b7bd5lo              ^[email protected]%[email protected]+cpanm+shared+threads arch=darwin-catalina-x86_64
[+]  shevodc                  ^[email protected]%[email protected]~docs patches=b231fcc4d5cff05e5c3a4814f6a5af0e9a966428dc2176540d2c05aff41de522 arch=darwin-catalina-x86_64
[+]  u72xuye          ^[email protected]%[email protected]+column_metadata+fts~functions~rtree arch=darwin-catalina-x86_64

Information on your system

  • Spack: 0.16.1-1942-f9cc073be0
  • Python: 3.8.7
  • Platform: darwin-catalina-ivybridge
  • Concretizer: clingo

Additional information

  • I have run spack debug report and reported the version of Spack/Python/Platform
  • I have searched the issues of this repo and believe this is not a duplicate
  • I have run the failing commands in debug mode and reported the output

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingconcretizationspecstriageThe issue needs to be prioritized

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions