@alalazo I know you were thinking about how to handle things like spack module refresh
for packages that were installed on a branch but haven't yet made it into develop. Here is another case that should be solved.
I added a package for py-abipy
and installed it. Then I switched back to develop, where this package does not exist. When I run spack uninstall abipy
, this is what I get:
$ spack uninstall py-abipy
==> The following packages will be uninstalled:
-- darwin-sierra-x86_64 / [email protected] ---------------------
xkka3du py-abipy@master%clang~gui~ipython
==> Do you want to proceed? [y/N] y
Traceback (most recent call last):
File "/Users/Adam/spack/bin/spack", line 211, in <module>
main(sys.argv)
File "/Users/Adam/spack/bin/spack", line 207, in main
_main(args, unknown)
File "/Users/Adam/spack/bin/spack", line 174, in _main
return_val = command(parser, args)
File "/Users/Adam/spack/lib/spack/spack/cmd/uninstall.py", line 218, in uninstall
do_uninstall(uninstall_list, args.force)
File "/Users/Adam/spack/lib/spack/spack/cmd/uninstall.py", line 153, in do_uninstall
spack.Package(item).do_uninstall(force=True)
File "/Users/Adam/spack/lib/spack/spack/package.py", line 534, in __init__
for v in self.versions:
AttributeError: 'Package' object has no attribute 'versions'
I think this would likely have the same fix: to use the package.py
in the installation directory.
I think this would likely have the same fix: to use the package.py in the installation directory.
@adamjstewart Yes. The root problem is the incoherent construction of a repository for the specs in the DB: the bugs in spack module refresh
and spack uninstall
are just the symptoms.
This behaviour also occurs when a package from a private repo is promoted to the upstream and then the package is removed from the private repo.
@jcftang Repositories act as namespaces, so I think that from Spack perspective removing myrepo.mypackage
will not be influenced in any way by the fact that you added builtin.mypackage
(at least when you deal with installed packages).
Most helpful comment
@adamjstewart Yes. The root problem is the incoherent construction of a repository for the specs in the DB: the bugs in
spack module refresh
andspack uninstall
are just the symptoms.