• Bug#1087845: chirpw -h fails

    From Sophie Brun@1:229/2 to All on Tue Nov 19 15:50:01 2024
    XPost: linux.debian.bugs.dist
    From: [email protected]

    Package: chirp
    Version: 1:20241115-1
    Severity: normal
    X-Debbugs-Cc: [email protected]
    User: [email protected]
    Usertags: origin-kali

    Hello,

    The command chirpw -h fails with:

    Traceback (most recent call last):
    File "/usr/bin/chirpw", line 33, in <module>
    sys.exit(load_entry_point('chirp==20241115', 'console_scripts', 'chirpw')())
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3/dist-packages/chirp/wxui/__init__.py", line 122, in chirpmain
    args = parser.parse_args()
    ^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3.12/argparse.py", line 1918, in parse_args
    args, argv = self.parse_known_args(args, namespace)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3.12/argparse.py", line 1928, in parse_known_args
    return self._parse_known_args2(args, namespace, intermixed=False)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3.12/argparse.py", line 1957, in _parse_known_args2
    namespace, args = self._parse_known_args(args, namespace, intermixed)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3.12/argparse.py", line 2198, in _parse_known_args
    start_index = consume_optional(start_index)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3.12/argparse.py", line 2127, in consume_optional
    take_action(action, args, option_string)
    File "/usr/lib/python3.12/argparse.py", line 2032, in take_action
    action(self, namespace, argument_values, option_string)
    File "/usr/lib/python3.12/argparse.py", line 1162, in __call__
    parser.print_help()
    File "/usr/lib/python3.12/argparse.py", line 2635, in print_help
    self._print_message(self.format_help(), file)
    ^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3.12/argparse.py", line 2619, in format_help
    return formatter.format_help()
    ^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3.12/argparse.py", line 300, in format_help
    help = self._root_section.format_help()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3.12/argparse.py", line 231, in format_help
    item_help = join([func(*args) for func, args in self.items])
    ^^^^^^^^^^^
    File "/usr/lib/python3.12/argparse.py", line 338, in _format_usage
    action_usage = format(optionals + positionals, groups)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3.12/argparse.py", line 414, in _format_actions_usage
    raise ValueError(f'empty group {group}')
    ValueError: empty group <argparse._MutuallyExclusiveGroup object at 0x7f525c04c410>


    I think it's because of the Debian patch "remove-desktop-popup.patch"
    The code using "add_mutually_exclusive_group" has been removed and then
    group is empty.
    If I comment the line "desktop = parser.add_mutually_exclusive_group()",
    I no longer get the error.

    Sophie



    -- System Information:
    Debian Release: trixie/sid
    APT prefers stable-security
    APT policy: (500, 'stable-security'), (500, 'unstable'), (500, 'testing'), (1, 'experimental')
    Architecture: amd64 (x86_64)

    Kernel: Linux 6.11.6-amd64 (SMP w/16 CPU threads; PREEMPT)
    Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
    Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
    Shell: /bin/sh linked to /usr/bin/dash
    Init: systemd (via /run/systemd/system)
    LSM: AppArmor: enabled

    Versions of packages chirp depends on:
    ii python3 3.12.7-1
    ii python3-requests 2.32.3+dfsg-1
    ii python3-serial 3.5-2
    ii python3-suds 1.2.0-2
    ii python3-yattag 1.16.1-1
    ii wxpython-tools 4.2.2+dfsg-1

    chirp recommends no packages.

    chirp suggests no packages.

    -- no debconf information

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Daniele Forsi@1:229/2 to Sophie Brun on Fri Nov 22 20:20:01 2024
    XPost: linux.debian.bugs.dist
    From: [email protected]

    Sophie Brun wrote:

    I think it's because of the Debian patch "remove-desktop-popup.patch"
    The code using "add_mutually_exclusive_group" has been removed and then
    group is empty.

    yes, and the patch does more than its description says, because it
    removes also the command line options from the executable but i
    doesn't remove them from the man page

    If I comment the line "desktop = parser.add_mutually_exclusive_group()",
    I no longer get the error.

    I'd rather remove from the patch the hunk that removes the command
    line options because they don't trigger the popup, a user may want to
    use them (I don't) and by not deleting them we diverge less from
    upstream
    I'd keep the chunk that disables the popup

    --
    73 de IU5HKX Daniele

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Dave Hibberd@1:229/2 to All on Sat Nov 23 17:24:20 2024
    XPost: linux.debian.bugs.dist
    From: [email protected]

    On Friday, 22 November 2024 19:14:03 GMT Daniele Forsi wrote:

    I'd rather remove from the patch the hunk that removes the command
    line options because they don't trigger the popup, a user may want to
    use them (I don't) and by not deleting them we diverge less from
    upstream
    I'd keep the chunk that disables the popup

    I agree this is the best approach - I've updated the patch so that those are present and chirpw -h works as a secondary approach.

    Good catch - this is included in the release that I've uploaded today!

    --
    Dave Hibberd
    Debian Developer
    Packet Radioist
    MM0RFN
    -----BEGIN PGP SIGNATURE-----

    iQEzBAABCgAdFiEEXk9UUZPolpyKWbgKA6H7ehkEdxsFAmdCD8QACgkQA6H7ehkE dxvaPgf/fzIGJ2sVF/1llRq1/pWEN5olhcgAnAmnegsm1BTWFKSVuFNOh8mwKawR kMCQ3lJG7nzphMK+TMEjl8PfrQaqOjUQ6RMriNAsS/w+WNS5hURj8LS84RfUud5v DhqyPtLlnC0hlu4cqh2bQzwt9BOBq2n6N8AdlM9yYKpnJ+h1TKthXi6eAThl0o+C eGPnN0zYNYYw7ulI62/lC1xP3ccmk49QmG0eWdvWYYIFcaMmBuXyVZ4ELO7wguTl pEZjtZlZJxXDPTOV3MPSb6N+jSIM8WJlhkxfx+URuLDMvm/hnTydQQyytypIMRug GR2DMIBojd55OE65ZwcYHj0FpvDCxg==
    =9Uxc
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)