Merge tag 'v0.15.1' into features/shared
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
|
||||
#: major, minor, patch version for Spack, in a tuple
|
||||
spack_version_info = (0, 15, 0)
|
||||
spack_version_info = (0, 15, 1)
|
||||
|
||||
#: String containing Spack version joined with .'s
|
||||
spack_version = '.'.join(str(v) for v in spack_version_info)
|
||||
|
||||
@@ -118,15 +118,13 @@ def _do_patch_config_files(self):
|
||||
config_file = 'config.{0}'.format(config_name)
|
||||
if os.path.exists(config_file):
|
||||
# First search the top-level source directory
|
||||
my_config_files[config_name] = os.path.join(
|
||||
self.configure_directory, config_file)
|
||||
my_config_files[config_name] = os.path.abspath(config_file)
|
||||
else:
|
||||
# Then search in all sub directories recursively.
|
||||
# We would like to use AC_CONFIG_AUX_DIR, but not all packages
|
||||
# ship with their configure.in or configure.ac.
|
||||
config_path = next((os.path.join(r, f)
|
||||
for r, ds, fs in os.walk(
|
||||
self.configure_directory) for f in fs
|
||||
config_path = next((os.path.abspath(os.path.join(r, f))
|
||||
for r, ds, fs in os.walk('.') for f in fs
|
||||
if f == config_file), None)
|
||||
my_config_files[config_name] = config_path
|
||||
|
||||
|
||||
@@ -310,7 +310,7 @@ def install(parser, args, **kwargs):
|
||||
return
|
||||
|
||||
if not args.spec and not args.specfiles:
|
||||
# if there are no args but an active environment or spack.yaml file
|
||||
# if there are no args but an active environment
|
||||
# then install the packages from it.
|
||||
env = ev.get_env(args, 'install')
|
||||
if env:
|
||||
@@ -331,7 +331,18 @@ def install(parser, args, **kwargs):
|
||||
env.regenerate_views()
|
||||
return
|
||||
else:
|
||||
tty.die("install requires a package argument or a spack.yaml file")
|
||||
msg = "install requires a package argument or active environment"
|
||||
if 'spack.yaml' in os.listdir(os.getcwd()):
|
||||
# There's a spack.yaml file in the working dir, the user may
|
||||
# have intended to use that
|
||||
msg += "\n\n"
|
||||
msg += "Did you mean to install using the `spack.yaml`"
|
||||
msg += " in this directory? Try: \n"
|
||||
msg += " spack env activate .\n"
|
||||
msg += " spack install\n"
|
||||
msg += " OR\n"
|
||||
msg += " spack --env . install"
|
||||
tty.die(msg)
|
||||
|
||||
if args.no_checksum:
|
||||
spack.config.set('config:checksum', False, scope='command_line')
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
"0.14.1": "0.14.1",
|
||||
"0.14.2": "0.14.2",
|
||||
"0.15": "0.15",
|
||||
"0.15.0": "0.15.0"
|
||||
"0.15.0": "0.15.0",
|
||||
"0.15.1": "0.15.1"
|
||||
}
|
||||
},
|
||||
"ubuntu:16.04": {
|
||||
@@ -28,7 +29,8 @@
|
||||
"0.14.1": "0.14.1",
|
||||
"0.14.2": "0.14.2",
|
||||
"0.15": "0.15",
|
||||
"0.15.0": "0.15.0"
|
||||
"0.15.0": "0.15.0",
|
||||
"0.15.1": "0.15.1"
|
||||
}
|
||||
},
|
||||
"centos:7": {
|
||||
@@ -44,7 +46,8 @@
|
||||
"0.14.1": "0.14.1",
|
||||
"0.14.2": "0.14.2",
|
||||
"0.15": "0.15",
|
||||
"0.15.0": "0.15.0"
|
||||
"0.15.0": "0.15.0",
|
||||
"0.15.1": "0.15.1"
|
||||
}
|
||||
},
|
||||
"centos:6": {
|
||||
@@ -60,7 +63,8 @@
|
||||
"0.14.1": "0.14.1",
|
||||
"0.14.2": "0.14.2",
|
||||
"0.15": "0.15",
|
||||
"0.15.0": "0.15.0"
|
||||
"0.15.0": "0.15.0",
|
||||
"0.15.1": "0.15.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -405,9 +405,14 @@ def dump_packages(spec, path):
|
||||
source = spack.store.layout.build_packages_path(node)
|
||||
source_repo_root = os.path.join(source, node.namespace)
|
||||
|
||||
# There's no provenance installed for the source package. Skip it.
|
||||
# User can always get something current from the builtin repo.
|
||||
if not os.path.isdir(source_repo_root):
|
||||
# If there's no provenance installed for the package, skip it.
|
||||
# If it's external, skip it because it either:
|
||||
# 1) it wasn't built with Spack, so it has no Spack metadata
|
||||
# 2) it was built by another Spack instance, and we do not
|
||||
# (currently) use Spack metadata to associate repos with externals
|
||||
# built by other Spack instances.
|
||||
# Spack can always get something current from the builtin repo.
|
||||
if node.external or not os.path.isdir(source_repo_root):
|
||||
continue
|
||||
|
||||
# Create a source repo and get the pkg directory out of it.
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
'enum': [
|
||||
'develop',
|
||||
'0.14', '0.14.0', '0.14.1', '0.14.2',
|
||||
'0.15', '0.15.0',
|
||||
'0.15', '0.15.0', '0.15.1',
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
@@ -786,3 +786,27 @@ def test_compiler_bootstrap_already_installed(
|
||||
# Test succeeds if it does not raise an error
|
||||
install('gcc@2.0')
|
||||
install('a%gcc@2.0')
|
||||
|
||||
|
||||
def test_install_fails_no_args(tmpdir):
|
||||
# ensure no spack.yaml in directory
|
||||
with tmpdir.as_cwd():
|
||||
output = install(fail_on_error=False)
|
||||
|
||||
# check we got the short version of the error message with no spack.yaml
|
||||
assert 'requires a package argument or active environment' in output
|
||||
assert 'spack env activate .' not in output
|
||||
assert 'using the `spack.yaml` in this directory' not in output
|
||||
|
||||
|
||||
def test_install_fails_no_args_suggests_env_activation(tmpdir):
|
||||
# ensure spack.yaml in directory
|
||||
tmpdir.ensure('spack.yaml')
|
||||
|
||||
with tmpdir.as_cwd():
|
||||
output = install(fail_on_error=False)
|
||||
|
||||
# check we got the long version of the error message with spack.yaml
|
||||
assert 'requires a package argument or active environment' in output
|
||||
assert 'spack env activate .' in output
|
||||
assert 'using the `spack.yaml` in this directory' in output
|
||||
|
||||
Reference in New Issue
Block a user