summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin.mock/packages/url-only-override-with-gaps
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2018-07-18 20:10:46 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2018-07-25 23:10:10 -0700
commit498d8cf04b6c932d8c224c7b3b9f696fd7dd3e27 (patch)
tree7efbdb612705017cf323651bad48fe534da6bec4 /var/spack/repos/builtin.mock/packages/url-only-override-with-gaps
parent5792a805fc0a3867df30f14234e62a983cb0d395 (diff)
downloadspack-498d8cf04b6c932d8c224c7b3b9f696fd7dd3e27.tar.gz
spack-498d8cf04b6c932d8c224c7b3b9f696fd7dd3e27.tar.bz2
spack-498d8cf04b6c932d8c224c7b3b9f696fd7dd3e27.tar.xz
spack-498d8cf04b6c932d8c224c7b3b9f696fd7dd3e27.zip
core: fixes and tests for handling of fetcher attributes in packages
- Packages can remove the top-level `url` attribute and still work - These are now legal: - Packages with *only* version-specific URLs (even with gaps) - Packages with a top-level git/hg/svn attribute and `version` directives for that. - If a package has both a top-level hg/git/svn attribute AND a top-level url attribute, the url attribute takes precedence.
Diffstat (limited to 'var/spack/repos/builtin.mock/packages/url-only-override-with-gaps')
-rw-r--r--var/spack/repos/builtin.mock/packages/url-only-override-with-gaps/package.py37
1 files changed, 37 insertions, 0 deletions
diff --git a/var/spack/repos/builtin.mock/packages/url-only-override-with-gaps/package.py b/var/spack/repos/builtin.mock/packages/url-only-override-with-gaps/package.py
new file mode 100644
index 0000000000..8bcbb386bd
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/url-only-override-with-gaps/package.py
@@ -0,0 +1,37 @@
+##############################################################################
+# Copyright (c) 2013-2018, 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/spack/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 UrlOnlyOverrideWithGaps(Package):
+ homepage = 'http://www.example.com'
+
+ version('1.0.5', 'abcdef0')
+ version('1.0.0', 'bcdef0a', url='http://a.example.com/url_override-1.0.0.tar.gz')
+ version('0.9.5', 'cdef0ab')
+ version('0.9.0', 'def0abc', url='http://b.example.com/url_override-0.9.0.tar.gz')
+ version('0.8.5', 'ef0abcd')
+ version('0.8.1', 'f0abcde', url='http://c.example.com/url_override-0.8.1.tar.gz')
+ version('0.7.0', '0abcdef')