Skip to content

External packages modules are cached in opt/spack/.spack-db without being updated on configuration changes #40843

@albestro

Description

@albestro

Steps to reproduce

Let's say you have an external package provided via modules like this

packages:
  cray-mpich:
    externals:
    - spec: [email protected]
      modules:
      - cray/22.11
      - cray-mpich/8.1.21

and you install it in your spack instance.

Later, you want to update the config because this package now requires an additional module (e.g. libfabric)

packages:
  cray-mpich:
    externals:
    - spec: [email protected]
      modules:
      - cray/22.11
      - cray-mpich/8.1.21
      - libfabric

Error message

Unfortunately, the change in the config is not going to be reflected in the behaviour, because the configuration used will always be the one that existed at the time the package was installed the first time.

Indeed, the configuration is stored in the spack db, i.e. $SPACK_ROOT/opt/spack/.spack-db/index.json and does not get "updated".

The only way to reflect the change was to uninstall the package for which I made the configuration change (together with all the dependents), and re-install it so that it's the "first" installation and it gather the new information from the configuration file.

Information on your system

  • Spack: 0.21.0.dev0 (33cb8c9)
  • Python: 3.6.15
  • Platform: linux-sles15-zen2
  • Concretizer: clingo

General 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

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions