def _check_running_kernel(yb, md_info, msg): kern_pkgtup = misc.get_running_kernel_pkgtup(yb.ts) if kern_pkgtup[0] is None: return found_sec = False for (pkgtup, notice) in md_info.get_applicable_notices(kern_pkgtup): if found_sec or notice['type'] != 'security': continue found_sec = True ipkg = yb.rpmdb.searchPkgTuple(pkgtup) if not ipkg: continue # Not installed ipkg = ipkg[0] e = '' if kern_pkgtup[2] != '0': e = '%s:' % kern_pkgtup[2] rpkg = '%s-%s%s-%s.%s' % (kern_pkgtup[0], e, kern_pkgtup[3], kern_pkgtup[4], kern_pkgtup[1]) msg(_('Security: %s is an installed security update') % ipkg) msg(_('Security: %s is the currently running version') % rpkg) break