Bug 7889 - not all tools use our option parser
Summary: not all tools use our option parser
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Other (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.17.0
Assignee: Emil Lock
Depends on:
Reported: 2022-04-12 09:26 CEST by Pierre Ossman
Modified: 2024-04-17 08:25 CEST (History)
3 users (show)

See Also:
Acceptance Criteria:
MUST: * Scripts should have the same behaviour before and after the option parser conversion for: - Common cases - Edge cases SHOULD: * There should be an autotest in place to ensure that all current and future scripts use the correct option parser


Description Pierre Ossman cendio 2022-04-12 09:26:51 CEST
For bug 3707 we added our own option parser in order to get the subcommand handling we wanted. However it also adds a number of other behaviours we want from our argument parser, such as sorting and surrogate detection. We should therefore use this parser in all our tools to give a consistent behaviour.

The current offenders are:

 * tl-config/hivetool (getopt)
 * tl-env (getopt)
 * tl-ldap-certalias (getopt)
 * tl-limit-printers (getopt)
 * tl-mount-localdrives (getopt)
 * tl-notify (optparse)
 * tl-session-param (getopt)
 * tl-setup (optparse)
 * tl-sso-password (getopt)
 * tl-sso-token-passphrase (getopt)
 * tl-support (getopt)
 * tl-umount-localdrives (getopt)

We should probably also add an automatic test once these are fixed that makes sure we don't use the "wrong" parser in any future code.

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