diff options
Diffstat (limited to 'src/buildstream/_elementsources.py')
-rw-r--r-- | src/buildstream/_elementsources.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/buildstream/_elementsources.py b/src/buildstream/_elementsources.py index c030591f8..eed847e75 100644 --- a/src/buildstream/_elementsources.py +++ b/src/buildstream/_elementsources.py @@ -20,6 +20,7 @@ from contextlib import contextmanager from typing import TYPE_CHECKING, Iterator from . import _cachekey, utils +from ._exceptions import SkipJob from ._context import Context from ._protos.buildstream.v2 import source_pb2 from .plugin import Plugin @@ -109,6 +110,12 @@ class ElementSources: ) source.warn("Updated reference will be ignored as source has open workspace", detail=detail) + # Sources which do not implement track() will return None, produce + # a SKIP message in the UI if all sources produce None + # + if all(ref is None for _, ref in refs): + raise SkipJob("Element sources are not trackable") + return refs # stage_and_cache(): |