Hide Forgot
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.)
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.
The issue has been fixed in spacewalk master by commit 301b5e92d84c100db9649be36cdae6248857fc94 701189 - make sure cachedir exists
Backported to satellite.git/CLIENT-RHEL-6 as commit d845f23db98d8e30b51c37ffd3d67ded572765a4 701189 - make sure cachedir exists (cherry picked from commit 301b5e92d84c100db9649b
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.
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.
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