Add a script to validate documentation glossaries

Instead of tracking the glossary manually, add a small script that
checks if it is properly sorted.

Add two comments between the start and end of the glossary for the
script to know where it's located.

The script also checks if the variables are properly sorted. It uses
difflib and returns the diff if there's a difference between the
unsorted and sorted list.

Messages beginning with "WARNING:" are reported by the Autobuilder,
which is the reason for this format.

(From yocto-docs rev: 416d50c0c322eb88bf13353a198db7211e4d665a)

Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Antonin Godard
2025-07-29 13:30:02 +02:00
committed by Richard Purdie
parent 6217bbbe7e
commit dc768a3d9d
2 changed files with 96 additions and 0 deletions

View File

@@ -7,6 +7,9 @@ Variables Glossary
This chapter lists common variables used in the OpenEmbedded build
system and gives an overview of their function and contents.
..
check_glossary_begin
:term:`A <ABIEXTENSION>` :term:`B` :term:`C <CACHE>`
:term:`D` :term:`E <EFI_PROVIDER>` :term:`F <FAKEROOT>`
:term:`G <GCCPIE>` :term:`H <HGDIR>` :term:`I <IMAGE_BASENAME>`
@@ -16,6 +19,9 @@ system and gives an overview of their function and contents.
:term:`U <UBOOT_BINARY>` :term:`V <VIRTUAL-RUNTIME>`
:term:`W <WARN_QA>` :term:`X <XSERVER>` :term:`Z <ZSTD_THREADS>`
..
check_glossary_end
.. glossary::
:sorted: