]> git.pld-linux.org Git - projects/pld-ftp-admin.git/commitdiff
- yum: check also if comps file was updated
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 5 Jun 2013 20:48:52 +0000 (20:48 +0000)
committerElan Ruusamäe <glen@pld-linux.org>
Wed, 5 Jun 2013 20:48:52 +0000 (20:48 +0000)
Changed files:
    bin/pfa-genindex -> 1.38

bin/pfa-genindex

index b9f107f8ce0d782fe41af4405a28d531ca0532a2..2c11e4118c5c348fdd3327cc1509bf4a8fc3a44f 100644 (file)
@@ -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))
This page took 0.090407 seconds and 4 git commands to generate.