[GRASS-git] [OSGeo/grass] a58e17: man: fix KeyError: 'MDDIR' in man/build_md.py (#4739)

Markus Neteler noreply at github.com
Fri Nov 22 16:51:39 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/OSGeo/grass
  Commit: a58e17817a44d09f5bb1a0bf462bf8a2ab6ed115
      https://github.com/OSGeo/grass/commit/a58e17817a44d09f5bb1a0bf462bf8a2ab6ed115
  Author: Markus Neteler <neteler at osgeo.org>
  Date:   2024-11-23 (Sat, 23 Nov 2024)

  Changed paths:
    M man/build_md.py

  Log Message:
  -----------
  man: fix KeyError: 'MDDIR' in man/build_md.py (#4739)

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 <v.what.strds.timestamp>... SUCCESS
Parsing <wx.metadata>... FAILED
Parsing <wx.mwprecip>... FAILED
Parsing <wx.stream>... FAILED
Parsing <wx.wms>... 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 <module>
    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 <module>
    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).

Co-authored-by: Martin Landa <landa.martin at gmail.com>



To unsubscribe from these emails, change your notification settings at https://github.com/OSGeo/grass/settings/notifications


More information about the grass-commit mailing list