Bug 1142184

Summary: virt-sparsify --help print description of a option which is hard to get common understanding
Product: Red Hat Enterprise Linux 7 Reporter: Lingfei Kong <lkong>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 7.1CC: huzhan, leiwang, mbooth, ptoscano, wshi
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-23 15:06:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lingfei Kong 2014-09-16 10:14:04 UTC
Description of problem:
virt-sparsify --help print wrong description of a option
This is a valid usage but it's hard to get common understanding and do not in accordance with other help info of some virt-tools like virt-builder, virt-customize, virt-sysprep:
#virt-builder --help|egrep '\-v |\-\-verbose'
  -v                                  Enable debugging messages
  --verbose                           Enable debugging messages
#virt-customize --help|egrep '\-v |\-\-verbose'
  -v                                  Enable debugging messages
  --verbose                           Enable debugging messages
#virt-sysprep --help|egrep '\-v |\-\-verbose'
  -v                                  Enable debugging messages
  --verbose                           Enable debugging messages

#virt-sparsify --help|egrep '\-v |\-\-verbose'
  -v                            Enable debugging messages
  --verbose                     -"-


Version-Release number of selected component (if applicable):
libguestfs-1.27.43-1.1.el7


How reproducible:
100%


Steps to Reproduce:
#virt-sparsify --help
virt-sparsify: sparsify a virtual machine disk

 virt-sparsify [--options] indisk outdisk

 virt-sparsify [--options] --in-place disk

A short summary of the options is given below.  For detailed help please
read the man page virt-sparsify(1).

  --check-tmpdir ignore|...     Check there is enough space in $TMPDIR
  --compress                    Compressed output format
  --convert format              Format of output disk (default: same as input)
  --debug-gc                    Debug GC and memory allocations
  --format format               Format of input disk
  --ignore fs                   Ignore filesystem
  --in-place                    Modify the disk image in-place
  --inplace                     -"-
  --long-options                List long options
  --machine-readable            Make output machine readable
  -o option                     Add qemu-img options
  -q                            Quiet output
  --quiet                       -"-
  --tmp block|dir|prebuilt:file Set temporary block device, directory or prebuilt file
  -v                            Enable debugging messages
  --verbose                     -"-
  -V                            Display version and exit
  --version                     -"-
  -x                            Enable tracing of libguestfs calls
  --zero fs                     Zero filesystem
  -help                         Display this list of options
  --help                        Display this list of options


Actual results:
Description of option --inplace, --quiet, --verbose, --version is -"-


Expected results:
Description of option --inplace, --quiet, --verbose, --version should be:
--inplace                     Modify the disk image in-place
--quiet                        Quiet output
--verbose                    Enable debugging messages
--version                     Display version and exit


Additional info:

Comment 2 Richard W.M. Jones 2014-09-16 15:35:43 UTC
-"- is the common mark for ditto.

https://en.wikipedia.org/wiki/Ditto_mark
https://en.wikipedia.org/wiki/Ditto

I don't believe this is a bug.

Comment 3 Lingfei Kong 2014-09-16 17:09:45 UTC
(In reply to Richard W.M. Jones from comment #2)
> -"- is the common mark for ditto.
> 
> https://en.wikipedia.org/wiki/Ditto_mark
> https://en.wikipedia.org/wiki/Ditto
> 
> I don't believe this is a bug.

Yes, accurate to say this is not a bug, because -"- is a ditto mark. I file this bug because this bug may help you to improve the help info of virt-sparsify  :-). There are many people who can not recognize what -"-  means and such format is different from other virt tools such as virt-builder, virt-customize, virt-sysprep, it is better to keep the same format with other virt tools, but it's no problem to do like this.

Also even in the same help info, it have two different format to descript a same function:
# virt-sparsify --help
--check-tmpdir ignore|...     Check there is enough space in $TMPDIR
....................
  --in-place                    Modify the disk image in-place
  --inplace                     -"-
....................
  -q                            Quiet output
  --quiet                       -"-
....................
  -V                            Display version and exit
  --version                     -"-
  -help                         Display this list of options
  --help                        Display this list of options

Comment 6 Richard W.M. Jones 2015-09-23 15:06:30 UTC
Closing as NOTABUG per comment 2, comment 3.