Bug 43819 - incorrect scripts in the %post section cause update problems
Summary: incorrect scripts in the %post section cause update problems
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm-build
Version: 7.1
Hardware: i686
OS: Linux
medium
low
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-06-07 10:02 UTC by Need Real Name
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-06-07 10:02:42 UTC
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.