#2343 kojid: use mergerepo_c for all merge modes
Closed by mikem. Opened by tkopecek.
tkopecek/koji issue2183  into  master

Download 2343.patch

Fixes: https://pagure.io/koji/issue/2183

This is supposed to be 0.15.11, right?

@ngompa according to https://pagure.io/koji/pull-request/2184#comment-117942 it should be 0.15.1

LGTM,

For the version problem.
I checked the changelog of createrepo_c again
simple mode support PR has been included since 1.13.0: https://github.com/rpm-software-management/createrepo_c/commit/51bd780883fa0e925ac0898754948af951fb9724

0.15.1 might only include the man page change

1 new commit added

  • fix required version

updated requirement to 0.13.0

:thumbsup:

edited: sorry, I didn't check the packaging part. See the comments below

Metadata Update from @julian8628:
- Pull-request tagged with: testing-ready

the -gt comparison doesn't support decimal. I think it should be "%.1s" here to only compare major version

[ "$(PYVER)" -gt 2 ] > [ "$(PYVER)" -lt 3 ]?

Metadata Update from @julian8628:
- Pull-request untagged with: testing-ready

rebased onto d636328e9bef97c7712b30253f9d5cc44ae71963

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

:thumbsup:

version is not assigned here.

lazy initialized version and some fix for sanity checks:
https://pagure.io/fork/julian8628/koji/commits/pr2343

@mikem @tkopecek please review

https://pagure.io/fork/julian8628/koji/commits/pr2343

I don't think we need to memo-ize the version check.

Regarding current version of this PR:

  • nit: the variable version could be more clearly named
  • calling self._get_mergerepo_c_version more than once in a single pathway
  • on python2, when use_createrepo_c is False, we should use mergerepos script rather than error
  • while mergerepo_c has a pretty stable history for its Version: output, I feel like we should be ready to handle different behavior when calling external commands.
  • we should probably document that mergerepo_c will be used on python3 even if createrepo_c is False.

Most of the above addressed here:
https://github.com/mikem23/koji-playground/commits/pagure/pr/2343

Metadata Update from @jcupova:
- Pull-request tagged with: testing-done

Most of the above addressed here:
https://github.com/mikem23/koji-playground/commits/pagure/pr/2343

3 trivial fixes here:
https://pagure.io/fork/julian8628/koji/commits/pr2343-2

  • safe convertion from tuple to str for error msg
  • do not break things when mergerepo_c version is not detectable
  • fix flake8 for regex pattern warning

one more fix - https://pagure.io/fork/julian8628/koji/c/f08df379bbdc45929fa3c2a52a67ead9dd99f54d?branch=pr2343-2

to ignore Exception the sub-process raises, like: /usr/bin/mergerepo_c does not exist

I've combined these into a new PR since the diff is getting substantial: #2376

Closing this in favor of #2376

Pull-Request has been closed by mikem

Metadata