[Yum-devel] [PATCH 2/2] the "0" string of pre returns as valid on the if pre check. So turn it into a check for "1" so our requires don't always include pre="0" when they don't really need to.

Seth Vidal skvidal at fedoraproject.org
Fri Jul 15 15:22:27 UTC 2011


---
 yum/packages.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/yum/packages.py b/yum/packages.py
index 5ef9951..4b1265c 100644
--- a/yum/packages.py
+++ b/yum/packages.py
@@ -1217,7 +1217,7 @@ class YumAvailablePackage(PackageObject, RpmBase):
                     prcostring += ''' ver="%s"''' % misc.to_xml(v, attrib=True)
                 if r:
                     prcostring += ''' rel="%s"''' % misc.to_xml(r, attrib=True)
-            if pre:
+            if pre == "1":
                 prcostring += ''' pre="%s"''' % pre
                     
             prcostring += "/>\n"
-- 
1.7.4.4



More information about the Yum-devel mailing list