Bug 444099 - RHN plugin doesn't init repos. for the clean command, so yum clean cannot remove anything
Summary: RHN plugin doesn't init repos. for the clean command, so yum clean cannot rem...
Keywords:
Status: CLOSED DUPLICATE of bug 441265
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: yum-rhn-plugin
Version: 5.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: John Matthews
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-04-24 23:22 UTC by Ben Levenson
Modified: 2009-06-08 13:25 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-05-19 19:34:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ben Levenson 2008-04-24 23:22:22 UTC
Description of problem:

yum-3.0.1-5.el5

yum clean {all,headers,packages} does not remove *

[root@localhost RPMS]# ls /var/cache/yum/rhel-i386-client-5/packages/
openoffice.org-base-...rpm

[root@localhost RPMS]# yum clean all
Loading "installonlyn" plugin
Loading "security" plugin
Loading "rhnplugin" plugin
Cleaning up Everything

[root@localhost RPMS]# ls /var/cache/yum/rhel-i386-client-5/packages/
openoffice.org-base-...rpm

[root@localhost RPMS]# yum clean packages
Loading "installonlyn" plugin
Loading "security" plugin
Loading "rhnplugin" plugin
0 packages removed

[root@localhost RPMS]# ls /var/cache/yum/rhel-i386-client-5/packages/
openoffice.org-base...rpm

same with headers

Comment 1 James Antill 2008-04-25 00:19:37 UTC
 Please test 3.2.8 from 5.2-Beta, also run "yum repolist" to make sure that repo
is enabled ... unless that's what the bug is about?


Comment 2 Ben Levenson 2008-04-25 00:43:44 UTC
It fails w/ 3.2.8 too.  
The repo was enabled.  I used yum to download those rpms from rhn
(rhel-i386-client-5) immediately before trying yum clean.

Comment 3 James Antill 2008-04-25 14:16:01 UTC
 Ok, I can't reproduce this ... I just get "N packages removed" where N is the
number of files in /var/cache/yum/rhel-x86_64-server-5/packages/

 Can you strace the yum call? and/or add some debugging to __init__.py?


Comment 4 James Antill 2008-04-25 14:19:29 UTC
 Also maybe try something like:

for i in $(seq 1 1000); do
  touch /var/cache/yum/rhel-x86_64-server-5/packages/foo$i.rpm
done

...and see if "yum clean packages" gets rid of them (i.e. see if it's just that
openoffice.org-base file? Actually can you give a full "ls -l" output for that file?


Comment 5 James Antill 2008-04-29 14:32:45 UTC
 Ben, ping?


Comment 6 Jason Smith 2008-04-30 22:18:40 UTC
Is this supposed to work with RHN?  It appears to have been intentionally
disabled in /usr/lib/yum-plugins/rhnplugin.py:

     71     # We might not have an opt parser (ie in pirut)
     72     opt_parser = conduit.getOptParser()
     73     if opt_parser:
     74         (opts, commands) = opt_parser.parse_args()
     75 
     76         if len(commands) > 0 and commands[0] == 'clean':
     77             conduit.info(10, _("Cleaning") +
     78                 "\n" + RHN_DISABLED)
     79             return
     80 

# rpm -qf /usr/lib/yum-plugins/rhnplugin.py
yum-rhn-plugin-0.5.2-5.el5_1.2.noarch

and to make matters worse, yum only tells you that that it was disabled when you
turn on debugging:

# yum -d 10 clean all
Loading "rhnplugin" plugin
Loading "installonlyn" plugin
Running "config" handler for "installonlyn" plugin
Running "init" handler for "rhnplugin" plugin
Cleaning
RHN support will be disabled.
Yum Version: 3.0.1
COMMAND: yum -d 10 
Installroot: /
Ext Commands:

   all
Cleaning up Everything


Comment 7 James Antill 2008-05-01 01:41:59 UTC
 Indeed, I hadn't thought it would be an RHN plugin problem. The GA version
works doesn't have this code, but even the latest update in
"rhel-x86_64-server-5" is broken. Changing the test for "clean" to "xclean"
fixes the clean command, as the RHN repos. are present again.


Comment 8 RHEL Program Management 2008-05-01 01:44:32 UTC
This bugzilla has Keywords: Regression.  

Since no regressions are allowed between releases, 
it is also being proposed as a blocker for this release.  

Please resolve ASAP.

Comment 14 John Matthews 2008-05-19 19:34:38 UTC

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

Comment 15 Jason Smith 2008-05-19 20:15:40 UTC
I cannot access bug #441265.  Can I be granted access so that I may know when &
how this bug will be resolved?

Thanks,
~Jason



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