From 6e6f8febc9042b5a95e20e5d7813a62a2ca30289 Mon Sep 17 00:00:00 2001 From: Seth Vidal Date: Tue, 21 Jul 2009 09:55:02 -0400 Subject: [PATCH] fix for https://bugzilla.redhat.com/show_bug.cgi?id=512610 take timestamp of repomd.xml - not of repodata dir - just in case repodata dir is empty, for some bizarre reason --- createrepo/__init__.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/createrepo/__init__.py b/createrepo/__init__.py index 233fa1c..a28433e 100644 --- a/createrepo/__init__.py +++ b/createrepo/__init__.py @@ -216,9 +216,12 @@ class MetaDataGenerator: raise MDError, _('error in must be able to write to metadata dir:\n -> %s') % filepath if self.conf.checkts: - timestamp = os.path.getctime(filepath) - if timestamp > self.conf.mdtimestamp: - self.conf.mdtimestamp = timestamp + # checking for repodata/repomd.xml - not just the data dir + rxml = filepath + '/repomd.xml' + if os.path.exists(rxml): + timestamp = os.path.getctime(rxml) + if timestamp > self.conf.mdtimestamp: + self.conf.mdtimestamp = timestamp if self.conf.groupfile: a = self.conf.groupfile -- 2.34.1