On Mon, May 19, 2025 at 01:54:58PM +0200, Thorsten Scherer wrote:
> Removal of the global import broke license report generation.  Fix it.
> 
>   File 
> "/usr/local/stow/ptxdist-2025.03.0/lib/ptxdist-2025.03.0/scripts/report/latex.py",
>  line 32, in format_dot
>     return (args[1]['name'], dot2tex(dot, 
> docpreamble='\\usepackage[xetex]{hyperref}', figonly=True,
>                              ^^^^^^^
> NameError: name 'dot2tex' is not defined

Right, the local import is broken because it does not work with the
multiprocessing pool. But it should still be a local import.
I'll create the correct fix for that.

Michael

> Fixes: e27adde6e54d ("generate-report: remove global dot2tex import")
> Signed-off-by: Thorsten Scherer <[email protected]>
> ---
>  scripts/report/latex.py | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/scripts/report/latex.py b/scripts/report/latex.py
> index cdb564a41eab..71344f988d4f 100644
> --- a/scripts/report/latex.py
> +++ b/scripts/report/latex.py
> @@ -10,6 +10,7 @@ from multiprocessing import Pool
>  from os import path, environ
>  import hashlib
>  import subprocess
> +from dot2tex import dot2tex
>  
>  from report.report import find_file, ReportException
>  from report.generator import Generator
> -- 
> 2.47.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Reply via email to