Skip to content

Commit b9f667a

Browse files
committed
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 a8009fb commit b9f667a

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
@@ -1822,7 +1822,10 @@ def get_parser(for_manpage=True) -> argparse.ArgumentParser:
18221822
subparser = subparsers.add_parser("show", help="show a place and related resources")
18231823
subparser.set_defaults(func=ClientSession.print_place)
18241824

1825-
subparser = subparsers.add_parser("create", help="add a new place")
1825+
subparser = subparsers.add_parser(
1826+
"create",
1827+
help="add a new place with the name specified via --place or the LG_PLACE environment variable",
1828+
)
18261829
subparser.set_defaults(func=ClientSession.add_place)
18271830

18281831
subparser = subparsers.add_parser("delete", help="delete an existing place")
@@ -1870,7 +1873,10 @@ def get_parser(for_manpage=True) -> argparse.ArgumentParser:
18701873
subparser.set_defaults(func=ClientSession.release)
18711874

18721875
subparser = subparsers.add_parser(
1873-
"release-from", help="atomically release a place, but only if locked by a specific user"
1876+
"release-from",
1877+
help="atomically release a place, but only if locked by a specific user",
1878+
epilog="Note that this command returns success as long as the specified user no longer owns the place, "
1879+
"meaning it may be acquired by another user or not at all.",
18741880
)
18751881
subparser.add_argument("acquired", metavar="HOST/USER", help="User and host to match against when releasing")
18761882
subparser.set_defaults(func=ClientSession.release_from)
@@ -1920,7 +1926,7 @@ def get_parser(for_manpage=True) -> argparse.ArgumentParser:
19201926
subparser.add_argument("--name", "-n", help="optional resource name")
19211927
subparser.set_defaults(func=ClientSession.fastboot)
19221928

1923-
subparser = subparsers.add_parser("flashscript", help="run flash script")
1929+
subparser = subparsers.add_parser("flashscript", help="Run arbitrary script with arguments to flash device")
19241930
subparser.add_argument("script", help="Flashing script")
19251931
subparser.add_argument("script_args", metavar="ARG", nargs=argparse.REMAINDER, help="script arguments")
19261932
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
@@ -257,7 +257,7 @@ Log output to FILE
257257
.UNINDENT
258258
.SS labgrid\-client create
259259
.sp
260-
add a new place
260+
add a new place with the name specified via \-\-place or the LG_PLACE environment variable
261261
.INDENT 0.0
262262
.INDENT 3.5
263263
.sp
@@ -401,7 +401,7 @@ optional resource name
401401
.UNINDENT
402402
.SS labgrid\-client flashscript
403403
.sp
404-
run flash script
404+
Run arbitrary script with arguments to flash device
405405
.INDENT 0.0
406406
.INDENT 3.5
407407
.sp
@@ -548,6 +548,8 @@ usage: labgrid\-client release\-from HOST/USER
548548
.B host/user
549549
User and host to match against when releasing
550550
.UNINDENT
551+
.sp
552+
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.
551553
.SS labgrid\-client release|unlock
552554
.sp
553555
release a place

0 commit comments

Comments
 (0)