#116 Wrong description used for source packages
Opened 3 years ago by tpokorra. Modified 2 years ago

I noticed, that packages have wrong descriptions, from sub packages:
eg. https://src.fedoraproject.org/rpms/libkolabxml
shows

Java bindings for libkolabxml 

This is the description of the sub package: java-kolabformat

I enabled the source repository for rawhide, and checked yum info libkolabxml, and the correct description is displayed.

Description  : The libkolabxml parsing library interprets Kolab XML formats (xCal, xCard)
             : with bindings for Python, PHP and other languages. The language bindings
             : are available through sub-packages.

I tried to understand https://pagure.io/mdapi/blob/master/f/mdapi-get_repo_md, and downloaded the current primary.sqlite.xz, and checked packages.description, and that looked ok as well. Somehow the script mdapi-get_repo_md picks up the wrong description, or is the problem in https://pagure.io/mdapi/blob/master/f/mdapi/db.py instead?


Several users noticed and notified me about the similar issue with https://src.fedoraproject.org/rpms/sway.

I took a quick look at the code and I believe the problem is that mdapi does not actually read the description of a source package - it pulls description of a first binary package with matching srpm name (first is defined by order of packages in the query result, which seems to be alphabetic). This is done intentionally at https://pagure.io/mdapi/blob/master/f/mdapi/__init__.py#_92 and db.GET_PACKAGE_BY_SRC. It works for a simple packages, not so much for anything with multiple subpackages.

It certainly makes more sense to use srpm descriptions for src.fp.o. Maybe that'd also address a couple of tickets about the invalid versions. I have no idea how much that's going to break though :smile:

Log in to comment on this ticket.

Metadata