[Yum-devel] [PATCH] - don't include requirements in the metadata when the pkg provides it for itself.

Tim Lauridsen tim.lauridsen at googlemail.com
Thu Oct 29 05:36:13 UTC 2009


On 10/28/2009 04:30 PM, Seth Vidal wrote:
> ---
>   yum/packages.py |    9 +++++++++
>   1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/yum/packages.py b/yum/packages.py
> index 71430fd..d9baa59 100644
> --- a/yum/packages.py
> +++ b/yum/packages.py
> @@ -998,6 +998,15 @@ class YumAvailablePackage(PackageObject, RpmBase):
>           for (name, flags, (e,v,r),pre) in mylist:
>               if name.startswith('rpmlib('):
>                   continue
> +            # this drops out requires that the pkg provides for itself.
> +            if name in self.provides_names:
> +                if not flags:
> +                    print 'skipping req %s' % name
> +                    continue
> +                else:
> +                    if self.checkPrco('provides', (name, flags, (e,v,r))):
> +                        print 'skipping req w/flags %s' % name
> +                        continue
>               prcostring = '''<rpm:entry name="%s"''' % misc.to_xml(name, attrib=True)
>               if flags:
>                   prcostring += ''' flags="%s"''' % misc.to_xml(flags, attrib=True)
>    

Looks good

Tim


More information about the Yum-devel mailing list