[projects/pld-ftp-admin] pfa-genindex: fix createrepo_c cache directory creation

arekm arekm at pld-linux.org
Tue Oct 20 13:17:11 CEST 2026


commit 27e0c405094691e09ce4689962b73fe87dd657e5
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Tue Oct 20 12:46:12 2026 +0200

    pfa-genindex: fix createrepo_c cache directory creation
    
    mode=711 was decimal and ~/tmp/createrepo/<tree> was never used.
    createrepo_c creates its own <tree>-<arch> cachedir and only needs
    the parent directory.

 bin/pfa-genindex | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/bin/pfa-genindex b/bin/pfa-genindex
index 6f0d37a..acaaabb 100755
--- a/bin/pfa-genindex
+++ b/bin/pfa-genindex
@@ -105,10 +105,12 @@ if do_yum:
     os.system('%s cd %s.stat/repodata && git checkout %s HEAD repodata/comps.xml' % ("" if quiet else "set -x;", ftp_dir, "--quiet" if quiet else ""))
     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
+    createrepo_cache = f'{home}/tmp/createrepo'
+    # createrepo_c mkdirs only the last component of --cachedir
+    os.makedirs(createrepo_cache, mode=0o711, exist_ok=True)
     for tree in trees:
         print('\n-------------------------- %s --------------------------' % tree)
-        cachedir = '%s/tmp/createrepo/%s' % (home, tree)
-        os.makedirs(cachedir, mode=711, exist_ok=True)
+        cachedir = f'{createrepo_cache}/{tree}'
         treedir = "%s%s" % (ftp_dir, tree)
         for arch in all_ftp_archs:
             print('\ngenerate repodata for %s using createrepo' % arch)
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list