diff options
author | scheibelp <scheibel1@llnl.gov> | 2017-10-05 10:33:04 -0700 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2017-10-05 10:33:04 -0700 |
commit | 6243a28da17079571117d480572f4962ec70c441 (patch) | |
tree | c941e5c81476544d5ff6dc83fad2584f924ccea2 /var | |
parent | 747b584e2ef3c9713dcf3fdd9471fc122e018a3b (diff) | |
download | spack-6243a28da17079571117d480572f4962ec70c441.tar.gz spack-6243a28da17079571117d480572f4962ec70c441.tar.bz2 spack-6243a28da17079571117d480572f4962ec70c441.tar.xz spack-6243a28da17079571117d480572f4962ec70c441.zip |
Don't change properties on already-installed packages (#5580)
* edits to address issues where spack concretization attempts to set properties on already-installed specs
* most added checks only need to check if the spec is concrete; they dont also need to check if the package is installed
* add test to ensure that patches are not applied to an installed spec
* add test to ensure that an error is detected when a dependent requests a dependency constraint which conflicts with a requested installed dependency
Diffstat (limited to 'var')
3 files changed, 118 insertions, 0 deletions
diff --git a/var/spack/repos/builtin.mock/packages/conflicting-dependent/package.py b/var/spack/repos/builtin.mock/packages/conflicting-dependent/package.py new file mode 100644 index 0000000000..255ad1fc1c --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/conflicting-dependent/package.py @@ -0,0 +1,41 @@ +############################################################################## +# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the NOTICE and LICENSE files for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class ConflictingDependent(Package): + """By itself this package does not have conflicts, but it is used to + ensure that if a user tries to build with an installed instance + of dependency-install@2 that there is a failure.""" + + homepage = "http://www.example.com" + url = "http://www.example.com/a-1.0.tar.gz" + + version('1.0', '0123456789abcdef0123456789abcdef') + + depends_on('dependency-install@:1.0') + + def install(self, spec, prefix): + pass diff --git a/var/spack/repos/builtin.mock/packages/dependency-install/package.py b/var/spack/repos/builtin.mock/packages/dependency-install/package.py new file mode 100644 index 0000000000..72e2ce18af --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/dependency-install/package.py @@ -0,0 +1,38 @@ +############################################################################## +# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the NOTICE and LICENSE files for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class DependencyInstall(Package): + """Dependency which has a working install method""" + + homepage = "http://www.example.com" + url = "http://www.example.com/a-1.0.tar.gz" + + version('1.0', 'hash1.0') + version('2.0', 'hash2.0') + + def install(self, spec, prefix): + touch(join_path(prefix, 'an_installation_file')) diff --git a/var/spack/repos/builtin.mock/packages/dependent-install/package.py b/var/spack/repos/builtin.mock/packages/dependent-install/package.py new file mode 100644 index 0000000000..450bdacbf5 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/dependent-install/package.py @@ -0,0 +1,39 @@ +############################################################################## +# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/llnl/spack +# Please also see the NOTICE and LICENSE files for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class DependentInstall(Package): + """Dependent which has a working install method""" + + homepage = "http://www.example.com" + url = "http://www.example.com/a-1.0.tar.gz" + + version('1.0', '0123456789abcdef0123456789abcdef') + + depends_on('dependency-install') + + def install(self, spec, prefix): + touch(join_path(prefix, 'an_installation_file')) |