From be61da019228a924c463f3a459f45cc3590b3309 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Thu, 25 Jul 2019 15:18:18 +0200 Subject: [PATCH] paths: Add function to generate path to pkgset repo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This will be used to hold a repository for different package sets. JIRA: COMPOSE-3620 Signed-off-by: Lubomír Sedlář --- pungi/paths.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pungi/paths.py b/pungi/paths.py index 062cd35a..cdf312ea 100644 --- a/pungi/paths.py +++ b/pungi/paths.py @@ -193,6 +193,20 @@ class WorkPaths(object): makedirs(path) return path + def pkgset_repo(self, pkgset_name, arch=None, create_dir=True): + """ + Examples: + work/x86_64/repo/f30-compose + work/global/repo/f30-compose + """ + arch = arch or "global" + path = os.path.join( + self.topdir(arch, create_dir=create_dir), "repo", pkgset_name + ) + if create_dir: + makedirs(path) + return path + def lookaside_repo(self, arch, variant, create_dir=True): """ Examples: