Skip to content

Commit 6e0f173

Browse files
jonrebmBastian-Krause
authored andcommitted
doc: man: Add some details to subcommands
The subcommands descriptions for create, release-from and flashscript had some extra details in the old rst manpages, not available in the argparse/cli help. Migrate these descriptions into argparse. Signed-off-by: Jonas Rebmann <jre@pengutronix.de>
1 parent a562c69 commit 6e0f173

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

labgrid/remote/client.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1884,7 +1884,10 @@ def get_parser(auto_doc_mode=False) -> "argparse.ArgumentParser | AutoProgramArg
18841884
subparser = subparsers.add_parser("show", help="show a place and related resources")
18851885
subparser.set_defaults(func=ClientSession.print_place)
18861886

1887-
subparser = subparsers.add_parser("create", help="add a new place")
1887+
subparser = subparsers.add_parser(
1888+
"create",
1889+
help="add a new place with the name specified via --place or the LG_PLACE environment variable",
1890+
)
18881891
subparser.set_defaults(func=ClientSession.add_place)
18891892

18901893
subparser = subparsers.add_parser("delete", help="delete an existing place")
@@ -1932,7 +1935,10 @@ def get_parser(auto_doc_mode=False) -> "argparse.ArgumentParser | AutoProgramArg
19321935
subparser.set_defaults(func=ClientSession.release)
19331936

19341937
subparser = subparsers.add_parser(
1935-
"release-from", help="atomically release a place, but only if locked by a specific user"
1938+
"release-from",
1939+
help="atomically release a place, but only if locked by a specific user",
1940+
epilog="Note that this command returns success as long as the specified user no longer owns the place, "
1941+
"meaning it may be acquired by another user or not at all.",
19361942
)
19371943
subparser.add_argument("acquired", metavar="HOST/USER", help="User and host to match against when releasing")
19381944
subparser.set_defaults(func=ClientSession.release_from)
@@ -1982,7 +1988,7 @@ def get_parser(auto_doc_mode=False) -> "argparse.ArgumentParser | AutoProgramArg
19821988
subparser.add_argument("--name", "-n", help="optional resource name")
19831989
subparser.set_defaults(func=ClientSession.fastboot)
19841990

1985-
subparser = subparsers.add_parser("flashscript", help="run flash script")
1991+
subparser = subparsers.add_parser("flashscript", help="Run arbitrary script with arguments to flash device")
19861992
subparser.add_argument("script", help="Flashing script")
19871993
subparser.add_argument("script_args", metavar="ARG", nargs=argparse.REMAINDER, help="script arguments")
19881994
subparser.add_argument("--name", "-n", help="optional resource name")

man/labgrid-client.1

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ Log output to FILE
259259
.UNINDENT
260260
.SS labgrid\-client create
261261
.sp
262-
add a new place
262+
add a new place with the name specified via \-\-place or the LG_PLACE environment variable
263263
.INDENT 0.0
264264
.INDENT 3.5
265265
.sp
@@ -404,7 +404,7 @@ optional resource name
404404
.UNINDENT
405405
.SS labgrid\-client flashscript
406406
.sp
407-
run flash script
407+
Run arbitrary script with arguments to flash device
408408
.INDENT 0.0
409409
.INDENT 3.5
410410
.sp
@@ -552,6 +552,8 @@ usage: labgrid\-client release\-from HOST/USER
552552
.B host/user
553553
User and host to match against when releasing
554554
.UNINDENT
555+
.sp
556+
Note that this command returns success as long as the specified user no longer owns the place, meaning it may be acquired by another user or not at all.
555557
.SS labgrid\-client release|unlock
556558
.sp
557559
release a place

0 commit comments

Comments
 (0)