[Rpm-metadata] mergerepo weird behavior

James Antill james at fedoraproject.org
Wed Aug 24 21:07:13 UTC 2011


On Wed, 2011-08-17 at 17:59 -0400, Jon Wallace wrote:

> I updated to FC-15 and createrepo-9.9-4.  Problem persists.  The 
> merge.py file does have "metadata_expire=0" in it.

 Ok ... got some free time to test this and it turned out to be a bug in
yum (in theory it affects more just groups/pkgtags in mergerepo, but in
practice probably not). Fix is simple enough:

commit 581d161bbefc9b940289f15a93c3fdef6ad8c843
Author: James Antill <james at and.org>
Date:   Wed Aug 24 17:03:58 2011 -0400

    Fix mergerepo on generated data (groups/pkgtag/etc.)

diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index 91b7dde..a681370 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -1256,6 +1256,11 @@ Insufficient space in download directory %s
 
             # if we have a 'fresh' repomd.xml then update the cookie
             self.setMetadataCookie()
+            #  Also remove any files that are generated ... this can be slightl
+            # non-optimal, in the case where we have to revert, but it's just
+            # sooo much easier to deal with it here.
+            for fname in misc.getFileList(self.cachedir + '/gen', '', []):
+                misc.unlink_f(fname)
 
         if self._repoXML is None:
             self._repoXML = self._parseRepoXML(result)


...feel free to confirm.



More information about the Rpm-metadata mailing list