Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1382121
Summary: | [bug] requires(preun) and requires(postun) aren't returned by repoquery --requires | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Stephen Gallagher <sgallagh> |
Component: | dnf | Assignee: | rpm-software-management |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | medium | ||
Version: | 25 | CC: | jmracek, mluscon, packaging-team-maint, pmatilai, rpm-software-management, vmukhame |
Target Milestone: | --- | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | dnf-2.4.0-1.fc26 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-05-05 13:34:13 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Stephen Gallagher
2016-10-05 19:20:25 UTC
Unfortunately the full rpm-level Requires(pre,post,preun,postun) dependencies are not available at the repodata level, it only has a notion of "pre-requires" which includes Requires(pre,post) type dependencies. Requires(preun,postun) are considered just regular dependencies in repodata. Dnf cannot query data that just is not there, fixing this would require changes to the repodata format and all the tooling sitting on top of it. (In reply to Panu Matilainen from comment #1) > Unfortunately the full rpm-level Requires(pre,post,preun,postun) > dependencies are not available at the repodata level, it only has a notion > of "pre-requires" which includes Requires(pre,post) type dependencies. > Requires(preun,postun) are considered just regular dependencies in repodata. > > Dnf cannot query data that just is not there, fixing this would require > changes to the repodata format and all the tooling sitting on top of it. OK, just to make sure I parsed that correctly: When I do a `dnf repoquery --requires-pre`, that actually returns both "Requires(pre):" and "Requires(post):" together, and `dnf repoquery --requires` returns all of "Requires:", "Requires(preun):" and "Requires(postun):"? If that's the case, then I can work with that. Thanks! (In reply to Stephen Gallagher from comment #2) > OK, just to make sure I parsed that correctly: > > When I do a `dnf repoquery --requires-pre`, that actually returns both > "Requires(pre):" and "Requires(post):" together, and `dnf repoquery > --requires` returns all of "Requires:", "Requires(preun):" and > "Requires(postun):"? Correctly parsed, that's what I meant. > If that's the case, then I can work with that. Thanks! ...but whether that fully matches with current reality is another question. Looking at sssd-client on F24: [root@sopuli ~]# rpm -qv --requires sssd-client|grep / post,interp: /bin/sh preun,interp: /bin/sh post: /sbin/ldconfig postun: /sbin/ldconfig postun,interp: /sbin/ldconfig post: /usr/sbin/alternatives preun: /usr/sbin/alternatives [root@sopuli ~]# This is what repodata says about it: <rpm:requires> <rpm:entry name="/bin/sh"/> <rpm:entry name="/bin/sh" pre="1"/> <rpm:entry name="/sbin/ldconfig"/> <rpm:entry name="/sbin/ldconfig" pre="1"/> <rpm:entry name="/usr/sbin/alternatives"/> <rpm:entry name="/usr/sbin/alternatives" pre="1"/> ... </rpm:requires> Which does match what I said, half of them are pre-requires and the other half (which would be those preun and postun deps) are not. However dnf-1.1.10-1.fc24.noarch doesn't see *any* of them: [root@sopuli ~]# dnf repoquery --requires sssd-client|grep / [root@sopuli ~]# (In reply to Panu Matilainen from comment #3) > (In reply to Stephen Gallagher from comment #2) > > OK, just to make sure I parsed that correctly: > > > > When I do a `dnf repoquery --requires-pre`, that actually returns both > > "Requires(pre):" and "Requires(post):" together, and `dnf repoquery > > --requires` returns all of "Requires:", "Requires(preun):" and > > "Requires(postun):"? > > Correctly parsed, that's what I meant. > > > If that's the case, then I can work with that. Thanks! > > ...but whether that fully matches with current reality is another question. > Looking at sssd-client on F24: > > [root@sopuli ~]# rpm -qv --requires sssd-client|grep / > post,interp: /bin/sh > preun,interp: /bin/sh > post: /sbin/ldconfig > postun: /sbin/ldconfig > postun,interp: /sbin/ldconfig > post: /usr/sbin/alternatives > preun: /usr/sbin/alternatives > [root@sopuli ~]# > > This is what repodata says about it: > <rpm:requires> > <rpm:entry name="/bin/sh"/> > <rpm:entry name="/bin/sh" pre="1"/> > <rpm:entry name="/sbin/ldconfig"/> > <rpm:entry name="/sbin/ldconfig" pre="1"/> > <rpm:entry name="/usr/sbin/alternatives"/> > <rpm:entry name="/usr/sbin/alternatives" pre="1"/> > ... > </rpm:requires> > > Which does match what I said, half of them are pre-requires and the other > half (which would be those preun and postun deps) are not. However > dnf-1.1.10-1.fc24.noarch doesn't see *any* of them: > > [root@sopuli ~]# dnf repoquery --requires sssd-client|grep / > [root@sopuli ~]# Right, DNF 1.1.10 doesn't have the support for requires(pre); that's been added in DNF 2.0: https://github.com/rpm-software-management/dnf-plugins-core/commit/032c9e971f61ad4e09af98584b39dbbd8122181d In DNF 2.0, it also requires `dnf repoquery --requires-pre`, not just `--requires`. That's a different behavior from yum, but I haven't got an opinion on whether that's an issue for others; for me, I don't care if I have to add an extra flag. Yes, those pre="1" deps missing is expected. But it *should* see the ones without it, so there's a bug somewhere. Based on the repodata, both these: # dnf repoquery --requires sssd-client|grep / and # dnf repoquery --requires-pre sssd-client|grep / ...should return: /bin/sh /sbin/ldconfig /usr/sbin/alternatives If that's the case in dnf 2.0 then good, dnf 1.1.10 is buggy wrt --requires at least. On Rawhide just now: # dnf repoquery --requires sssd-client Last metadata expiration check: 0:21:35 ago on Thu Oct 06 08:43:41 2016 EDT. libc.so.6(GLIBC_2.14)(64bit) libc.so.6(GLIBC_2.8) libcom_err.so.2 libcom_err.so.2()(64bit) libk5crypto.so.3 libk5crypto.so.3()(64bit) libkrb5.so.3 libkrb5.so.3()(64bit) libkrb5.so.3(krb5_3_MIT) libkrb5.so.3(krb5_3_MIT)(64bit) libpam.so.0 libpam.so.0()(64bit) libpam.so.0(LIBPAM_1.0) libpam.so.0(LIBPAM_1.0)(64bit) libpam.so.0(LIBPAM_EXTENSION_1.0) libpam.so.0(LIBPAM_EXTENSION_1.0)(64bit) libpam.so.0(LIBPAM_MODUTIL_1.0) libpam.so.0(LIBPAM_MODUTIL_1.0)(64bit) libpthread.so.0 libpthread.so.0()(64bit) libpthread.so.0(GLIBC_2.0) libpthread.so.0(GLIBC_2.12) libpthread.so.0(GLIBC_2.12)(64bit) libpthread.so.0(GLIBC_2.2) libpthread.so.0(GLIBC_2.2.5)(64bit) libsss_idmap.so.0 libsss_idmap.so.0()(64bit) libsss_idmap.so.0(SSS_IDMAP_0.4) libsss_idmap.so.0(SSS_IDMAP_0.4)(64bit) libsss_nss_idmap.so.0 libsss_nss_idmap.so.0()(64bit) libsss_nss_idmap.so.0(SSS_NSS_IDMAP_0.0.1) libsss_nss_idmap.so.0(SSS_NSS_IDMAP_0.0.1)(64bit) rtld(GNU_HASH) # dnf repoquery --requires-pre sssd-client Last metadata expiration check: 0:21:40 ago on Thu Oct 06 08:43:41 2016 EDT. /bin/sh /sbin/ldconfig /usr/sbin/alternatives So it looks like you're right; the preun and postun stuff isn't showing up in the regular --requires, which is probably a bug. Shall we retitle this BZ? (In reply to Stephen Gallagher from comment #6) > So it looks like you're right; the preun and postun stuff isn't showing up > in the regular --requires, which is probably a bug. Shall we retitle this BZ? Might as well do, at least there's plenty of information here already :) There are 2 kind of bugs. 1) (most probably in librepo) that it filters out post/postun/etc. from --requires 2) it's not completely compatible with yum-repoquery, so I think we will merge output back to --requires Here is the patch that should help https://github.com/rpm-software-management/libdnf/pull/279 dnf-plugins-core-2.0.0-1.fc26 libdnf-0.8.2-1.fc26 dnf-2.4.0-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-4e95959f0d dnf-2.4.0-1.fc26 dnf-plugins-core-2.0.0-1.fc26 dnf-plugins-extras-2.0.0-1.fc26 libdnf-0.8.2-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-4e95959f0d dnf-2.4.0-1.fc26, dnf-plugins-core-2.0.0-1.fc26, dnf-plugins-extras-2.0.0-1.fc26, libdnf-0.8.2-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-4e95959f0d dnf-2.4.0-1.fc26, dnf-plugins-core-2.0.0-1.fc26, dnf-plugins-extras-2.0.0-1.fc26, libdnf-0.8.2-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report. |