From 6218924ef80db2b76669815bad864242ef59850a Mon Sep 17 00:00:00 2001 From: Antonin Godard Date: Fri, 13 Feb 2026 12:44:02 +0100 Subject: [PATCH] conf.py: define new {oecore,bitbake,meta_yocto}_rev roles Use the extlinks extension to create new roles to quickly reference a commit from openembedded-core, bitbake, or meta-yocto. For example, use as: :oecore_rev:`437e0419608e`. Reviewed-by: Quentin Schulz (From yocto-docs rev: 54cd2278e9f72837013831b6ce6d4aff61982899) Signed-off-by: Antonin Godard (cherry picked from commit 79552b4a764d16282a86c8e017270a258a26240e) Signed-off-by: Antonin Godard Signed-off-by: Paul Barker --- documentation/conf.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/documentation/conf.py b/documentation/conf.py index c07b6c4199..a7796c09ae 100644 --- a/documentation/conf.py +++ b/documentation/conf.py @@ -89,9 +89,17 @@ rst_prolog = """ .. |author| replace:: %s """ % (project, copyright, author) +# base url definitions +oe_git_server = "https://git.openembedded.org" +oecore_git = f"{oe_git_server}/openembedded-core" +bitbake_git = f"{oe_git_server}/bitbake" +yocto_git_server = "https://git.yoctoproject.org" +meta_yocto_git = f"{yocto_git_server}/meta-yocto" + # external links and substitutions extlinks = { - 'bitbake_git': ('https://git.openembedded.org/bitbake%s', None), + 'bitbake_git': (f'{bitbake_git}%s', None), + 'bitbake_rev': (f'{bitbake_git}/commit/?id=%s', '%.7s'), 'cve_mitre': ('https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-%s', 'CVE-%s'), 'cve_nist': ('https://nvd.nist.gov/vuln/detail/CVE-%s', 'CVE-%s'), 'yocto_home': ('https://www.yoctoproject.org%s', None), @@ -101,11 +109,13 @@ extlinks = { 'yocto_bugs': ('https://bugzilla.yoctoproject.org%s', None), 'yocto_ab': ('https://autobuilder.yoctoproject.org%s', None), 'yocto_docs': ('https://docs.yoctoproject.org%s', None), - 'yocto_git': ('https://git.yoctoproject.org%s', None), + 'yocto_git': (f'{yocto_git_server}%s', None), + 'meta_yocto_rev': (f'{meta_yocto_git}/commit/?id=%s', '%.7s'), 'yocto_sstate': ('http://sstate.yoctoproject.org%s', None), 'oe_home': ('https://www.openembedded.org%s', None), 'oe_lists': ('https://lists.openembedded.org%s', None), - 'oe_git': ('https://git.openembedded.org%s', None), + 'oe_git': (f'{oe_git_server}%s', None), + 'oecore_rev': (f'{oecore_git}/commit/?id=%s', '%.7s'), 'oe_wiki': ('https://www.openembedded.org/wiki%s', None), 'oe_layerindex': ('https://layers.openembedded.org%s', None), 'oe_layer': ('https://layers.openembedded.org/layerindex/branch/master/layer%s', None),