summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2025-06-26 15:30:38 +0100
committerGitHub <noreply@github.com>2025-06-26 15:30:38 +0100
commit22c6a817faee11ef97bb33a5431d7467b683c2e6 (patch)
treedc9a77123b62447d98225b5106f9ebba20264851
parent062f7f4e7cd7d71cba56d168f9f99344e9044b59 (diff)
parent8f2eac38f1b7bb132bf7782596899315745a713a (diff)
downloadvyos-1x-22c6a817faee11ef97bb33a5431d7467b683c2e6.tar.gz
vyos-1x-22c6a817faee11ef97bb33a5431d7467b683c2e6.zip
Merge pull request #4578 from dmbaturin/T7578-enforce-op-mode-path-uniqueness
build: T7578: fail the package build if there are non-unique op mode nodes
-rw-r--r--Makefile2
-rwxr-xr-xpython/vyos/xml_ref/generate_op_cache.py1
2 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index d3248c8d2..e85ccd7f4 100644
--- a/Makefile
+++ b/Makefile
@@ -69,7 +69,7 @@ op_mode_definitions: $(op_xml_obj)
find $(BUILD_DIR)/op-mode-definitions/ -type f -name "*.xml" | xargs -I {} $(CURDIR)/scripts/build-command-op-templates {} $(CURDIR)/schema/op-mode-definition.rng $(OP_TMPL_DIR) || exit 1
- $(CURDIR)/python/vyos/xml_ref/generate_op_cache.py --xml-dir $(BUILD_DIR)/op-mode-definitions || exit 1
+ $(CURDIR)/python/vyos/xml_ref/generate_op_cache.py --check-path-ambiguity --xml-dir $(BUILD_DIR)/op-mode-definitions || exit 1
# XXX: tcpdump, ping, traceroute and mtr must be able to recursivly call themselves as the
# options are provided from the scripts themselves
diff --git a/python/vyos/xml_ref/generate_op_cache.py b/python/vyos/xml_ref/generate_op_cache.py
index 117b080b4..29697dc58 100755
--- a/python/vyos/xml_ref/generate_op_cache.py
+++ b/python/vyos/xml_ref/generate_op_cache.py
@@ -280,6 +280,7 @@ def main():
else:
print('Found the following duplicate paths:\n')
print(out)
+ sys.exit(1)
with open(op_ref_cache, 'w') as f:
f.write('from vyos.xml_ref.op_definition import NodeData\n')