[Yum-devel] [PATCH] in python 3k (and in the new rpm-python bindings) rpm is returning flags as LONGS not INTS - so this code breaks w/o this fix.

Seth Vidal skvidal at fedoraproject.org
Tue Jun 1 17:13:44 UTC 2010


most importantly it breaks mock
---
 rpmUtils/miscutils.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/rpmUtils/miscutils.py b/rpmUtils/miscutils.py
index 8e46541..b1631ae 100644
--- a/rpmUtils/miscutils.py
+++ b/rpmUtils/miscutils.py
@@ -351,7 +351,7 @@ def formatRequire (name, version, flags):
     '''
     s = name
     
-    if flags and type(flags) == type(0): # Flag must be set and a int
+    if flags and (type(flags) == type(0) or type(flags) == type(0L)): # Flag must be set and a int (or a long, now)
         if flags & (rpm.RPMSENSE_LESS | rpm.RPMSENSE_GREATER |
                     rpm.RPMSENSE_EQUAL):
             s = s + " "
-- 
1.7.0.1



More information about the Yum-devel mailing list