Bug 444099 - RHN plugin doesn't init repos. for the clean command, so yum clean cannot remove anything
RHN plugin doesn't init repos. for the clean command, so yum clean cannot rem...
Status: CLOSED DUPLICATE of bug 441265
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: yum-rhn-plugin (Show other bugs)
5.1
All Linux
medium Severity medium
: rc
: ---
Assigned To: John Matthews
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-24 19:22 EDT by Ben Levenson
Modified: 2009-06-08 09:25 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-19 15:34:38 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ben Levenson 2008-04-24 19:22:22 EDT
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-24 20:19:37 EDT
 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-24 20:43:44 EDT
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 10:16:01 EDT
 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 10:19:29 EDT
 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 10:32:45 EDT
 Ben, ping?
Comment 6 Jason Smith 2008-04-30 18:18:40 EDT
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-04-30 21:41:59 EDT
 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 Product and Program Management 2008-04-30 21:44:32 EDT
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 15:34:38 EDT

*** This bug has been marked as a duplicate of 441265 ***
Comment 15 Jason Smith 2008-05-19 16:15:40 EDT
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.