versioning the database
This commit is contained in:
parent
44f089508b
commit
11b62114bb
@ -60,7 +60,7 @@
|
|||||||
_db_dirname = '.spack-db'
|
_db_dirname = '.spack-db'
|
||||||
|
|
||||||
# DB version. This is stuck in the DB file to track changes in format.
|
# DB version. This is stuck in the DB file to track changes in format.
|
||||||
_db_version = Version('0.9')
|
_db_version = Version('0.9.1')
|
||||||
|
|
||||||
# Default timeout for spack database locks is 5 min.
|
# Default timeout for spack database locks is 5 min.
|
||||||
_db_lock_timeout = 60
|
_db_lock_timeout = 60
|
||||||
@ -250,8 +250,10 @@ def check(cond, msg):
|
|||||||
|
|
||||||
# TODO: better version checking semantics.
|
# TODO: better version checking semantics.
|
||||||
version = Version(db['version'])
|
version = Version(db['version'])
|
||||||
if version != _db_version:
|
if version > _db_version:
|
||||||
raise InvalidDatabaseVersionError(_db_version, version)
|
raise InvalidDatabaseVersionError(_db_version, version)
|
||||||
|
elif version < _db_version:
|
||||||
|
self.reindex(spack.install_layout)
|
||||||
|
|
||||||
# Iterate through database and check each record.
|
# Iterate through database and check each record.
|
||||||
installs = db['installs']
|
installs = db['installs']
|
||||||
@ -343,6 +345,7 @@ def _write(self):
|
|||||||
temp_file = self._index_path + (
|
temp_file = self._index_path + (
|
||||||
'.%s.%s.temp' % (socket.getfqdn(), os.getpid()))
|
'.%s.%s.temp' % (socket.getfqdn(), os.getpid()))
|
||||||
|
|
||||||
|
|
||||||
# Write a temporary database file them move it into place
|
# Write a temporary database file them move it into place
|
||||||
try:
|
try:
|
||||||
with open(temp_file, 'w') as f:
|
with open(temp_file, 'w') as f:
|
||||||
|
@ -3,9 +3,10 @@
|
|||||||
class Ghostscript(Package):
|
class Ghostscript(Package):
|
||||||
"""an interpreter for the PostScript language and for PDF. """
|
"""an interpreter for the PostScript language and for PDF. """
|
||||||
homepage = "http://ghostscript.com/"
|
homepage = "http://ghostscript.com/"
|
||||||
url = "http://downloads.ghostscript.com/public/ghostscript-9.16.tar.gz"
|
url = "http://downloads.ghostscript.com/public/old-gs-releases/ghostpdl-9.16.tar.gz"
|
||||||
|
|
||||||
version('9.16', '829319325bbdb83f5c81379a8f86f38f')
|
# version('9.16', '829319325bbdb83f5c81379a8f86f38f')
|
||||||
|
version('9.16', '818c87e31f7562aaa97397d3d0cc20a1')
|
||||||
|
|
||||||
parallel = False
|
parallel = False
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user