From 30323afa6ccfe8b8bf6e92a6b28efb7dcdafdf36 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Tue, 23 Dec 2025 13:44:22 +0100 Subject: [PATCH] Read current data rather than data about 4.0 It doesn't matter how a macro was used in a previous minor version of the library. What matters is current information about options and internal symbols, and information about past versions from which a macro may have been removed. The output is mostly the same, but: * Macros that were options in 3.6, became internal in 4.0 and have now been completely removed are now shown as removed, not internal. * Macros that were options in 3.6, were completely removed in 4.0, and are now back but internal, are now shown as internal, not removed. * Macros that were options in 3.6, were removed in 4.0 and are back to being options are no longer rejected. * Macros that were options in 3.6, were removed in 4.0 and are back to being internal derived macros in TF-PSA-Crypto are no longer rejected. Signed-off-by: Gilles Peskine --- scripts/generate_config_checks.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/generate_config_checks.py b/scripts/generate_config_checks.py index bf8889f32b..2e9faa6714 100755 --- a/scripts/generate_config_checks.py +++ b/scripts/generate_config_checks.py @@ -24,10 +24,10 @@ ALWAYS_ENABLED_SINCE_4_0 = frozenset([ def checkers_for_removed_options() -> Iterator[Checker]: """Discover removed options. Yield corresponding checkers.""" previous_major = config_macros.History('mbedtls', '3.6') - this_major = config_macros.History('mbedtls', '4.0') + current = config_macros.Current() + crypto = config_macros.Current('tf-psa-crypto') old_public = previous_major.options() - new_public = this_major.options() - crypto = config_macros.History('tfpsacrypto', '1.0') + new_public = current.options() for option in sorted(old_public - new_public): if option in ALWAYS_ENABLED_SINCE_4_0: continue