if do_yum:
os.system('%s cd %s.stat/repodata && cvs %s up comps.xml' % ("" if quiet else "set -x;", ftp_dir, "" if quiet else "-Q"))
- yum = '%s.stat/bin/createrepo -d -v --skip-stat --workers=12 -g %s.stat/repodata/comps.xml' % (ftp_dir, ftp_dir)
+ yum = '%s.stat/bin/createrepo -d -v --update --checkts --skip-stat --workers=12 -g %s.stat/repodata/comps.xml' % (ftp_dir, ftp_dir)
+ comps_file = '%s.stat/repodata/comps.xml' % ftp_dir
for tree in trees:
print '\n-------------------------- %s --------------------------' % tree
cachedir = '%s/tmp/createrepo/%s' % (home, tree)
archdir = "%s/%s" % (treedir, arch)
poldek_idx = "%s/RPMS/packages.ndir.md" % archdir
repodata_idx = "%s/RPMS/repodata/repomd.xml" % archdir
- if freshen and os.path.exists(poldek_idx) and os.path.exists(repodata_idx) and not os.path.getmtime(poldek_idx) > os.path.getmtime(repodata_idx):
+ if freshen and os.path.exists(poldek_idx) and os.path.exists(repodata_idx) \
+ and not os.path.getmtime(comps_file) > os.path.getmtime(repodata_idx) \
+ and not os.path.getmtime(poldek_idx) > os.path.getmtime(repodata_idx):
print "repodata indexes already fresh"
continue
print ('%s %s --cache %s-%s %s/RPMS' % ("" if quiet else "time", yum, cachedir, arch, archdir))