[et-mgmt-tools] [PATCH] RHEL5.0 guest cannot be installed by HTTP and NFS

Nobuhiro Itou fj0873gn at aa.jp.fujitsu.com
Fri Mar 16 09:51:03 UTC 2007


Hi,

The RHEL5.0 guest domain cannot be installed by HTTP and NFS.
"RPM-GPG-KEY" doesn't exist in RHEL5.0.
Though I don't have confidence whether this way is the best,
how about this correction?

Signed-off-by: Nobuhiro Itou <fj0873gn at aa.jp.fujitsu.com>


Thanks,
Nobuhiro Itou.


diff -r ecc4386895aa virtinst/DistroManager.py
--- a/virtinst/DistroManager.py Thu Mar 15 12:09:51 2007 -0400
+++ b/virtinst/DistroManager.py Fri Mar 16 17:10:05 2007 +0900
@@ -129,6 +129,8 @@ class MountedImageFetcher(ImageFetcher):
                     file = open(src, "r")
             except IOError, e:
                 raise RuntimeError, "Invalid location given: " + str(e)
+            except OSError, (errno, msg):
+                raise RuntimeError, "Invalid location given: " + msg
             tmpname = self.saveTemp(file, prefix=base + ".")
             logging.debug("Saved file to " + tmpname)
             return tmpname
@@ -189,6 +191,14 @@ class FedoraImageStore(ImageStore):
                 return True
             except RuntimeError, e:
                 logging.debug("Doesn't look like a Fedora distro " + str(e))
+                pass
+
+            try:
+                ignore = fetcher.acquireFile("RPM-GPG-KEY-redhat-release", progresscb)
+                logging.debug("Detected a RHEL5.x distro")
+                return True
+            except RuntimeError, e:
+                logging.debug("Doesn't look like a RHEL5.x distro " + str(e))
                 pass
         finally:
             if ignore is not None:




More information about the et-mgmt-tools mailing list