From: Seth Vidal Date: Tue, 21 Jul 2009 13:55:02 +0000 (-0400) Subject: fix for https://bugzilla.redhat.com/show_bug.cgi?id=512610 X-Git-Tag: upstream/0.9.9~45 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6e6f8febc9042b5a95e20e5d7813a62a2ca30289;p=tools%2Fcreaterepo.git 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 --- 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