Commit graph

896 commits

Author SHA1 Message Date
Todd Gamblin
bf8479bec6 Fix stupid lock bug.
- Code simplification ignored case where exception was raised.
- If LockError was raised, read and write counts were incremented erroneously.
- updated lock test.
2015-10-27 16:34:26 -07:00
Todd Gamblin
af7b96c14a Lock acquires return True/False depending on whether they got POSIX lock. 2015-10-27 00:35:06 -07:00
Todd Gamblin
ead8ac58c6 Working Lock class, now uses POSIX fcntl locks, extensive unit test.
- llnl.util.lock now uses fcntl.lockf instead of flock
  - purported to have more NFS compatibility.

- Added an extensive test case for locks.
  - tests acquiring, releasing, upgrading, timeouts, shared, & exclusive cases.
2015-10-24 19:57:43 -07:00
Todd Gamblin
908a93a470 Add a multiprocess Barrier class to use for testing parallel code. 2015-10-24 19:54:52 -07:00
Gregory Becker
5fda7daf57 an ordered database test 2015-09-27 17:54:24 -07:00
Todd Gamblin
d0e22b2240 Add ref counting to database. This does not handle removal properly yet. 2015-09-18 11:40:05 -07:00
Todd Gamblin
fb73979345 Allow custom timeout for database locking. 2015-09-17 16:09:59 -07:00
Todd Gamblin
e17ad6a684 Simplify lock context managers. 2015-09-17 01:05:19 -07:00
Todd Gamblin
ccf311c9c6 Several changes to DB implementation.
1. Database stores a file version, so we can add to it in the future.
2. Database indexed by hashes and not numerical indexes.
3. Specs built by database have consistent hashes and it's checked.
4. minor naming and whitespace changes.
2015-09-17 00:16:12 -07:00
Gregory Becker
cd23d2eaa2 Added spack fsck and re-read from glob if the database file does not exist. Allows older versions to smoothly upgrade to the database. 2015-09-15 14:20:19 -07:00
Gregory Becker
9c8e46dc22 Added conservative locking to the spack commands that access the database at _index 2015-09-03 09:21:19 -07:00
Gregory Becker
c3246ee8ba Removed incorrect stage removal code from cleanup() in do_install() 2015-08-31 09:46:55 -07:00
Gregory Becker
f406fcb843 Fixed several issues from code review
Most importantly wrote the Lock, Read_Lock_Instance, and Write_Lock_Instance classes in lock.py
Updated the locking in database.py
TODO: Lock on larger areas
2015-08-31 09:38:38 -07:00
Gregory Becker
9345e78779 Fixed inaccurate comment in spec.py 2015-08-25 16:31:09 -07:00
Gregory Becker
ce8df65d7b Eliminated unnecessary differences in pull request 2015-08-25 16:28:55 -07:00
Gregory Becker
e32c59f805 Fixed file locking. Fix is slightly ugly (lock integer added) but it gets the job done
It avoids having to spin simply on the OSError.
2015-08-25 15:32:45 -07:00
Gregory Becker
4a2bd1753a Added dependency indices to database, ensuring correctly reconstructed specs from database
Began work on file locking, currently commented out.
2015-08-25 15:11:18 -07:00
Gregory Becker
fb1874165b Eliminated all calls that relied on finding all packages in the opt directory
Replaced them all with references to the database

Implemented caching in the database. The database now only re-reads data
if the database file exists and was changed since this file last wrote to it.

Added the installed_db field to the spack instance

Left the call to all_specs from testdirectory_layout.py for now.
2015-08-21 17:00:39 -07:00
Gregory Becker
55f68bb2b0 Added hashes to the database 2015-08-21 13:04:27 -07:00
Gregory Becker
1da56e5290 Added a database of installed packages.
No methods use the database so far.

Also, a bug fix:
      Previous version did not remove the staging directory on a failed install
      This led to spack refusing to uninstall dependencies of the failed install
      Added to cleanup() to blow away the staging directory on failed install.
