Bug 552818
| Summary: | [RFE MD change] yum should know Requires(pre,post) flag for depsolving, and yum check | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Mamoru TASAKA <mtasaka> | ||||||
| Component: | yum | Assignee: | Seth Vidal <skvidal> | ||||||
| Status: | CLOSED DUPLICATE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
| Severity: | medium | Docs Contact: | |||||||
| Priority: | low | ||||||||
| Version: | rawhide | CC: | ffesti, james.antill, maxamillion, pmatilai, tim.lauridsen | ||||||
| Target Milestone: | --- | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | All | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2013-05-30 08:09:51 UTC | Type: | --- | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Attachments: |
|
||||||||
|
Description
Mamoru TASAKA
2010-01-06 08:41:27 UTC
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 *** |