[Yum-devel] [PATCH] Filter empty provides/etc. in the non-pritable case too.
Seth Vidal
skvidal at fedoraproject.org
Thu May 13 18:52:06 UTC 2010
On Thu, 13 May 2010, James Antill wrote:
> ---
> yum/packages.py | 4 +---
> 1 files changed, 1 insertions(+), 3 deletions(-)
>
> diff --git a/yum/packages.py b/yum/packages.py
> index d603886..5e897ba 100644
> --- a/yum/packages.py
> +++ b/yum/packages.py
> @@ -398,8 +398,6 @@ class RpmBase(object):
> if printable:
> results = []
> for prco in prcos:
> - if not prco[0]: # empty or none or whatever, doesn't matter
> - continue
> results.append(misc.prco_tuple_to_string(prco))
> return results
>
> @@ -1233,7 +1231,7 @@ class YumHeaderPackage(YumAvailablePackage):
> for tag in tag2prco:
> name = hdr[getattr(rpm, 'RPMTAG_%sNAME' % tag)]
> name = map(misc.share_data, name)
> - if name is None:
> + if not name: # empty or none or whatever, doesn't matter
> continue
>
> lst = hdr[getattr(rpm, 'RPMTAG_%sFLAGS' % tag)]
> --
> 1.7.0.1
>
I don't see why you remove the first one. They do not entirely cover the
same cases.
I've got no problem with adding the second one - but I think we need to
keep the first.
-sv
More information about the Yum-devel
mailing list