Bug 1151738

Summary: typo error in man page of virt-edit
Product: Red Hat Enterprise Linux 7 Reporter: Lingfei Kong <lkong>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 7.1CC: jherrman, leiwang, mbooth, ptoscano, wshi, yuliu
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libguestfs-1.27.63-1.el7 Doc Type: Bug Fix
Doc Text:
Minor fixes and improvements have been done to the help message of the "set-append" command, an error message of the "guestfish umount" command, and to the guestfish(1) and virt-edit(1) man pages.
Story Points: ---
Clone Of:
: 1151739 (view as bug list) Environment:
Last Closed: 2015-03-05 13:46:09 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:
Bug Depends On:    
Bug Blocks: 1151739    

Description Lingfei Kong 2014-10-11 08:55:56 UTC
Description of problem:
virt-edit doesn't support --format raw, it only support --format=raw, so line '--format raw|qcow2|...' should change to '--format=raw|qcow2|...' in man virt-edit


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


How reproducible:
100%


Steps to Reproduce:
1. Prepare a rhel guest image: rhel.img
2. Read man virt-edit, search --format raw
3. #virt-edit --format raw -a rhel.img  /etc/hosts


Actual results:
#virt-edit --format raw -a rhel.img  /etc/hosts
libguestfs: error: download: download_stub: path must start with a / character


Expected results:
command 'virt-edit --format raw -a rhel.img  /etc/hosts' should give a proper error message,such as:
#virt-edit --format raw -a rhel.img
Try `virt-edit --help' for more information.


Additional info:

Comment 1 Pino Toscano 2014-10-13 09:07:40 UTC
«--format FMT» is not the same as «--format=FMT», because all of the C tools use getopt_long with --format as optional argument, so «--format FMT» is interpreted as argument-less --format with FMT as parameter.

Since the tools that can mount more than one image need to have a way to reset the format autodetection, hence the argument-less --format is accepted. All the man pages of tools document that.
(0c1d3c02a8147617ee0646e37d011235abdd2c22 introduces this behaviour in guestfish)

Simple fix pushed as
https://github.com/libguestfs/libguestfs/commit/145a188f7056d4414adef472e95cad5640d79511

Comment 2 Richard W.M. Jones 2014-11-15 20:58:44 UTC
I've just realised that we have had this patch in RHEL 7 for
a little while.

Comment 4 yuliu 2014-11-18 06:25:16 UTC
Version: libguestfs-1.28.1-1.11.el7.x86_64


    --format=raw|qcow2|..

Verified as above.

Comment 6 errata-xmlrpc 2015-03-05 13:46:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0303.html