spack: Cannot uninstall software

I have two versions of mvapich2 installed, 2.2b and 2.2. But I am unable to uninstall them:

$ spack uninstall mvapich2@2.2 %gcc@5
==> Error: mvapich2@2.2%gcc@5 matches multiple packages:

-- linux-centos6-x86_64 / gcc@5.3.0 -----------------------------
v6xdy4c mvapich2@2.2%gcc~debug~gforker+hydra~mrail~nemesis~nemesisib~nemesisibtcp+psm~remshell~slurm~sock

m6iglhi mvapich2@2.2b%gcc~debug~gforker+hydra~mrail~nemesis~nemesisib~nemesisibtcp+psm~remshell~slurm~sock


==> Error: You can either:
    a) Use a more specific spec, or
    b) use spack uninstall -a to uninstall ALL matching specs.

I’m also unable to install them by hash:

$ spack uninstall /v6xdy4ccf7drmudbjkxa2vu6ctovy2jj
==> Error: mvapich2@2.2%gcc@5.3.0~debug~gforker+hydra~mrail~nemesis~nemesisib~nemesisibtcp+psm~remshell~slurm~sock arch=linux-centos6-x86_64^bison@3.0.4%gcc@5.3.0 arch=linux-centos6-x86_64^libpciaccess@0.13.4%gcc@5.3.0 arch=linux-centos6-x86_64 matches multiple packages:

-- linux-centos6-x86_64 / gcc@5.3.0 -----------------------------
v6xdy4c mvapich2@2.2%gcc~debug~gforker+hydra~mrail~nemesis~nemesisib~nemesisibtcp+psm~remshell~slurm~sock

m6iglhi mvapich2@2.2b%gcc~debug~gforker+hydra~mrail~nemesis~nemesisib~nemesisibtcp+psm~remshell~slurm~sock


==> Error: You can either:
    a) Use a more specific spec, or
    b) use spack uninstall -a to uninstall ALL matching specs.

Uninstalling them by running rm on the directory followed by spack reindex corrupts my Spack database, and I can no longer install anything:

$ spack install mvapich2 %gcc@5
==> Installing mvapich2
==> libpciaccess is already installed in /blues/gpfs/home/software/spack-0.9.1/opt/spack/linux-centos6-x86_64/gcc-5.3.0/libpciaccess-0.13.4-tbllpvg3h4r2hgxkvzgtmgm645g777ub
Traceback (most recent call last):
  File "/soft/spack-0.9.1/bin/spack", line 203, in <module>
    main()
  File "/soft/spack-0.9.1/bin/spack", line 180, in main
    return_val = command(parser, args)
  File "/blues/gpfs/home/software/spack-0.9.1/lib/spack/spack/cmd/install.py", line 342, in install
    package.do_install(**kwargs)
  File "/blues/gpfs/home/software/spack-0.9.1/lib/spack/spack/package.py", line 1190, in do_install
    **kwargs
  File "/blues/gpfs/home/software/spack-0.9.1/lib/spack/spack/package.py", line 1162, in do_install
    rec = spack.store.db.get_record(self.spec)
  File "/blues/gpfs/home/software/spack-0.9.1/lib/spack/spack/database.py", line 80, in converter
    return function(self, spec_like, *args, **kwargs)
  File "/blues/gpfs/home/software/spack-0.9.1/lib/spack/spack/database.py", line 529, 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 521, 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 655, in query_one
    assert len(concrete_specs) <= 1
AssertionError

This was reported in #2123, and I have no idea what is causing it. Please help.

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 18 (18 by maintainers)

Most upvoted comments

Yes fixed

On Tue, Dec 3, 2019 at 06:03 Massimiliano Culpo notifications@github.com wrote:

I think this has been fixed in the meanwhile. Can you confirm @adamjstewart https://github.com/adamjstewart ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/spack/spack/issues/2199?email_source=notifications&email_token=AAOVY54KIBWV5QJQNJOQYFLQWY4I3A5CNFSM4CUZTCP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFY7XZQ#issuecomment-561118182, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOVY5YEKX4EZWHFNPHF4SLQWY4I3ANCNFSM4CUZTCPQ .

you are right, i actually did not notice that I specified package to be uninstalled twice: with the name cairo and with the hash 722bfct. Probably that was the reason. Just confused myself 😄

I have a large PR that adds support for exact versions coming – still debugging today. The issue with versions is that Spack’s current notion of “concrete” is “has only a single version”, but that’s wrong, as versions are really sets. It will be possible to have either an exact or inexact version, and the concretizer will only mark something concrete if the version is exact.

Isn’t that how the regex works? It matches groups of alpha characters OR numeric characters and adds each group to a tuple.