Description of problem: When you delete erratum from channel repodata are regenerated except for updateinfo.xml.gz. This file contains metadata of actually deleted erratum. Version-Release number of selected component (if applicable): spacewalk-java-2.3.8-149.el6sat.noarch How reproducible: always Steps to Reproduce: 1. Create channel and push some packages 2. Create erratum from some pushed packages and publish it 3. Repodata in /var/cache/rhn/<channel> looks like -rw-r--r--. 1 root root 13968 Aug 9 03:47 filelists.xml.gz -rw-r--r--. 1 root root 626146 Aug 9 03:47 other.xml.gz -rw-r--r--. 1 root root 3751 Aug 9 03:47 primary.xml.gz -rw-r--r--. 1 root root 1134 Aug 9 03:47 repomd.xml -rw-r--r--. 1 root root 712 Aug 9 03:47 updateinfo.xml.gz 4. Delete created erratum 5. updateinfo.xml.gz isn't modified -rw-r--r--. 1 root root 13649 Aug 9 03:53 filelists.xml.gz -rw-r--r--. 1 root root 625833 Aug 9 03:53 other.xml.gz -rw-r--r--. 1 root root 3305 Aug 9 03:53 primary.xml.gz -rw-r--r--. 1 root root 871 Aug 9 03:53 repomd.xml -rw-r--r--. 1 root root 712 Aug 9 03:47 updateinfo.xml.gz Actual results: updateinfo.xml.gz isn't modified and contains metadata of deleted erratum Expected results: updateinfo.xml.gz should be modified Additional info: repomd.xml does not list updateinfo.xml.gz
I am unable to reproduce this issue. I'm running spacewalk-java-2.6.30-1.git.36.78c3c2e.el6 on RHEL 6.8 system. I'm in /var/cache/rhn/repodata/testchannellabel and see this before and after dir listing: -rw-r--r--. 1 root root 1358 Sep 29 10:56 filelists.xml.gz -rw-r--r--. 1 root root 264 Sep 29 10:56 other.xml.gz -rw-r--r--. 1 root root 1616 Sep 29 10:56 primary.xml.gz -rw-r--r--. 1 root root 1134 Sep 29 10:56 repomd.xml -rw-r--r--. 1 root root 469 Sep 29 10:56 updateinfo.xml.gz -rw-r--r--. 1 root root 859 Sep 29 10:59 filelists.xml.gz -rw-r--r--. 1 root root 219 Sep 29 10:59 other.xml.gz -rw-r--r--. 1 root root 1408 Sep 29 10:59 primary.xml.gz -rw-r--r--. 1 root root 1134 Sep 29 10:59 repomd.xml -rw-r--r--. 1 root root 384 Sep 29 10:59 updateinfo.xml.gz So it appears to be working. I checked the updateinfo.xml and the reference to the deleted erratum is, in fact, gone. Looking for bz's where this issue was potentially fixed between v2.3.8 and 2.6.30, I find a few, but none that speak directly to a problem where updateinfo.xml.gz is not regenerated after deleting an erratum. Possibly this issue was addressed when fixing some other updateinfo.xml.gz issue, such as this one... 1135073 - (fixed in 2.3.25) updateinfo.xml.gz does not contain correct url for bugs referenced
I also tested this on a Satellite 5.7 system to check that this is not an issue fixed in Spacewalk that didn't make it into Satellite. I also cannot reproduce this issue on Satellite 5.7.
I checked the code that writes these files (RpmRepositoryWrite.java) and don't see any changes since an abstraction layer was introduced to support both Rpm and Debian repos - back on Oct 1, 2010. see commit 2e68c64438e375f40b711346259bc8533918956d Its hard to guess at how this issue occurred since the updateinfo file is updated just after writing filelists, other and primary files, but before writing the repomd file. The only scenario I can guess involves something preventing the updateinfo file from being overwritten, such as the file already being opened by some other process or some weird change of selinux fcontext, etc. I'm going to close this since I can't reproduce it on Satellite 5.7 or Spacewalk. If you find a way to reproduce this, please reopen with more detailed steps to reproduce.
Reopened. Found the scenario in which this issue occurs. The code which creates/updates the updateinfo file does not run where the channel has no errata. So the caveat here is that the deleted erratum must be the only, or the last, erratum associated with the channel. I believe the fix is to delete the file, if it exists, and the channel has no errata.
I think I was able to reproduce this issue. Comment 4 is absolutely correct.
spacewalk.github: d82253722be5e7f6f1b1aa97557942a43c45c819
Verified on Satellite 5.8 compose with spacewalk-java-2.5.14-26.el6sat.noarch I followed steps to reproduce and I see this before and after deletion -rw-r--r--. 1 root root 744 Nov 28 04:46 filelists.xml.gz -rw-r--r--. 1 root root 752 Nov 28 04:46 other.xml.gz -rw-r--r--. 1 root root 1544 Nov 28 04:46 primary.xml.gz -rw-r--r--. 1 root root 1134 Nov 28 04:46 repomd.xml -rw-r--r--. 1 root root 725 Nov 28 04:46 updateinfo.xml.gz -rw-r--r--. 1 root root 488 Nov 28 04:53 filelists.xml.gz -rw-r--r--. 1 root root 517 Nov 28 04:53 other.xml.gz -rw-r--r--. 1 root root 1134 Nov 28 04:53 primary.xml.gz -rw-r--r--. 1 root root 871 Nov 28 04:53 repomd.xml