Bug 2374539 - 0install-2.18-4.fc43 FTBFS: /usr/lib/rpm/redhat/ocaml_files.py dies: parser.add_argument(..., help='install files instead of generating %files'): badly formed help string
Summary: 0install-2.18-4.fc43 FTBFS: /usr/lib/rpm/redhat/ocaml_files.py dies: parser.a...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ocaml
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact: Fedora Extras Quality Assurance
URL: https://koschei.fedoraproject.org/pac...
Whiteboard:
Depends On:
Blocks: F43FTBFS
TreeView+ depends on / blocked
 
Reported: 2025-06-24 11:46 UTC by Petr Pisar
Modified: 2025-07-13 19:21 UTC (History)
2 users (show)

Fixed In Version: ocaml-5.3.0-3.fc43
Clone Of:
Environment:
Last Closed: 2025-07-13 19:21:54 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Petr Pisar 2025-06-24 11:46:34 UTC
0install-2.18-4.fc43 fails to build in Fedora 43:

Installing /builddir/build/BUILD/0install-2.18-build/BUILDROOT/usr/doc/0install-solver/README.md
+ '[' -d _build/default/_doc/_html ']'
+ rm -rf /builddir/build/BUILD/0install-2.18-build/BUILDROOT/usr/doc
++ find /builddir/build/BUILD/0install-2.18-build/BUILDROOT/usr/lib64/ocaml -name '*.mli'
+ mlis='/builddir/build/BUILD/0install-2.18-build/BUILDROOT/usr/lib64/ocaml/0install-solver/sat.mli
/builddir/build/BUILD/0install-2.18-build/BUILDROOT/usr/lib64/ocaml/0install-solver/zeroinstall_solver.mli'
+ rm -f /builddir/build/BUILD/0install-2.18-build/BUILDROOT/usr/lib64/ocaml/0install-solver/sat.ml /builddir/build/BUILD/0install-2.18-build/BUILDROOT/usr/lib64/ocaml/0install-solver/zeroinstall_solver.ml
+ /usr/bin/python3 /usr/lib/rpm/redhat/ocaml_files.py /builddir/build/BUILD/0install-2.18-build/BUILDROOT /usr/lib64/ocaml
Traceback (most recent call last):
  File "/usr/lib64/python3.14/argparse.py", line 1747, in _check_help
    formatter._expand_help(action)
    ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
  File "/usr/lib64/python3.14/argparse.py", line 678, in _expand_help
    return help_string % params
           ~~~~~~~~~~~~^~~~~~~~
TypeError: must be real number, not dict
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/usr/lib/rpm/redhat/ocaml_files.py", line 429, in <module>
    parser.add_argument('-i', '--install',
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
                        action='store_true',
                        ^^^^^^^^^^^^^^^^^^^^
                        default=False,
                        ^^^^^^^^^^^^^^
                        help='install files instead of generating %files')
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.14/argparse.py", line 1561, in add_argument
    self._check_help(action)
    ~~~~~~~~~~~~~~~~^^^^^^^^
  File "/usr/lib64/python3.14/argparse.py", line 1749, in _check_help
    raise ValueError('badly formed help string') from exc
ValueError: badly formed help string
error: Bad exit status from /var/tmp/rpm-tmp.cKP6pB (%install)

A difference between passing and failing build root is at <https://koschei.fedoraproject.org/build/20731998>. This filure is probably triggered by uprading python3 from 3.13.3-3.fc43 to 3.14.0~b2-3.fc43.

The help argument for parser.add_argument() is a formatting string <https://docs.python.org/3.14/library/argparse.html#help> and %files seems to be undefined. Probably it should be a literal and % needs to be percent-escaped.

Comment 1 Richard W.M. Jones 2025-06-24 11:50:16 UTC
Is this the same fix we added here? https://src.fedoraproject.org/rpms/ocaml/c/5b0d3a3f5da9b30d345541737d8f4f626e1b11cb?branch=rawhide
(https://src.fedoraproject.org/rpms/ocaml/pull-request/5)

We didn't do a build of OCaml yet though.

Comment 2 Petr Pisar 2025-06-24 12:32:13 UTC
Yes, it is. Thanks for the pointer. I admit I forgot check ocaml dist-git.

Comment 3 Fedora Update System 2025-07-13 19:19:08 UTC
FEDORA-2025-b3078216fc (0install-2.18-5.fc43, alt-ergo-2.3.3-25.fc43, and 196 more) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-b3078216fc

Comment 4 Fedora Update System 2025-07-13 19:21:54 UTC
FEDORA-2025-b3078216fc (0install-2.18-5.fc43, alt-ergo-2.3.3-25.fc43, and 196 more) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.