Bug 701189 - `yum clean all` do not clean repomod.xml of a channel
`yum clean all` do not clean repomod.xml of a channel
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum-rhn-plugin (Show other bugs)
6.1
Unspecified Unspecified
medium Severity unspecified
: rc
: ---
Assigned To: Michael Mráka
Martin Minar
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-01 18:50 EDT by Jan Hutař
Modified: 2016-07-03 20:56 EDT (History)
5 users (show)

See Also:
Fixed In Version: yum-rhn-plugin-0.9.1-33.el6
Doc Type: Bug Fix
Doc Text:
When building a list of cached channels, the previous version of rhnplugin failed to verify that a cachedir directory exists. This caused this list to be empty, and any subsequent "yum clean" command therefore ignored these channels. This update adapts rhnplugin to create such a directory when necessary so that the list of cached channels can be successfully created.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-12-06 11:49:23 EST
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 Jan Hutař 2011-05-01 18:50:28 EDT
Description of problem:
`yum clean all` do not remove repomod.xml file of a channel in case cache was filled in a specific way.


Version-Release number of selected component (if applicable):
yum-rhn-plugin-0.9.1-26.el6.noarch
yum-3.2.29-17.el6.noarch
rhnlib-2.5.22-10.el6.noarch
redhat-release-server-6Server-6.1.0.2.el6.x86_64


How reproducible:
always


Steps to Reproduce:
1. # rm -rf /var/cache/yum/*
2. # yum list all >/dev/null
3. # ls /var/cache/yum/x86_64/6Server/beaker-tasks/repomd.xml
4. # ls /var/cache/yum/x86_64/6Server/rhel-x86_64-server-6/repomd.xml
5. # yum clean all
6. # ls /var/cache/yum/x86_64/6Server/beaker-tasks/repomd.xml
7. # ls /var/cache/yum/x86_64/6Server/rhel-x86_64-server-6/repomd.xml


Actual results:
ls commands in 3., 4. and 7. are successful


Expected results:
only ls commands in 3. and 4.


Additional info:
Note: "beaker-tasks" is a common http:// repo, "rhel-x86_64-server-6" is RHN Hosted channel.

Note2: If in step 2. I use `yum upgrade`, `yum clean all` in 5. works as expected (files not found in 6. and 7.)
Comment 2 Šimon Lukašík 2011-07-18 08:32:02 EDT
The cause is that yum list all populates

    /var/cache/yum/x86_64/6Server/rhel-x86_64-server-6/

structure, while it does not creates rhnplugin.repos file.
Comment 3 Michael Mráka 2011-08-02 05:29:27 EDT
The issue has been fixed in spacewalk master by
commit 301b5e92d84c100db9649be36cdae6248857fc94
    701189 - make sure cachedir exists
Comment 4 Michael Mráka 2011-08-02 05:48:00 EDT
Backported to satellite.git/CLIENT-RHEL-6 as
commit d845f23db98d8e30b51c37ffd3d67ded572765a4
    701189 - make sure cachedir exists (cherry picked from commit 301b5e92d84c100db9649b
Comment 7 Michael Mráka 2011-08-10 04:42:05 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
yum-rhn-plugin didn't check whether cache directory exists and silently ignored its non-existence.

This made list of cached channels empty and subsequent yum clean ignored them.

We fixed creation of cached channel list.
Comment 8 Jaromir Hradilek 2011-10-27 12:27:23 EDT
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,5 +1 @@
-yum-rhn-plugin didn't check whether cache directory exists and silently ignored its non-existence.
+When building a list of cached channels, the previous version of rhnplugin failed to verify that a cachedir directory exists. This caused this list to be empty, and any subsequent "yum clean" command therefore ignored these channels. This update adapts rhnplugin to create such a directory when necessary so that the list of cached channels can be successfully created.-
-This made list of cached channels empty and subsequent yum clean ignored them.
-
-We fixed creation of cached channel list.
Comment 9 errata-xmlrpc 2011-12-06 11:49:23 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1664.html

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