[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.

James Antill james at fedoraproject.org
Fri Jul 15 15:37:00 UTC 2011


On Fri, 2011-07-15 at 11:22 -0400, Seth Vidal wrote:
> ---
>  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

 It might be worth making that 'pre != "0"', just in case ... but I'm
not too bothered. ACK.



More information about the Yum-devel mailing list