From 21cb0517ccebc61d539f1cb5b2cc583087d3eb36 Mon Sep 17 00:00:00 2001 From: Pieter De Gendt Date: Mon, 14 Oct 2024 09:25:02 +0200 Subject: [PATCH] manifest: Do not allow projects inside the west directory It's not allowed to have projects inside the .west directory, add a check when parsing the manifest. Signed-off-by: Pieter De Gendt --- src/west/manifest.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/west/manifest.py b/src/west/manifest.py index 500f348e..2e785c0d 100644 --- a/src/west/manifest.py +++ b/src/west/manifest.py @@ -2432,6 +2432,10 @@ def _load_project(self, pd: Dict, url_bases: Dict[str, str], f'normalizes to {ret_norm}, which escapes ' f'the workspace topdir') + if os.path.commonpath([ret_norm, util.WEST_DIR]) != '': + self._malformed(f'project "{name}" path {ret.path} ' + f'is in the {util.WEST_DIR} directory') + return ret def _validate_project_groups(self, project_name: str,