abderrahim commented on code in PR #1898:
URL: https://github.com/apache/buildstream/pull/1898#discussion_r1526379176
##########
src/buildstream/types.py:
##########
@@ -274,6 +274,10 @@ class _SourceUriPolicy(FastEnum):
# configuration has not provided a mirror
USER = "user"
+ # Use only URIs defined in the toplevel project (the project on which
+ # BuildStream was invoked with as opposed to a junctioned subproject.
+ TOPLEVEL = "toplevel"
Review Comment:
> Instead, I think that the project itself should be in charge of deciding
if it is providing mirrors for it's subprojects, and this behavior is then used
unconditionally for the SourceUriPolicy.MIRRORS portion.
It is in this patch. The `toplevel` vs `mirrors` difference mirrors the
current `user` vs `mirrors`.
That is, when a subproject has its mirrors overridden by the toplevel
project both `toplevel` and `mirrors` behave the same. However, when the
toplevel project doesn't override the mirrors, `mirrors` will use the original
mirrors and `toplevel` will raise an error.
Thinking abut this again, I'm not sure what would be the interaction between
overriding the mirrors both in the toplevel project and in the user config.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]