[Yum-devel] yum-security plugin review, possible merge into yum-utils?

James Antill jantill at redhat.com
Tue May 15 14:39:34 UTC 2007


On Tue, 2007-05-08 at 09:51 +0200, Tim Lauridsen wrote:

> I have added the latest 2 patches to the security plugin in yum-utils
> CVS, please checkout that every thing works as expected.
> 
 Sorry, here's another one.

 It seems that on RHEL5 there are update metadata entries with
references == None (in my FC6 testing they were always == []). This
gives a traceback with the current code. The current CVS version plus
the following patch, which basically does:

def ysp__safe_refs(refs):
    """ Sometimes refs == None, if so return the empty list here. 
        So we don't have to check everywhere. """
    if refs == None:
        return []
    return refs

...around every access of md['references'], works fine.

 You didn't break it, and I'm not 100% sure this can happen on Fedora
7 ... but it's better to be safe :). I've also included the one liner to
remove the sys.exit() call, which just plays better with the rest of yum
now that zero length transactions are fixed.

 Anyway here is the patch, let me know what you think:

-- 
James Antill <jantill at redhat.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: refs_eq_None_no_exit.patch
Type: text/x-patch
Size: 2025 bytes
Desc: Fix refs == None, and remove sys.exit()
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20070515/c6df6ab8/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20070515/c6df6ab8/attachment.pgp 


More information about the Yum-devel mailing list