Bugfixing GPG key error when installing dependencies in linux nodes
authorAlina Quereilhac <alina.quereilhac@inria.fr>
Thu, 24 Oct 2013 14:09:21 +0000 (16:09 +0200)
committerAlina Quereilhac <alina.quereilhac@inria.fr>
Thu, 24 Oct 2013 14:09:21 +0000 (16:09 +0200)
src/nepi/resources/linux/node.py
src/nepi/resources/linux/rpmfuncs.py

index 1163f6d..ece4bd1 100644 (file)
@@ -273,6 +273,8 @@ class LinuxNode(ResourceManager):
             self._os = OSType.FEDORA_12
         elif out.find("Fedora release 14") == 0:
             self._os = OSType.FEDORA_14
+        elif out.find("Fedora release") == 0:
+            self._os = OSType.FEDORA
         elif out.find("Debian") == 0: 
             self._os = OSType.DEBIAN
         elif out.find("Ubuntu") ==0:
index e458cd4..8bc7e14 100644 (file)
@@ -19,7 +19,7 @@
 
 RPM_FUSION_URL = 'http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm'
 RPM_FUSION_URL_F12 = 'http://download1.rpmfusion.org/free/fedora/releases/12/Everything/x86_64/os/rpmfusion-free-release-12-1.noarch.rpm'
-RPM_FUSION_URL_F14 = 'http://download1.rpmfusion.org/free/fedora/releases/14/Everything/i386/os/rpmfusion-free-release-14-0.4.noarch.rpm'
+RPM_FUSION_URL_F14 = 'http://download1.rpmfusion.org/free/fedora/releases/14/Everything/x86_64/os/rpmfusion-free-release-14-0.4.noarch.rpm'
 
 
 # TODO: Investigate using http://nixos.org/nix/
@@ -31,7 +31,7 @@ def install_packages_command(os, packages):
     cmd = install_rpmfusion_command(os)
     if cmd: cmd += " ; "
     cmd += " && ".join(map(lambda p: 
-            " { rpm -q %(package)s || sudo -S yum -y install %(package)s ; } " % {
+            " { rpm -q %(package)s || sudo -S yum --nogpgcheck -y install %(package)s ; } " % {
                     'package': p}, packages))
     
     #cmd = { rpm -q rpmfusion-free-release || sudo -s rpm -i ... ; } && { rpm -q vim || sudo yum -y install vim ; } && ..
@@ -51,14 +51,17 @@ def remove_packages_command(os, packages):
 def install_rpmfusion_command(os):
     from nepi.resources.linux.node import OSType
 
-    cmd = " { rpm -q rpmfusion-free-release ||  sudo -S rpm -i %(package)s ; } "
+    cmd = " { rpm -q rpmfusion-free-release || sudo -S rpm -i %(package)s ; } "
 
     if os in [OSType.FEDORA, OSType.FEDORA_12]:
         # For f12
         cmd =  cmd %  {'package': RPM_FUSION_URL_F12}
     elif os == OSType.FEDORA_14:
-        # For f13+
+        # For f14
         cmd = cmd %  {'package': RPM_FUSION_URL_F14}
+    elif os == OSType.FEDORA:
+        # For f14+
+        cmd = cmd %  {'package': RPM_FUSION_URL}
     else:
         # Fedora 8 is unmaintained 
         cmd = ""