gnu: patman: Fix execution.

Before this change, patman would fail at run time with "AttributeError: module
'patman.__main__' has no attribute 'run_patman'" since the last U-Boot update.

* gnu/packages/bootloaders.scm (patman) [arguments]
<phases>: New patch-pyproject.toml phase.
This commit is contained in:
Maxim Cournoyer 2023-09-01 00:24:40 -04:00
parent f66fa5f917
commit c7c500dd61
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -881,7 +881,17 @@ (define-public patman
(delete 'sanity-check) (delete 'sanity-check)
(add-after 'unpack 'chdir (add-after 'unpack 'chdir
(lambda _ (lambda _
(chdir "tools/patman")))))) (chdir "tools/patman")))
(add-after 'chdir 'patch-pyproject.toml
;; There is no 'run_patman' procedure in the __main__.py script,
;; which breaks execution
;; Patch submitted upstream (see:
;; https://patchwork.ozlabs.org/project/uboot/\
;; patch/20230901050532.725-1-maxim.cournoyer@gmail.com/).
(lambda _
(substitute* "pyproject.toml"
(("patman.__main__:run_patman")
"patman.__main__")))))))
(inputs (list python-pygit2 python-requests python-u-boot-pylib)) (inputs (list python-pygit2 python-requests python-u-boot-pylib))
(synopsis "Patch automation tool") (synopsis "Patch automation tool")
(description "Patman is a patch automation script which: (description "Patman is a patch automation script which: