From 0ee9d07f9e37b579b4e9e8bfd4a1fec3d1ced2f1 Mon Sep 17 00:00:00 2001 From: Markus Neteler Date: Fri, 22 Nov 2024 14:40:30 +0100 Subject: [PATCH] man: fix KeyError: 'MDDIR' in man/build_md.py At time the GRASS GIS main compilation with addons with `cron_grass_preview_build_binaries.sh` is broken: https://grass.osgeo.org/grass85/binary/linux/snapshot/build.log.txt ``` ... Parsing ... SUCCESS Parsing ... FAILED Parsing ... FAILED Parsing ... FAILED Parsing ... FAILED + cp /home/neteler/.grass8/addons/modules.xml /var/www/code_and_data/addons/grass8/modules.xml + export ARCH + export ARCH_DISTDIR=/home/neteler/src//main/dist.x86_64-pc-linux-gnu + export GISBASE=/home/neteler/src//main/dist.x86_64-pc-linux-gnu + export VERSION_NUMBER=8.5 + python3 /home/neteler/src//main/man/build_keywords.py /var/www/code_and_data/grass85/manuals/ /var/www/code_and_data/grass85/manuals/addons/ Traceback (most recent call last): File "/home/neteler/src//main/man/build_keywords.py", line 202, in build_keywords("md") File "/home/neteler/src//main/man/build_keywords.py", line 68, in build_keywords from build_md import ( File "/home/neteler/src/main/man/build_md.py", line 264, in man_dir = os.path.join(os.environ["MDDIR"], "source") File "/usr/lib/python3.9/os.py", line 679, in __getitem__ raise KeyError(key) from None KeyError: 'MDDIR' ``` This PR attemps to fix this bug (inspired by `man/build_html.py`). Tested on grass.osgeo.org (without log file). --- man/build_md.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/build_md.py b/man/build_md.py index 4976c8f6364..0aae069edef 100644 --- a/man/build_md.py +++ b/man/build_md.py @@ -261,6 +261,6 @@ def get_desc(cmd): ############################################################################ -man_dir = os.path.join(os.environ["MDDIR"], "source") +man_dir = os.path.join(os.environ["ARCH_DISTDIR"], "docs", "mkdocs", "source") ############################################################################