pld-ftp-admin: bin/pfa-genindex - yum: check also if comps file was updated

glen glen at pld-linux.org
Wed Jun 5 22:48:57 CEST 2013


Author: glen                         Date: Wed Jun  5 20:48:57 2013 GMT
Module: pld-ftp-admin                 Tag: HEAD
---- Log message:
- yum: check also if comps file was updated

---- Files affected:
pld-ftp-admin/bin:
   pfa-genindex (1.37 -> 1.38) 

---- Diffs:

================================================================
Index: pld-ftp-admin/bin/pfa-genindex
diff -u pld-ftp-admin/bin/pfa-genindex:1.37 pld-ftp-admin/bin/pfa-genindex:1.38
--- pld-ftp-admin/bin/pfa-genindex:1.37	Sat May 18 13:11:08 2013
+++ pld-ftp-admin/bin/pfa-genindex	Wed Jun  5 22:48:52 2013
@@ -101,7 +101,8 @@
 
 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 @@
             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))
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/pld-ftp-admin/bin/pfa-genindex?r1=1.37&r2=1.38



More information about the pld-cvs-commit mailing list