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

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

 



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@xxxxxxxxxxxxxxxxx>


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:


[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