[Yum-devel] [PATCH 1/3] Don't output empty <rpm:requires> when there are deps but all are filtered out.

seth vidal skvidal at fedoraproject.org
Thu Apr 7 19:34:44 UTC 2011


On Thu, 2011-04-07 at 22:30 +0300, Ville Skyttä wrote:
> ---
>  yum/packages.py |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/yum/packages.py b/yum/packages.py
> index 5bc8ec9..c0edd01 100644
> --- a/yum/packages.py
> +++ b/yum/packages.py
> @@ -1137,7 +1137,6 @@ class YumAvailablePackage(PackageObject, RpmBase):
>  
>          msg = ""
>  
> -        if mylist: msg = "\n    <rpm:requires>\n"
>          if hasattr(self, '_collapse_libc_requires') and self._collapse_libc_requires:
>              libc_requires = filter(lambda x: x[0].startswith('libc.so.6'), mylist)
>              if libc_requires:
> @@ -1175,7 +1174,8 @@ class YumAvailablePackage(PackageObject, RpmBase):
>              prcostring += "/>\n"
>              msg += prcostring
>              
> -        if mylist: msg += "    </rpm:requires>"
> +        if msg:
> +            msg = "\n    <rpm:requires>\n" + msg + "    </rpm:requires>"
>          return msg
>  
>      def _dump_changelog(self, clog_limit):

this will break old versions of our parsers.

that's there on purpose.


-sv




More information about the Yum-devel mailing list