| Summary: | 'wic help' / 'wic --help' output is not user friendly. Needs to be redone | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Scott Rifenbark <srifenbark> |
| Component: | Scripts and Tools | Assignee: | Chee Yang <chee.yang.lee> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium | CC: | bluelightning, brian.avery, chee.yang.lee, ross.burton, sgw, srifenbark, stephano |
| Version: | 2.4 | ||
| Target Milestone: | 4.99 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
wic list has more levels. e.g. this works: wic list edgerouter help where edgewrouter is a image (aka wks file) but this does not wic list rawcopy help where rawcopy is a source-plugin additionally, we need a couple of pattern matchable examples. For instance, the fact that I look at partition 1 but doing $ wic ls myImage.wic:1 is not clear at all, from the help line. similar for cp and rm I am finding that there is a bit more help functionality for the 'wic list' command. Currently, the syntax forms for the 'wic list' command are as follows:
SYNOPSIS
wic list images
wic list <image> help
wic list source-plugins
In reality, however, you can do the following:
wic list images [help]
wic list <image_name> help
wic list source-plugins [help]
The output of wic help list should reflect this SYNOPSIS
Scott
Also... those [help] options are pretty useless as you can get the same output with or without them. Issuing 'wic list images help' should return a command error. All that should be allowed is 'wic list images'. Same for 'wic list source-plugins help'. Scott Scott,
In the patch change that's been submitted, these list commands have been changed from "help", which was misleading, to "info". So, the new usage is:
wic list <image_name> info
wic list <source-plugins> info
I'm now out on maternity leave, and I believe that Paul Eggleton will be following up with this in hopes to get this patch merged.
Ok Amber. I will wait until this is merged so I can play with it and then document it in that section where I tell about the wic command. Thanks, Scott |
The Wic help returned to the user is unreadable. Formatting is non-existent and the amount of information is unnecessary. Here are the commands that return help: $ wic help $ wic --help $ wic -h Wic has 6 commands and 3 topics on which it can return help using the following form: $ wic help [COMMAND or TOPIC] The only command you cannot get help on is the help command. Thus, the following command returns an error: $ wic help help All other help returned for any COMMAND or TOPIC is formatted very well, is readable, and is informative. So commands like the following are all good: $ wic help create $ wic help ls $ wic help list When a user enters general help (wic help), they get a huge listing of unformatted help that spans every facet of the wic command. All the user really needs is help and usage on the wic command itself. It is redundant to provide help on individual COMMANDs or TOPICs. I propose the following help output for general help: $ wic help wic version 0.2.0 Creates a customized OpenEmbedded image. Usage: wic [--version] wic help [COMMAND or TOPIC] wic COMMAND [ARGS] usage 1: Returns the current version of Wic usage 2: Returns detailed help for a COMMAND or TOPIC usage 3: Executes COMMAND COMMAND: list - List available canned images and source plugins ls - List contents of partitioned image or partition rm - Remove files or directories from the vfat or ext* partitions help - Show help for a wic COMMAND or TOPIC write - Write an image to a device cp - Copy files and directories to the vfat or ext* partitions create - Create a new OpenEmbedded image TOPIC: overview - Presents an overall overview of Wic plugins - Presents an overview and API for Wic plugins kickstart - Presents a Wic kicstart file reference Examples: $ wic --version Returns the current version of Wic $ wic help cp Returns the SYNOPSIS and DESCRIPTION for the Wic "cp" command. $ wic list images Returns the list of canned images (i.e. *.wks files located in the /scripts/lib/wic/canned-wks directory. $ wic create mkefidisk -e core-image-minimal Creates an EFI disk image from artifacts used in a previous core-image-minimal build in standard BitBake locations (e.g. Cooked Mode).