[projects/pld-ftp-admin] pfa-genindex: create the cache parent of nested trees

arekm arekm at pld-linux.org
Sat Oct 24 11:44:52 CEST 2026


commit b8ffb89d7de21a9cbda9d869c6ff8429e43d7d4c
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Tue Oct 20 20:14:22 2026 +0200

    pfa-genindex: create the cache parent of nested trees
    
    For .archive/PLD the cache directory's parent was missing, so
    createrepo_c failed.

 bin/pfa-genindex | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/bin/pfa-genindex b/bin/pfa-genindex
index 6561708..ee8c7ea 100755
--- a/bin/pfa-genindex
+++ b/bin/pfa-genindex
@@ -99,12 +99,11 @@ if do_yum:
     os.system(f'{"" if quiet else "set -x;"} cd {ftp_dir}.stat/repodata && git checkout {"--quiet" if quiet else ""} HEAD repodata/comps.xml')
     yum = f'{ftp_dir}.stat/bin/createrepo_c --database --update --skip-stat --workers=12 --xz --groupfile={ftp_dir}.stat/repodata/comps.xml'
     comps_file = f'{ftp_dir}.stat/repodata/comps.xml'
-    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(f'\n-------------------------- {tree} --------------------------')
-        cachedir = f'{createrepo_cache}/{tree}'
+        cachedir = f'{home}/tmp/createrepo/{tree}'
+        # createrepo_c mkdirs only the last component of --cachedir={cachedir}-{arch}
+        os.makedirs(os.path.dirname(cachedir), mode=0o711, exist_ok=True)
         treedir = f"{ftp_dir}{tree}"
         for arch in all_ftp_archs:
             print(f'\ngenerate repodata for {arch} using createrepo')
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list