]> git.pld-linux.org Git - projects/pld-ftp-admin.git/blobdiff - bin/pfa-genindex
debug (unknown)
[projects/pld-ftp-admin.git] / bin / pfa-genindex
old mode 100644 (file)
new mode 100755 (executable)
index b9f107f..dc12b64
@@ -95,13 +95,15 @@ if do_poldek:
         print '\n-------------------------- %s --------------------------' % tree
         for arch in all_ftp_archs:
             print '\ngenerate poldek index for %s' % arch
+            print '%s -s %s%s/%s/RPMS/ --mkidxz --mkidx-type pndir' % (poldek, ftp_dir, tree, arch)
             os.system('%s -s %s%s/%s/RPMS/ --mkidxz --mkidx-type pndir' % (poldek, ftp_dir, tree, arch))
             if arch != 'noarch' and config.separate_debuginfo:
                 os.system('%s -s %s%s/%s/debuginfo/ --mkidxz --mkidx-type pndir' % (poldek, ftp_dir, tree, arch))
 
 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 +113,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.026094 seconds and 4 git commands to generate.