diff options
-rw-r--r-- | lib/spack/spack/package.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index d1c36d0670..2e7d8a7709 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -888,6 +888,11 @@ class Package(object): # 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) |