Bug 615272

Summary: Yum does not warn if package is not removed
Product: Red Hat Enterprise Linux 5 Reporter: Izidor Matušov <imatusov>
Component: yumAssignee: packaging-team-maint
Status: CLOSED NEXTRELEASE QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: low    
Version: 5.5CC: imatusov, james.antill
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-12 16:50:10 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
A sample specfile
none
Example output on RHEL5.5
none
Better situation on RHEL6.0 Beta none

Description Izidor Matušov 2010-07-16 06:40:06 EDT
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 06:42:21 EDT
Created attachment 432351 [details]
Example output on RHEL5.5
Comment 2 Izidor Matušov 2010-07-16 06:44:44 EDT
Created attachment 432352 [details]
Better situation on RHEL6.0 Beta
Comment 3 seth vidal 2010-07-20 08:35:24 EDT
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 09:07:18 EDT
(In reply to comment #3)

Yes, but right below is a message about success:

Removed:
 xyzpackage.noarch:0.1.1-1.el6                                                                                                            

Complete!
Comment 5 seth vidal 2010-07-20 09:12:14 EDT
just to humor me - could you run:

rpm -e xyzpackage.noarch

on the same system and paste the output?

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

RHEL5.0:
[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

RHEL6.0:
[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 10:17:42 EDT
On the RHEL-6 machine, can you print the "yum history info" for the failed remove?
Comment 8 Izidor Matušov 2010-07-22 04:47:55 EDT
[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 16:50:10 EDT
 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.