Hi

patch to parse the restart_suggested flag

-- 
Regards

        Michael Calmer

--------------------------------------------------------------------------
Michael Calmer
SUSE LINUX GmbH, Maxfeldstr. 5, D-90409 Nuernberg
T: +49 (0) 911 74053 0
F: +49 (0) 911 74053575  - e-mail: michael.cal...@suse.com
--------------------------------------------------------------------------
SUSE Linux GmbH, GF: Felix Imend├Ârffer, Jane Smithard, Graham Norton,
                     HRB 21284 (AG N├╝rnberg)
>From f84fd62431a4e17187c18c8bca6fe0bab530437a Mon Sep 17 00:00:00 2001
From: Michael Calmer <m...@suse.de>
Date: Thu, 1 Dec 2016 10:33:15 +0100
Subject: [PATCH] parse restart_suggested flag used by openSUSE

This flag indicate an update for the update software itself
---
 yum/update_md.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/yum/update_md.py b/yum/update_md.py
index c674451..d7942db 100644
--- a/yum/update_md.py
+++ b/yum/update_md.py
@@ -77,7 +77,8 @@ class UpdateNotice(object):
             'solution'         : '',
             'references'       : [],
             'pkglist'          : [],
-            'reboot_suggested' : False
+            'reboot_suggested' : False,
+            'restart_suggested' : False
         }
 
         if elem:
@@ -308,7 +309,7 @@ class UpdateNotice(object):
         """
         Parse an individual package::
 
-            <!ELEMENT package (filename, sum, reboot_suggested)>
+            <!ELEMENT package (filename, sum, reboot_suggested, restart_suggested)>
                 <!ATTLIST package name CDATA #REQUIRED>
                 <!ATTLIST package version CDATA #REQUIRED>
                 <!ATTLIST package release CDATA #REQUIRED>
@@ -316,6 +317,7 @@ class UpdateNotice(object):
                 <!ATTLIST package epoch CDATA #REQUIRED>
                 <!ATTLIST package src CDATA #REQUIRED>
             <!ELEMENT reboot_suggested (#PCDATA)>
+            <!ELEMENT restart_suggested (#PCDATA)>
             <!ELEMENT filename (#PCDATA)>
             <!ELEMENT sum (#PCDATA)>
                 <!ATTLIST sum type (md5|sha1) "sha1">
@@ -336,6 +338,8 @@ class UpdateNotice(object):
                 package['sum'] = (child.attrib.get('type'), child.text)
             elif child.tag == 'reboot_suggested':
                 self._md['reboot_suggested'] = True
+            elif child.tag == 'restart_suggested':
+                self._md['restart_suggested'] = True
         return package
 
     def xml(self):
-- 
2.10.0

_______________________________________________
Yum-devel mailing list
Yum-devel@lists.baseurl.org
http://lists.baseurl.org/mailman/listinfo/yum-devel

Reply via email to