Message ID | 20250225200423.2350471-5-berrange@redhat.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | docs: automated info about machine deprecation/removal info | expand |
On 25/02/2025 21.04, Daniel P. Berrangé wrote: > If we change the deprecation logic in include/hw/boards.h, we must make > a corresponding change to docs/conf.py and docs/about/deprecated.rst. > Add comments to these files as a warning to future maintainers to keep > these files in sync. > > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> > --- > docs/conf.py | 4 ++++ > include/hw/boards.h | 6 +++++- > 2 files changed, 9 insertions(+), 1 deletion(-) Reviewed-by: Thomas Huth <thuth@redhat.com>
diff --git a/docs/conf.py b/docs/conf.py index 8b567787ce..d0d3cd10ce 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -129,6 +129,10 @@ else: minor += 1 +# These thresholds must match the constants +# MACHINE_VER_DELETION_MAJOR & MACHINE_VER_DEPRECATION_MAJOR +# defined in include/hw/boards.h and the introductory text in +# docs/about/deprecated.rst ver_machine_deprecation_version = "%d.%d.%d" % (major - 3, minor, micro) ver_machine_deletion_version = "%d.%d.%d" % (major - 6, minor, micro) diff --git a/include/hw/boards.h b/include/hw/boards.h index dcfb251cbd..a89a885add 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -633,7 +633,11 @@ struct MachineState { /* * How many years/major releases for each phase * of the life cycle. Assumes use of versioning - * scheme where major is bumped each year + * scheme where major is bumped each year. + * + * These values must match the ver_machine_deprecation_version + * and ver_machine_deletion_version logic in docs/conf.py and + * the text in docs/about/deprecated.rst */ #define MACHINE_VER_DELETION_MAJOR 6 #define MACHINE_VER_DEPRECATION_MAJOR 3
If we change the deprecation logic in include/hw/boards.h, we must make a corresponding change to docs/conf.py and docs/about/deprecated.rst. Add comments to these files as a warning to future maintainers to keep these files in sync. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> --- docs/conf.py | 4 ++++ include/hw/boards.h | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-)