diff options
author | Elan Ruusamäe | 2013-06-05 20:48:52 (GMT) |
---|---|---|
committer | Elan Ruusamäe | 2013-06-05 20:48:52 (GMT) |
commit | 865770d5f2a1cdc0d95d10a9d25e7a0f22482faa (patch) | |
tree | 2d323d1aaca68eab1e4bae7a271a865234f311ba /bin | |
parent | 7e39d1d11bfe3697e0e68aded5a41daf69722216 (diff) | |
download | pld-ftp-admin-865770d5f2a1cdc0d95d10a9d25e7a0f22482faa.zip pld-ftp-admin-865770d5f2a1cdc0d95d10a9d25e7a0f22482faa.tar.gz |
- yum: check also if comps file was updated
Changed files:
bin/pfa-genindex -> 1.38
Diffstat (limited to 'bin')
-rw-r--r-- | bin/pfa-genindex | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/pfa-genindex b/bin/pfa-genindex index b9f107f..2c11e41 100644 --- a/bin/pfa-genindex +++ b/bin/pfa-genindex @@ -101,7 +101,8 @@ if do_poldek: 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) @@ -111,7 +112,9 @@ if do_yum: 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)) |