Description of problem: On fc26 I just encountered this: Reinstalling/updating perl to perl-5.24.1-392.fc26 pulls in perl-macros: # dnf reinstall perl ... Reinstalling: perl x86_64 4:5.24.1-392.fc26 updates 6.0 M Installing dependencies: perl-macros x86_64 4:5.24.1-392.fc26 updates 65 k ... Verifying perl requires perl-macros: # rpm -q --requires perl | grep macros perl-macros Now remove perl-macros: # rpm -e perl-macros No warning nor else. Verifying perl-macros actually was removed: # rpm -q perl-macros package perl-macros is not installed However: 1. perl still requires perl-macros: # rpm -q --requires perl | grep macros perl-macros 2. Nobody is providing it: # rpm -q --whatprovides perl-macros no package provides perl-macros 3. dnf also doesn't complain: # dnf repoquery --unsatisfied => I have an unsatisfied/broen "Requires" in my rpmdb, but the tools do not complain about it. WTH ?!? Version-Release number of selected component (if applicable): rpm-4.13.0.1-5.fc26.x86_64 dnf-2.5.1-1.fc26.noarch How reproducible: Always. Steps to Reproduce: see above.
dnf check?
This behaviour is probably correct. Perl has Requires(post): perl-macros This means that perl-macro is only needed during installation and can be removed afterwards.
(In reply to Florian Festi from comment #2) > This behaviour is probably correct. Perl has > > Requires(post): perl-macros > > This means that perl-macro is only needed during installation and can be > removed afterwards. Thanks Florian for looking into it ;)
(In reply to Florian Festi from comment #2) > This behaviour is probably correct. I disagree -> Reopening # rpm -q --requires perl still returns "perl-macros" This means "rpm -q --requires" has been rendered pretty much useless and non-helpful => REGRESSION. > Perl has > > Requires(post): perl-macros That's something I do not understand. It seem complete meaningless to me. I am inclined to consider this to be a packaging bug. > This means that perl-macro is only needed during installation and can be > removed afterwards. I don't understand this.
For this being a regression there has to be a change in behaviour. Can you please point out between which versions of rpm the behaviour changed? The fact that you do not understand something is not a bug in rpm. Please open a bug against the proper component. The same applies to the possible packaging issue in the perl package. PS: You might want to try rpm -qv --requires
(In reply to Florian Festi from comment #5) > For this being a regression there has to be a change in behaviour. Can you > please point out between which versions of rpm the behaviour changed? I am sure, you understand the "friendlyness" you are communicating here :( You are right insofar, as this bug is present in all Fedoras I have access to (back to f23). This of course don't mean much because are using rpm-4.13.x. > The fact that you do not understand something is not a bug in rpm. Well, I do not understand rpm's behavior and perl's packaging. I.e, I consider a) rpm's way of handling "requires(post)" not to make any sense b) perl.spec carrying Requires(post) to a packaging mistake. I.e. I assume a packaging bug in perl.spec is triggering a bug in rpm/dnf.
This is expected behavior, unchanged all the way since rpm 4.0.1 (that'd be sometime during 2001, yes that old) where the fine-grained Requires(pre/post/etc) dependencies were originally introduced. See https://raw.githubusercontent.com/rpm-software-management/rpm/master/doc/manual/tsort for the original rationale. Bottom line, it's a packaging bug, and not an entirely uncommon one at that. "Requires(post): foo" states that the package requires "foo" to be present during execution of %post scriptlet. Nothing more, nothing less. If the package also requires "foo" for it's normal operation then there should be an additional "Requires: foo" for that.
FWIW there's actually an RFE to make dnf take advantage of the fine-grained dependencies as they are implemented, see bug 1381332.