handle explicit when requesting to install already installed packages

This commit is contained in:
Tom Scogland 2016-05-16 07:58:34 -07:00
parent 4acdfeae61
commit 8859a09cd2

View file

@ -888,6 +888,11 @@ def do_install(self,
# Ensure package is not already installed
if spack.install_layout.check_installed(self.spec):
tty.msg("%s is already installed in %s" % (self.name, self.prefix))
rec = spack.installed_db.get_record(self.spec)
if (not rec.explicit) and explicit:
with spack.installed_db.write_transaction():
rec = spack.installed_db.get_record(self.spec)
rec.explicit = True
return
tty.msg("Installing %s" % self.name)