Skip to content

Commit 7badd69

Browse files
authored
Package source ID cannot be determined when the url can't be extrapolated for older version. (spack#14237)
1 parent d0523ca commit 7badd69

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/spack/spack/package.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1262,7 +1262,10 @@ def content_hash(self, content=None):
12621262
raise spack.error.SpackError(err_msg)
12631263

12641264
hash_content = list()
1265-
source_id = fs.for_package_version(self, self.version).source_id()
1265+
try:
1266+
source_id = fs.for_package_version(self, self.version).source_id()
1267+
except fs.ExtrapolationError:
1268+
source_id = None
12661269
if not source_id:
12671270
# TODO? in cases where a digest or source_id isn't available,
12681271
# should this attempt to download the source and set one? This

0 commit comments

Comments
 (0)