Bug 43819

Summary: incorrect scripts in the %post section cause update problems
Product: [Retired] Red Hat Linux Reporter: Need Real Name <peter>
Component: rpm-buildAssignee: Jeff Johnson <jbj>
Status: CLOSED NOTABUG QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: 7.1   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-06-07 10:02:42 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 Need Real Name 2001-06-07 10:02:39 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.4.2-2 i686)

Description of problem:
If there is a bug in the post script and you upgrade a package (rpm -U
package-2.0-1.rpm), the previous version (package-1.0-1.rpm) of the package
won't be deleted and the new version is installed. So you have two versions
of the same software installed: "rpm -qa" gives package-1.0-1.rpm AND
package-2.0-1.rpm. 
RPM gives a message that there's a problem in the script, but the package
is installed anyway and the older version is not replaced.

How reproducible:
Always

Steps to Reproduce:
1. Create a package (name: test, version 1.0).
2. Create a package (name: test, version 2.0) with a buggy %post script
3. rpm -i test-1.0-1.rpm
4. rpm -U test-2.0-1.rpm
5. rpm -qa | grep test	

Actual Results:  rpm -qa | grep test results in
test-1.0-1.rpm
test-2.0-1.rpm

Expected Results:  rpm -qa | grep test results in
test-2.0-1.rpm
or in
test-1.0-1.rpm (package is not updated because of errors in the post
script)

Additional info:

Comment 1 Jeff Johnson 2001-06-07 13:07:47 UTC
You need to erase both packages
	rpm -e --allmatches package


Comment 2 Need Real Name 2001-06-08 07:18:21 UTC
If I delete the old package and install the new one, all config-files will be
lost and an RPM update makes no sense.