This is an automated email from the ASF dual-hosted git repository.

juergbi pushed a commit to branch juerg/junction-aliases
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 77b86aa76726152a102dfee1c58fb37ded2e75a4
Author: Jürg Billeter <[email protected]>
AuthorDate: Fri Apr 5 18:03:03 2024 +0200

    _project.py: Let `disallow-subproject-uris` imply fatal `unaliased-url`
    
    Ensure no subproject URIs escape the parent project's control.
---
 src/buildstream/_project.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/buildstream/_project.py b/src/buildstream/_project.py
index 97ee13127..fbf190018 100644
--- a/src/buildstream/_project.py
+++ b/src/buildstream/_project.py
@@ -849,6 +849,11 @@ class Project:
             # If the parent project doesn't allow subproject URIs, this must
             # be enforced for nested subprojects as well.
             self.disallow_subproject_uris = True
+
+            # The `disallow-subproject-uris` flag also implies fatal 
`unaliased-url` in subprojects
+            # to ensure no subproject URIs escape the parent project's control.
+            if CoreWarnings.UNALIASED_URL not in self._fatal_warnings:
+                self._fatal_warnings.append(CoreWarnings.UNALIASED_URL)
         else:
             self.disallow_subproject_uris = 
junctions_node.get_bool("disallow-subproject-uris", default=False)
 

Reply via email to