[projects/pld-ftp-admin] Update creation of dnf/yum repodata

baggins baggins at pld-linux.org
Tue May 10 15:35:28 CEST 2022


commit a7343854aefc6e39066851bc72488b10b9457d3d
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Tue May 10 20:34:57 2022 +0700

    Update creation of dnf/yum repodata

 bin/pfa-genindex | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/bin/pfa-genindex b/bin/pfa-genindex
index 8be7395..d7bf489 100755
--- a/bin/pfa-genindex
+++ b/bin/pfa-genindex
@@ -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"))
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/pld-ftp-admin.git/commitdiff/a7343854aefc6e39066851bc72488b10b9457d3d



More information about the pld-cvs-commit mailing list