rpm-software-management / createrepo_c

C implementation of the createrepo.
http://rpm-software-management.github.io/createrepo_c
GNU General Public License v2.0
102 stars 93 forks source link

mergerepo_c does not implement comps merging #301

Open ignatenkobrain opened 2 years ago

ignatenkobrain commented 2 years ago

Very simple mergerepo_c --repo http://mirror.stream.centos.org/9-stream/BaseOS/x86_64/os/ --repo http://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/ -o tmp -v can reproduce this issue.

…
type group added to list from path: http://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/repodata/2bde0d29ee40944dcbf89c734172ecc96c2bff766977132e7d86dbcf1fdf7663-comps-AppStream.x86_64.xml 
…
15:37:27: cr_download: Successfully downloaded: /tmp/createrepo_c_tmp_repo_M6lQkn/repodata/2bde0d29ee40944dcbf89c734172ecc96c2bff766977132e7d86dbcf1fdf7663-comps-AppStream.x86_64.xml
…
type group added to list from path: /tmp/createrepo_c_tmp_repo_M6lQkn/repodata/2bde0d29ee40944dcbf89c734172ecc96c2bff766977132e7d86dbcf1fdf7663-comps-AppStream.x86_64.xml 
…
type group added to list from path: http://mirror.stream.centos.org/9-stream/BaseOS/x86_64/os/repodata/a37577dc74011c2870ad2469ceda42a2c1c27cd6a7bced18255b4706d4461e2b-comps-BaseOS.x86_64.xml 
…
15:37:28: cr_download: Successfully downloaded: /tmp/createrepo_c_tmp_repo_QHITzu/repodata/a37577dc74011c2870ad2469ceda42a2c1c27cd6a7bced18255b4706d4461e2b-comps-BaseOS.x86_64.xml
…
type group added to list from path: /tmp/createrepo_c_tmp_repo_QHITzu/repodata/a37577dc74011c2870ad2469ceda42a2c1c27cd6a7bced18255b4706d4461e2b-comps-BaseOS.x86_64.xml 
…

It loads all necessary ones, yes. But then:

15:37:28: Using groupfile: tmp/.repodata/a37577dc74011c2870ad2469ceda42a2c1c27cd6a7bced18255b4706d4461e2b-comps-BaseOS.x86_64.xml

And then never merges it with AppStream.


Also note that --nogroup is well-documented option… That's not implemented at all (I mean, it works by default :trollface:).

Conan-Kudo commented 2 years ago

@kontura could you please take a look at this?

kontura commented 2 years ago

I am not sure we are going to be able to fix this any time soon.

We would have to add a new dependency on something like libcomps (which I don't think we want) and even still I believe there isn't any defined way how groups should be merged (how to merge two repos if both contain definitions for the same group name with different content). DNF has this problem as well and it prioritizes repos by alphabetic order. :slightly_frowning_face:

We could definitely fix the documentation to reflect the current state though.