]> git.pld-linux.org Git - projects/pld-ftp-admin.git/blobdiff - bin/pfa-genindex
Update creation of dnf/yum repodata
[projects/pld-ftp-admin.git] / bin / pfa-genindex
index 8be73951c42f61531ad578fa85c9f6f0d11aa5af..d7bf489bb8fb6a2e22afaa61694c5030437f5a87 100755 (executable)
@@ -102,12 +102,13 @@ if do_poldek:
                 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 --update --checkts --skip-stat --workers=12 -g %s.stat/repodata/comps.xml' % (ftp_dir, ftp_dir)
+    os.system('%s cd %s.stat/repodata && git checkout %s HEAD repodata/comps.xml' % ("" if quiet else "set -x;", ftp_dir, "" if quiet else "--quiet"))
+    yum = '%s.stat/bin/createrepo_c --database --update --skip-stat --workers=12 --xz --groupfile=%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)
+        os.makedirs(cachedir, mode=711, exist_ok=True)
         treedir = "%s%s" % (ftp_dir, tree)
         for arch in all_ftp_archs:
             print('\ngenerate repodata for %s using createrepo' % arch)
@@ -119,10 +120,10 @@ if do_yum:
                 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))
+            print('%s %s --cachedir=%s-%s %s/RPMS' % ("" if quiet else "time", yum, cachedir, arch, archdir))
+            os.system('%s %s --cachedir=%s-%s %s/RPMS' % ("" if quiet else "time", yum, cachedir, arch, archdir))
             if arch != 'noarch' and config.separate_debuginfo:
-                os.system('%s %s --cache %s-%s %s/debuginfo' % ("" if quiet else "time", yum, cachedir, arch, archdir))
+                os.system('%s %s --cachedir=%s-%s %s/debuginfo' % ("" if quiet else "time", yum, cachedir, arch, archdir))
 
 if do_rpmrepo:
     os.system('%s cd %s.stat/repodata && cvs %s up comps.xml' % ("" if quiet else "set -x;", ftp_dir, "" if quiet else "-Q"))
This page took 0.07118 seconds and 4 git commands to generate.