[node-patches] Change in ovirt-node[master]: Be even more thorough parsing /etc/ovirt-plugins.d/

rbarry at redhat.com rbarry at redhat.com
Thu Aug 15 17:21:05 UTC 2013


Ryan Barry has uploaded a new change for review.

Change subject: Be even more thorough parsing /etc/ovirt-plugins.d/
......................................................................

Be even more thorough parsing /etc/ovirt-plugins.d/

If we can't figure out which RPM owns a package, see whether or
not there's a package by that name before giving up on the plugins
page.

Change-Id: Iab5fcbae07e2bd9d49c041bca13baa22bde3be07
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=994825
Signed-off-by: Ryan Barry <rbarry at redhat.com>
---
M src/ovirt/node/setup/core/plugins_page.py
1 file changed, 17 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/91/18191/1

diff --git a/src/ovirt/node/setup/core/plugins_page.py b/src/ovirt/node/setup/core/plugins_page.py
index f43cf84..7b31dac 100644
--- a/src/ovirt/node/setup/core/plugins_page.py
+++ b/src/ovirt/node/setup/core/plugins_page.py
@@ -40,7 +40,7 @@
         return "Plugins"
 
     def rank(self):
-        return 300
+        return -1
 
     def ui_content(self):
         all_plugins = self.__list_of_plugins()
@@ -152,6 +152,22 @@
                                     process.check_output(cmd, shell=True
                                                          ).strip()).groups()
                             except CalledProcessError:
+                                pass
+
+                            try:
+                                self.logger.debug("SET 2nd")
+                                cmd = 'rpm -q --qf %%{name} %s' % f
+                                package = process.check_output(cmd.split(' ')
+                                                               ).strip()
+                                cmd = "rpm -q %s --qf 'NAME: %s DATE: \
+                                       %%{version}-%%{release}.%%{arch} INST: \
+                                       %%{INSTALLTIME:date}\\n'" %\
+                                    (package, package)
+                                name, ver, install_date = re.match(
+                                    r'NAME: (.*?) DATE: (.*?) INST: (.*)',
+                                    process.check_output(cmd, shell=True
+                                                         ).strip()).groups()
+                            except CalledProcessError:
                                 continue
 
                     plugin_dict[name] = (ver, install_date)


-- 
To view, visit http://gerrit.ovirt.org/18191
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iab5fcbae07e2bd9d49c041bca13baa22bde3be07
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Ryan Barry <rbarry at redhat.com>



More information about the node-patches mailing list