Bug 16303
Summary: | rpm "freshen" behaves differently in 3.0.5 | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | jrjohns |
Component: | rpm | Assignee: | Jeff Johnson <jbj> |
Status: | CLOSED WORKSFORME | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 6.2 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2000-08-16 01:50:25 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: |
Description
jrjohns
2000-08-15 23:57:26 UTC
Look at the script /usr/lib/rpm/freshen.sh from rpm-3.0.4 and earlier to see how to test if a package needs freshening (i.e. package with same name is already installed and later version is available). There is still a condition left unhandled. There are four conditions, 3 of them were errors with rpm v3.0.3: Condition 1: File needs to be freshened. Condition 2: The current version is already installed. Condition 3: NO version of this package is installed. Condition 4: A newer version of this package is already installed. I expect status 0 from condition 1. I can catch conditions 2 and 3 using 'query' as demonstrated in the /usr/lib/rpm/freshen.sh file. The fourth condition was always handled completely by RPM, and I can't catch it using a query operation. Under rpm v3.0.3, if 'freshen.sh' could not determine that the file either doesn't apply, or the current version is already installed, it passed its arguments to 'rpm' as an upgrade operation. Under rpm v3.0.3, the behavior was as follows: # rpm -q pam pam-0.72-20 # rpm --freshen pam-0.68-10.i386.rpm package pam-0.72-20 (which is newer then pam-0.68-10) is already installed # echo $? 2 The new v3.0.5 rpm doesn't do that. It returns no error message and a status of 0. This case really should be an error condition. # rpm -q pam pam-0.72-20 # rpm --freshen pam-0.68-10.i386.rpm # echo $? 0 Note: If I try -U, I get the expected response. # rpm -U pam-0.68-10.i386.rpm package pam-0.72-20 (which is newer then pam-0.68-10) is already installed # echo $? 2 The difference in behavior is a result of rolling "freshen" into the rpm program but not staying consistent with the error handling of an "upgrade" (when freshen was originally just a front-end to upgrade, and thus inherited its error conditions). I do appreciate the quick response and advice, and I hope my above description clarifies the situation better than the initial report. My output for "rpm -U" for rpm v3.0.5 in the above example isn't precisely accurate. The grammatical error of "newer then" present in v3.0.3 was corrected to say "newer than" in v3.0.5. rpm-3.0.5 is no longer supported. Please feel free to open a new bug against rpm-4.0.3, as --freshen behaves the same way as it does in rpm-3.0.5. |