PACKAGES_DIR = os.path.join(PAKFIRE_DIR, "packages")
BUILD_RELEASE_DIR = os.path.join(PACKAGES_DIR, "release")
BUILD_SCRATCH_DIR = os.path.join(PACKAGES_DIR, "scratch")
-REPOS_DIR = os.path.join(PAKFIRE_DIR, "repositories")
+REPOS_DIR = os.path.join(PAKFIRE_DIR, "repos")
SOURCES_DIR = os.path.join(PAKFIRE_DIR, "sources")
UPLOADS_DIR = "/var/tmp/pakfire/uploads"
# Join everything together
return os.path.join(*parts)
+ def local_path(self, arch):
+ """
+ Path to the repository
+ """
+ return os.path.join(
+ REPOS_DIR,
+ self.path,
+ arch,
+ )
+
@property
def url(self):
if self.owner:
# Create a new pakfire instance
p = self.distro.pakfire()
- print(p)
+
+ for arch in self.arches:
+ # Local path
+ path = self.local_path(arch)
+
+ # Fetch packages
+ packages = self.get_packages(arch)
+
+ # Make filelist (if they exist)
+ files = [p.path for p in packages if os.path.exists(p.path)]
+
+ # Write repository metadata
+ p.repo_compose(path=path, files=files)