Re: [PATCH] don't fail if virt-viewer is missing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Daniel P. Berrange wrote:
> On Wed, Dec 19, 2007 at 11:20:37AM -0500, Cole Robinson wrote:
>> Guido Guenther wrote:
>>> diff --git a/virt-install b/virt-install
>>> index 995f2c3..1215420 100755
>>> --- a/virt-install
>>> +++ b/virt-install
>>> @@ -15,6 +15,7 @@
>>>  
>>>  
>>>  import os, sys, string
>>> +import errno
>>>  from optparse import OptionParser, OptionValueError
>>>  import subprocess
>>>  import logging
>>> @@ -311,7 +312,15 @@ def vnc_console(dom, uri):
>>>      args = args + [ "--wait", "%s" % dom.ID()]
>>>      child = os.fork()
>>>      if not child:
>>> -        os.execvp(args[0], args)
>>> +        try:
>>> +            os.execvp(args[0], args)
>>> +        except OSError, (err, msg):
>>> +            if err == errno.ENOENT:
>>> +                print _("virt-viewer not found, please install the 'virt-viewer' package")
>>> +            else: 
>>> +                raise OSError, (err, msg)
>>> +        except e:
>>> +            raise
>>>          os._exit(1)
>>>  
>>>      return child
>>>
>>> --UlVJffcvxoiEqYs2--
>>>
>> Yes this looks good, I'll apply this. This also brings up another issue that
>> the virtinst rpm requires virt-viewer when we probably shouldn't. virt-viewer
>> indirectly pulls in X (see bz 387971), and virtinst should be perfectly happy
>> running headless.
> 
> If you remove virt-viewer as a dep though, then an out of the box install
> of Fedora won't have virt-viewer and thus all virt-install attempts will
> fail until they manually install it which sucks.
> 
> 
> Dan.

I agree it does suck, though that is the way things were when we tried to exec
vncviewer (more common an app I'm sure, but same out of the box result,
'vncviewer not installed'.) I think the inconvenience of having to 'yum
install virt-viewer' is less worrying than indirectly requiring X, so that's
my vote.

- Cole

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux