Bug 615272 - Yum does not warn if package is not removed
Summary: Yum does not warn if package is not removed
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: yum   
(Show other bugs)
Version: 5.5
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Packaging Maintenance Team
QA Contact: BaseOS QE Security Team
Depends On:
TreeView+ depends on / blocked
Reported: 2010-07-16 10:40 UTC by Izidor Matušov
Modified: 2014-01-21 06:18 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-03-12 20:50:10 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
A sample specfile (467 bytes, text/plain)
2010-07-16 10:40 UTC, Izidor Matušov
no flags Details
Example output on RHEL5.5 (3.78 KB, text/plain)
2010-07-16 10:42 UTC, Izidor Matušov
no flags Details
Better situation on RHEL6.0 Beta (3.72 KB, text/plain)
2010-07-16 10:44 UTC, Izidor Matušov
no flags Details

Description Izidor Matušov 2010-07-16 10:40:06 UTC
Created attachment 432350 [details]
A sample specfile

Description of problem:

After an runtime error in %preun section yum does not warn user about the fail. 

How reproducible:

Steps to Reproduce:
1. Use attached spec to create RPM (you have to create source "something", touching is enough)
2. yum install -y --nogpgcheck xyzpackage-0.1.1-1.*.noarch.rpm
3. yum remove -y xyzpackage 
(error occurs but last lines output assures you about success)
4. yum install -y --nogpgcheck xyzpackage-0.1.1-1.*.noarch.rpm 
(error - there is nothing to update on the package)

Expected results:
No success message on the end of output. A message about problem would be ideal.

Comment 1 Izidor Matušov 2010-07-16 10:42:21 UTC
Created attachment 432351 [details]
Example output on RHEL5.5

Comment 2 Izidor Matušov 2010-07-16 10:44:44 UTC
Created attachment 432352 [details]
Better situation on RHEL6.0 Beta

Comment 3 seth vidal 2010-07-20 12:35:24 UTC
it does warn:

xyzpackage-0.1.1-1.el6.noarch was supposed to be removed but is not!

on rhel6.

Comment 4 Izidor Matušov 2010-07-20 13:07:18 UTC
(In reply to comment #3)

Yes, but right below is a message about success:



Comment 5 seth vidal 2010-07-20 13:12:14 UTC
just to humor me - could you run:

rpm -e xyzpackage.noarch

on the same system and paste the output?


Comment 6 Izidor Matušov 2010-07-21 06:45:02 UTC
rpm alerts an error:

[root@pes-imatusov ~]# rpm -e xyzpackage.noarch
cat: /not/existing/file: No such file or directory
error: %preun(xyzpackage-0.1.1-1.el6.noarch) scriptlet failed, exit status 1

[imatusov@dhcp-2-184 noarch]$ sudo rpm -e xyzpackage.noarch
cat: /not/existing/file: No such file or directory
error: %preun(xyzpackage-0.1.1-1.el6.noarch) scriptlet failed, exit status 1

Comment 7 James Antill 2010-07-21 14:17:42 UTC
On the RHEL-6 machine, can you print the "yum history info" for the failed remove?

Comment 8 Izidor Matušov 2010-07-22 08:47:55 UTC
[imatusov@dhcp-2-184 noarch]$ sudo yum history info
Loaded plugins: refresh-packagekit, rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
Transaction ID : 42
Begin time     : Thu Jul 22 10:46:39 2010
Begin rpmdb    : 1541:9be0d4169511247a145e1c6e06ef755e0f0d606a
End time       :                           (0 seconds)
End rpmdb      : 1541:9be0d4169511247a145e1c6e06ef755e0f0d606a
User           : Izidor Matusov <imatusov>
Return-Code    : Failure: 1
Transaction performed with:
    Installed    rpm-4.8.0-10.el6.x86_64
    Installed    yum-3.2.27-12.el6.noarch
Packages Altered:
 ** Erase        xyzpackage-0.1.1-1.el6.noarch
history info

Comment 9 James Antill 2013-03-12 20:50:10 UTC
 This should be fixed in RHEL-6.

This request was evaluated by Red Hat Engineering for inclusion in a Red 
Hat Enterprise Linux maintenance release.

Red Hat does not currently plan to provide this change in a Red Hat 
Enterprise Linux update release for currently deployed products.

With the goal of minimizing risk of change for deployed systems, and in 
response to customer and partner requirements, Red Hat takes a 
conservative approach when evaluating enhancements for inclusion in 
maintenance updates for currently deployed products. The primary 
objectives of update releases are to enable new hardware platform 
support and to resolve critical defects.

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