#931 Koji hub will not render weak dependencies on an EL7.5 host, even though host rpm can read them
Closed: Fixed 6 years ago Opened 6 years ago by ngompa.

In RHEL/CentOS 7.5, RPM received a backport to comprehend weak dependency tags from RPM 4.12.

Per the changelog entry for rpm-4.11.3-32.el7:

* Mon Nov 13 2017 Panu Matilainen <pmatilai@redhat.com> - 4.11.3-32
  - Backport weak dependency tag definitions (#1508538)

Consequently, Koji should be able to express weak dependency information in RPMs when running on an EL7.5 system.

However, the check in koji as of right now only checks for rpm >= 4.12.0 before it'll attempt to read them. Koji should be smarter and do some kind of tag support check to determine whether it can read them.


Rather than check the rpm version, we should be able to check if rpmlib has the needed constants. E.g.

 hasattr(rpm, 'RPMTAG_SUGGESTFLAGS')

Actually, _get_header_field() is already effectively checking for us. I think we can just trap the error and, if the header name is in the opt_dep list, just return [].

The usage of koji.RPM_SUPPORTS_OPTIONAL_DEPS also needs some rethinking. It should probably just ask the hub for all the headers it wants (and oh boy is it really makeing a call for each header?) and let the hub figure it out. The web doesn't read the rpms, so it shouldn't matter which version of rpm the web has.

Metadata Update from @tkopecek:
- Issue set to the milestone: 1.17

5 years ago

Log in to comment on this ticket.

Metadata