2015-08-21 11:32:12 -07:00
Todd Gamblin
c8f65c1530 Fix 2.6 incompatibility 2015-08-13 00:21:02 -07:00
Todd Gamblin
a2b5b61e7f Add .mailmap file 2015-08-13 00:18:19 -07:00
Todd Gamblin
17c2a0d6f3 Merge pull request #92 from trws/flux-build
pre-alpha flux build and requisite dependencies
2015-08-13 00:02:49 -07:00
Todd Gamblin
58f848fa29 Merge pull request #94 from alfredo-gimenez/dev-pandas
Fixed py-pandas package
2015-08-13 00:00:35 -07:00
Todd Gamblin
6f75f5bd6a Merge pull request #88 from trws/git_depth_attempt
adding a fallback on failure with git --depth
2015-08-12 23:59:13 -07:00
Todd Gamblin
f34b04e555 Merge pull request #87 from alfredo-gimenez/develop
Added gui and cscope features to Vim package
2015-08-12 23:58:27 -07:00
Alfredo Gimenez
d6bf9c9887 Cscope vim variant depends on cscope 2015-08-07 07:58:04 -07:00
Alfredo Gimenez
d017c5080a Fixed py-pandas package 2015-08-07 00:03:14 -07:00
Alfredo Gimenez
067ecb90b9 Added cscope (dependency for vim+cscope) 2015-08-06 09:28:28 -07:00
Todd Gamblin
1792115b4d Use absolute paths to spack compiler wrappers in CC/CXX/F77/FC 2015-08-04 09:57:06 -07:00
Tom Scogland
7182671f8f pre-alpha flux build and requisite dependencies
NOTE: the ncurses package now installs *BOTH* versions, wide and non-wide
character for compatibility with packages that require either one.  It may be
desirable for this to be an option in the future.
2015-08-03 11:59:52 -07:00
Todd Gamblin
7d80983362 Merge pull request #91 from nolta/patch-1
add missing gmp dependency to mpfr package
2015-08-01 14:01:10 -07:00
Mike Nolta
7ebb4fcedc add missing gmp dependency to mpfr package 2015-08-01 16:00:13 -04:00
Tom Scogland
016eef6a16 adding the bear compilation database generator 2015-07-29 14:21:03 -07:00
Tom Scogland
9174c06598 adding a fallback on failure with git --depth
Certain remote protocols don't support the `--depth` option.  Since this can't
be checked by URL type or in any sane way locally, this version attempts to
clone git repositories with the --depth option, and if that fails attempts the
clone again without it.
2015-07-27 14:03:04 -07:00
Todd Gamblin
27ca697b43 Add Python version test to detect {} in version strings.
- {} is not compatible with Python 2.6
2015-07-24 14:22:28 -07:00
Todd Gamblin
1e2f421faa Fix Python 2.6 compatibility issue. 2015-07-23 17:01:55 -07:00
Alfredo Gimenez
00ab6eb616 Vim with added feature support, including gvim 2015-07-23 11:38:02 -07:00
Tom Scogland
6ad5210216 adding a zsh package 2015-07-22 11:35:51 -07:00
Todd Gamblin
19123b4c48 Fix ProviderIndex.update(), which didn't remove stale providers. 2015-07-16 01:41:11 -07:00
Todd Gamblin
e097696390 Update concretize to check for more changes and iterate further. 2015-07-16 01:12:11 -07:00
Todd Gamblin
9087f26537 Fix mangled error message. 2015-07-14 23:59:03 -07:00
Todd Gamblin
8828dbf2e8 Remove superfluous print in vim. 2015-07-14 23:48:07 -07:00
Todd Gamblin
0d308ca30f Fix regression of install -j. 2015-07-14 23:45:58 -07:00
Todd Gamblin
2e90599283 Merge branch 'develop' of github.com:scalability-llnl/spack into develop 2015-07-14 23:43:59 -07:00
Todd Gamblin
9d1f8f6bfd Add test to check packages for Python2.6 compatibility, as well as core. 2015-07-13 18:37:48 +00:00
Todd Gamblin
6f8a4318c5 Remove python 2.6-incompatible format expression. 2015-07-13 18:25:18 +00:00
Tom Scogland
889485181e adding gnu global tags and exuberant ctags 2015-07-10 13:54:38 -07:00
Tom Scogland
fda208f6b8 adding YAPF (Yet Another Python Formatter) 2015-07-09 14:55:27 -07:00
Gregory L. Lee
2e37523428 for LaunchMON added latest git commit and dependences 2015-07-08 11:25:41 -07:00