This attempts to address one of the complaints at #5996 (comment):
> Repo currently caches package instances by Spec, and those Package instances have a Spec.
> This is unnecessary and causes confusion. I think I thought that we'd need to cache instances
> after loading package classes, but really just caching the classes is fine.
With this update, Repo's package cache is removed and Specs cache the package reference themselves. One consequence is that Specs which compare as equal will store separate instances of a Package class (not doing this creates issues for #4595 (comment)).
There were several references to Spec.package that could be replaced with Spec.package_class without any additional modifications. There are still a couple remaining references to Spec.package in Spec that would require adding functionality before replacing (e.g. calling Package.provides and Package.installed).
Note this makes it difficult to mock fetchers for tests which invokes code that reconstructs specs. test_packaging was one example of this where the updates caused a failure (in that case the error was avoided by not making an unnecessary call).
Details:
* Replace instances of spec.package with spec.package_class where a class method is being called
* Remove instances of Repo.get where Spec.package_class can be used in its place
* remove Repo.get caching instances of Package class for specs
* remove redundant check (which is also incorrect now that each spec stores its own copy of its package)
* avoid creating mirror with specs because it copies specs and those copies dont refer to the mocked fetcher (and it is also not required for the test)
* remove checks that are no longer necessary since repo doesn't cache specs
* Cleaned up JUnit report generation on install
The generation of a JUnit report was previously part of the install
command. This commit factors the logic into its own module, and uses
a template for the generation of the report.
It also improves report generation, that now can deal with multiple
specs installed at once. Finally, extending the list of supported
formats is much easier than before, as it entails just writing a
new template.
* Polished report generation + added tests for failures and errors
The generation of a JUnit report has been polished, so that the
stacktrace is correctly displayed with Jenkins JUnit plugin. Standard
error is still not used.
Added unit tests to cover for installation failures and installation
errors.
* libtool: fix linking of libtool on darwin
* binutils, libtool: fix conflicts w/ BSD tools, v2
Fix namespace conflicts with BSD tools in a more elegant fashion,
using a program prefix, similar to Homebrew.
* Tell R's configure about tcltk config
Add configure arguments that specify the location of
the tcl and tk config scripts.
Fixes#7072
* Flake8 cleanup
Looking at build logs, it seems that prior to this commit bzip2 was
using 'cc', and relying on the PATH to be set correctly to find Spack
wrappers. This commit improves the robustness of the recipe, by using
the absolute path of the wrapper.
Avoid adding an "outside" (local home's) python user site directory
during python package installs.
Implements #6611
Fixes packages with auto-find side effects such as `py-setuptools`
that cause `py-matplotlib` to fail to build #6558
On Darwin and other BSD systems, the system 'libtool' and 'libtoolize'
are BSD libtool and libtoolize, respectively. Some build systems
require the GNU versions of these commands, so BSD package systems
tend to name the GNU versions 'glibtool' and 'glibtoolize',
respectively, to avoid namespace collisions.
A problem with the current libtool package is that it installs the GNU
libtool commands as 'libtool' and 'libtoolize', respectively, but
build systems on BSD platforms will attempt to run 'glibtool' and
'glibtoolize'. The expedient solution to this problem is to symlink
'libtool' to 'glibtool' and 'libtoolize' to 'glibtoolize', because
attempting to patch the detection logic one build system at a time
seems impractical.
* Added new link line flag
* Refactored some of the common components out of the different
version's build commands. Also corrected the when commands to
properly capture non-numeric names such as local.
* Added support to the Elemental package for the Hydrogen branch.
* Turning off default Qt support. Restricting Qt version to <= 4.9 else geant4 won't build
* Making vecgeom optional
* Differentiating between cxx11 and cxx14 support
* Making vecgeom optional. Part 2. forgot to move usolids option
* Adding explicit CXX11 and CXX14 support
* Adding more clhep version to support newer GEANT4 versions
* Adding GEANT4 versions 10.03.p03 and 10.04
* Checkpoint. Adding opengl and x11 variant. Lead up to more changes to enable X11 support
* Adding dependency on fixesproto for newer versions
* Making the X11 dependent pieces work without requiring X11 on the system
* Adding motif
This provides options for hardware and software rendering with the
gl API and updates the vtk package to make use of those options:
* Create new "gl" virtual package, provided by mesa
* Add external-only "opengl" package, which represents a system
install that provides gl
* For vtk: prefer system gl implementation by default to get speed
up from hardware rendering. When software rendering is specifically
requested (+osmesa), try to use the llvmpipe approach, as it is
much faster.
* Make qt dependency optional for vtk
* Add basic support for VTK on osx
* qt: Depend on virtual gl package, rather than mesa impl
* visit: add version 2.12.3
* visit: add version 2.13.0
* visit: enable building with hdf5+mpi
* visit: add qwt dependency
Building VisIt requires Qwt, which is not part of Qt. Prior to this
commit, this dependency was not included in the VisIt spack package,
resulting in a configure-time bug with an error message indicating a
missing Qwt dependency.
This commit fixes this bug by adding Qwt dependency information.
* Revert "Travis: use --concurrency=multiprocessing only on build tests (#6872)"
This reverts commit 596d463714.
* Removing 'coverage combine' in test script
According to what was discovered in #6887, one of the problems is
calling 'coverage combine' twice without the '-a' flag. This removes
the first call within our test scripts.
Update the qt4 CoreWLAN patch to apply to macOS/OS X 10.12 and 10.13,
which both still use the CoreWLAN framework in their SDKs (although
it's apparently deprecated?!). Without this patch update, `spack
install qt@4.8.6` fails on macOS/OS X 10.12 because the linker
cannot find headers from the CoreWLAN framework.
Apple removed support for Objective-C garbage collection in binaries
in XCode 5.1, but VTK 6.1.0 and earlier set flags for garbage
collection, resulting in a compile-time bug when compiling VTK using
any recent version of XCode (i.e., Apple Clang).
This commit fixes this bug by removing the garbage collection flags
via setting the variable `VTK_REQUIRED_OBJCXX_FLAGS` to the empty
string. This variable has the same value (i.e., the empty string) in
the root-level CMakeLists.txt file for VTK 6.2.0 and later.
VTK 6.1.0 and earlier do not use paths stored in `NETCDF_CXX_ROOT` to
detect the presence of NetCDF C++ headers and libraries. Consequently,
VTK 6.1.0 does not build.
This commit fixes this bug by setting the advanced variables
`NETCDF_CXX_INCLUDE_DIR` and `NETCDF_CXX_LIBRARY` at the command line
to specify the directory containing headers and the full library path
for the NetCDF C++ bindings.