summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Scogland <scogland1@llnl.gov>2016-05-16 07:58:34 -0700
committerTom Scogland <scogland1@llnl.gov>2016-05-16 08:08:40 -0700
commit8859a09cd267f626dfe79da01ac88c245261ccbb (patch)
treee21d22e9369240ebd209acc9aeba3ff307415b30
parent4acdfeae61d278ecf682adee1b9842d58ce3035a (diff)
downloadspack-8859a09cd267f626dfe79da01ac88c245261ccbb.tar.gz
spack-8859a09cd267f626dfe79da01ac88c245261ccbb.tar.bz2
spack-8859a09cd267f626dfe79da01ac88c245261ccbb.tar.xz
spack-8859a09cd267f626dfe79da01ac88c245261ccbb.zip
handle explicit when requesting to install already installed packages
-rw-r--r--lib/spack/spack/package.py5
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)