Bug 153189 - rhn_check errors when removing package scheduled through RHN
Summary: rhn_check errors when removing package scheduled through RHN
Keywords:
Status: CLOSED DUPLICATE of bug 155569
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: up2date
Version: 4.0
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Adrian Likins
QA Contact: Max Spevack
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-04-02 11:55 UTC by Lee Wilson
Modified: 2007-11-30 22:07 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-05-13 18:08:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Lee Wilson 2005-04-02 11:55:12 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.6) Gecko/20050321 Firefox/1.0.2

Description of problem:
When running rhn_check to run a scheduled package removal though Red Hat Network the client produces a traceback as follows (with the -v switch):-

[root@workstation RPMS]# rhn_check -v
packages.remove ([['gaim', '1.1.4', '1.EL4', '1']],)
Traceback (most recent call last):
  File "/usr/sbin/rhn_check", line 174, in run_action
    (status, message, data) = do_call(method, params)
  File "/usr/sbin/rhn_check", line 91, in do_call
    retval = apply(method, params)
  File "/usr/share/rhn/actions/packages.py", line 83, in remove
    up2date.removePackages(pkgList, rpmCallback)
  File "/usr/share/rhn/up2date_client/up2date.py", line 1009, in removePackages
    runTransaction(ts,rpmCallback)
TypeError: runTransaction() takes at least 4 arguments (2 given)


Version-Release number of selected component (if applicable):
up2date-4.4.5.6-2

How reproducible:
Always

Steps to Reproduce:
1. Login to RHN
2. Bring up the details of a system
3. Select Packages->List/Remove Installed Packages
4. Tick one of the packages (I Tried gaim & firefox seperately)
5. Click Remove Packages
6. Then Confirm
7. Go onto Schedule to confirm it is set to run
8. Run "rhn_check -v" as root from the selected workstation, should get a similar trace back to me.
  

Actual Results:  Package was not removed.

Expected Results:  Selected package(s) should have been removed from the selected system(s)

Additional info:

Problem seems to be due to the runTransaction call in the removePackages function in the up2date.py file.  It uses the following call to remove the packages:-

       runTransaction(ts,rpmCallback)

This has 2 less arguments that other similar calls to runTransaction.  For example installPackages looks like this:-

runTransaction(ts, added, removed,rpmCallback, rollbacktrans = rollbacktrans)

The severity of this bug could be debated as it may also class as a security issue in certain situation.  For example needed to remove a very buggy bit of software from many systems or one which is not likely to be fixed in the short term and therefore needs to be remove from every system.

Comment 1 Lee Wilson 2005-04-02 12:10:11 UTC
Adding the following lines to /usr/share/rhn/up2date_client/up2date.py at line
964 , just after "def removePackages" function definition

 added = []
 removed = []

and then changing the function call at line 1011 to:-

runTransaction(ts, added, removed ,rpmCallback)

Seems to fix the immediate problem, but I don't believe it checks the
dependancies so may need someone with a bit more knowledge to figure out a
complete solution. As long as specify all the deps to be removed as well seems
to work okay.

Comment 2 Max Spevack 2005-04-04 14:49:54 UTC
alikins -- I have reproduced this bug as well.

It exists in the following versions of up2date:

4.4.5-1 (rhel-4 gold)
4.4.5.4-1
4.4.5.6-2 (the version we just released with the other fixes)

Setting this to block rhn400 (though it may need to be fixed faster) and adding
misa to the cc list.

Comment 3 Adrian Likins 2005-05-13 18:08:08 UTC

*** This bug has been marked as a duplicate of 155569 ***


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