pld-ftp-admin: bin/pfa-genindex - yum: skip generating if poldek indexes ar...
glen
glen at pld-linux.org
Sat May 18 13:11:13 CEST 2013
Author: glen Date: Sat May 18 11:11:13 2013 GMT
Module: pld-ftp-admin Tag: HEAD
---- Log message:
- yum: skip generating if poldek indexes aren't newer
---- Files affected:
pld-ftp-admin/bin:
pfa-genindex (1.36 -> 1.37)
---- Diffs:
================================================================
Index: pld-ftp-admin/bin/pfa-genindex
diff -u pld-ftp-admin/bin/pfa-genindex:1.36 pld-ftp-admin/bin/pfa-genindex:1.37
--- pld-ftp-admin/bin/pfa-genindex:1.36 Sat May 18 13:10:06 2013
+++ pld-ftp-admin/bin/pfa-genindex Sat May 18 13:11:08 2013
@@ -26,6 +26,8 @@
do_yum = False
do_rpmrepo = False
quiet = False
+# update only if changed (applicable to yum)
+freshen = True
for o, a in opts:
if o == "--nopoldek":
@@ -107,6 +109,11 @@
for arch in all_ftp_archs:
print '\ngenerate repodata for %s using createrepo' % arch
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):
+ print "repodata indexes already fresh"
+ continue
print ('%s %s --cache %s-%s %s/RPMS' % ("" if quiet else "time", yum, cachedir, arch, archdir))
os.system('%s %s --cache %s-%s %s/RPMS' % ("" if quiet else "time", yum, cachedir, arch, archdir))
if arch != 'noarch' and config.separate_debuginfo:
================================================================
---- CVS-web:
http://cvs.pld-linux.org/pld-ftp-admin/bin/pfa-genindex?r1=1.36&r2=1.37
More information about the pld-cvs-commit
mailing list