From 262c3f07bf9ae8c6c0076d4529ae733fe1dbfadb Mon Sep 17 00:00:00 2001 From: Jordan Galby <67924449+Jordan474@users.noreply.github.com> Date: Thu, 19 May 2022 20:27:43 +0200 Subject: Non-existent upstream is not fatal (#30746) A non-existent upstream should not be fatal: it could only mean it is not deployed yet. In the meantime, it should not block the user to rebuild anything it needs. A warning is still emitted, to let the user decide if this is ok or not. --- lib/spack/spack/database.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/spack/spack/database.py b/lib/spack/spack/database.py index fc791595d6..6a6daf67f9 100644 --- a/lib/spack/spack/database.py +++ b/lib/spack/spack/database.py @@ -1064,9 +1064,7 @@ class Database(object): self._state_is_inconsistent = False return elif self.is_upstream: - raise UpstreamDatabaseLockingError( - "No database index file is present, and upstream" - " databases cannot generate an index file") + tty.warn('upstream not found: {0}'.format(self._index_path)) def _add( self, -- cgit v1.2.3-70-g09d2