Description of problem: rpm-4.8.0-0.beta1.5.i686 yum-3.2.25-8.fc13.noarch jadetex-3.13-8.fc12.noarch On my system: [root@localhost ~]# env LANG=C yum check jadetex-3.13-8.fc12.noarch missing requires policycoreutils Error: check all However: [root@localhost ~]# env LANG=C rpm -q --whatrequires policycoreutils no package requires policycoreutils Actually: [tasaka1@localhost ~]$ rpm -qv --requires jadetex interp: /bin/sh post: /bin/sh postun: /bin/sh manual: jade post: policycoreutils rpmlib: rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib: rpmlib(FileDigests) <= 4.6.0-1 rpmlib: rpmlib(PayloadFilesHavePrefix) <= 4.0-1 manual: sgml-common >= 0.5 manual: tex(latex) manual: texlive post: texlive rpmlib: rpmlib(PayloadIsXz) <= 5.2-1 So policycoreutils is required as Requires(post) and as far as I am correct rpm allows to remove dependency for Requires(post) once the package (in this case jadetex) is correctly installed (like my current system). I think as rpm reports that "no package requires policycoreutils" yum should not report dependency for Requires(post) or so with "yum check"
Well yum check operates on the same data the rest of yum has, so if "yum remove" wouldn't work then "yum check" will complain about it. I guess you could change this to an RFC that yum should know about the post flag, but that'd require huge changes (and I'm not sure we can tell if it's just Require(post) or if you've got Require(postun), the later mneaning we can't remove it).
Well, with a short test it seems that dependency for Requires(pre) and Requires(post) can be removed after installing a rpm completes, however the dependency for Requires(preun) or Requires(postun) cannot be removed. Now changing to RFE.
Created attachment 381999 [details] test spec file: dep1
Created attachment 382000 [details] test spec file: dep2 With the attached dep1.spec and dep2.spec, # rpm -ivh dep1 dep2 # rpm -e dep2 # yum remove dep1 shows the following messages: [root@localhost noarch]# env LANG=C yum -y remove dep1 Setting up Remove Process Resolving Dependencies --> Running transaction check ---> Package dep1.noarch 0:0-1.fc set to be erased --> Finished Dependency Resolution Dependencies Resolved ================================================== Package Arch Version Repository Size ================================================== Removing: dep1 noarch 0-1.fc installed 0.0 Transaction Summary ================================================== Remove 1 Package(s) Reinstall 0 Package(s) Downgrade 0 Package(s) Downloading Packages: Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Warning: RPMDB altered outside of yum. dep1-0-1.fc.noarch missing requires dep2 jadetex-3.13-8.fc12.noarch missing requires policycoreutils Erasing : dep1-0-1.fc.noarch 1/1 Removed: dep1.noarch 0:0-1.fc Complete!
Ok, writing a quick test program: http://james.fedorapeople.org/yum/commands/rpm-dump-prco.py ...we seem to have all the data we need, now we "just" have to change all the yum internals to keep it around and add it to the repo metadata.
This forgotten bug has actually been long since fixed via what is essentially a dupe of this (bug 785690). The bogus error is now gone: [root@localhost rpm]# rpm -Uvh /home/pmatilai/rpmbuild/RPMS/noarch/dep2-0-1.fc18.noarch.rpm /home/pmatilai/rpmbuild/RPMS/noarch/dep1-0-1.fc18.noarch.rpm Preparing... ################################# [100%] Updating / installing... 1:dep2-0-1.fc18 ################################# [ 50%] 2:dep1-0-1.fc18 ################################# [100%] [root@localhost rpm]# rpm -e dep2 [root@localhost rpm]# yum check Loaded plugins: langpacks, presto, refresh-packagekit, tsflags check all [root@localhost rpm]# yum remove dep1 Loaded plugins: langpacks, presto, refresh-packagekit, tsflags Resolving Dependencies --> Running transaction check ---> Package dep1.noarch 0:0-1.fc18 will be erased --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Removing: dep1 noarch 0-1.fc18 installed 0.0 Transaction Summary ================================================================================ Remove 1 Package Installed size: 0 Is this ok [y/N]: y Downloading Packages: Running Transaction Check Running Transaction Test Transaction Test Succeeded Running Transaction Warning: RPMDB altered outside of yum. Erasing : dep1-0-1.fc18.noarch 1/1 Verifying : dep1-0-1.fc18.noarch 1/1 Removed: dep1.noarch 0:0-1.fc18 Complete! [root@localhost rpm]# *** This bug has been marked as a duplicate of bug 785690 ***