setattr(namespace, "architecture", Architecture.native())
d = getattr(namespace, "distribution")
+ r = getattr(namespace, "release", None)
a = getattr(namespace, "architecture")
if d == Distribution.debian:
return "https://geo.mirror.pkgbuild.com"
elif d == Distribution.opensuse:
return "https://download.opensuse.org"
+ elif d == Distribution.fedora and r == "eln":
+ return "https://odcs.fedoraproject.org/composes/production/latest-Fedora-ELN/compose"
return None
@classmethod
def install_packages(cls, state: MkosiState, packages: Sequence[str], apivfs: bool = True) -> None:
release = parse_fedora_release(state.config.release)
+ release_url = updates_url = appstream_url = baseos_url = extras_url = crb_url = None
if state.config.local_mirror:
release_url = f"baseurl={state.config.local_mirror}"
- updates_url = None
+ elif release == "eln":
+ assert state.config.mirror
+ appstream_url = f"baseurl={state.config.mirror}/AppStream/$basearch/os"
+ baseos_url = f"baseurl={state.config.mirror}/BaseOS/$basearch/os"
+ extras_url = f"baseurl={state.config.mirror}/Extras/$basearch/os"
+ crb_url = f"baseurl={state.config.mirror}/CRB/$basearch/os"
elif state.config.mirror:
directory = "development" if release == "rawhide" else "releases"
release_url = f"baseurl={state.config.mirror}/{directory}/$releasever/Everything/$basearch/os/"
# See: https://fedoraproject.org/security/
gpgurl = "https://fedoraproject.org/fedora.gpg"
- repos = [Repo("fedora", release_url, [gpgurl])]
- if updates_url is not None:
- repos += [Repo("updates", updates_url, [gpgurl])]
+ repos = []
+ for name, url in (("fedora", release_url),
+ ("updates", updates_url),
+ ("appstream", appstream_url),
+ ("baseos", baseos_url),
+ ("extras", extras_url),
+ ("crb", crb_url)):
+ if url:
+ repos += [Repo(name, url, [gpgurl])]
setup_dnf(state, repos)
invoke_dnf(state, "install", packages, apivfs=apivfs)
def fedora_release_at_least(release: str, threshold: str) -> bool:
- if release == 'rawhide':
+ if release in ("rawhide", "eln"):
return True
- if threshold == 'rawhide':
+ if threshold in ("rawhide", "eln"):
return False
# If neither is 'rawhide', both must be integers
return int(release) >= int(threshold)