From b5f17d0334532a475eb05f6dc7e7e39187d2573e Mon Sep 17 00:00:00 2001 From: Joshua Watt Date: Tue, 15 Oct 2024 10:00:18 -0600 Subject: [PATCH] bitbake: bitbake-hashclient: Add help for address Adds an epilog to the help text that indicates the possible options for the server address (Bitbake rev: b6b703fce02057212ad11b1d1286c6178c533bad) Signed-off-by: Joshua Watt Signed-off-by: Richard Purdie --- bitbake/bin/bitbake-hashclient | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/bitbake/bin/bitbake-hashclient b/bitbake/bin/bitbake-hashclient index 5d6f67046b..a50701a88b 100755 --- a/bitbake/bin/bitbake-hashclient +++ b/bitbake/bin/bitbake-hashclient @@ -17,6 +17,7 @@ import warnings import netrc import json import statistics +import textwrap warnings.simplefilter("default") try: @@ -265,7 +266,19 @@ def main(): print(f"Max time is: {max(times):.3f}s") return 0 - parser = argparse.ArgumentParser(description='Hash Equivalence Client') + parser = argparse.ArgumentParser( + formatter_class=argparse.RawDescriptionHelpFormatter, + description='Hash Equivalence Client', + epilog=textwrap.dedent( + """ + Possible ADDRESS options are: + unix://PATH Connect to UNIX domain socket at PATH + ws://HOST[:PORT] Connect to websocket at HOST:PORT (default port is 80) + wss://HOST[:PORT] Connect to secure websocket at HOST:PORT (default port is 443) + HOST:PORT Connect to TCP server at HOST:PORT + """ + ), + ) parser.add_argument('--address', default=DEFAULT_ADDRESS, help='Server address (default "%(default)s")') parser.add_argument('--log', default='WARNING', help='Set logging level') parser.add_argument('--login', '-l', metavar="USERNAME", help="Authenticate as USERNAME")