]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
ubuntu: Enable universe repository by default on kinetic and later
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 9 Jul 2023 18:24:21 +0000 (20:24 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Sun, 9 Jul 2023 18:44:12 +0000 (19:44 +0100)
From kinetic onwards, the usr-is-merged package is available and
has to be installed to get a proper usrmerge system but for some
reason it's in the universe repository so we enable the universe
repository by default from kinetic onwards so we can install the
usrmerge package.

mkosi/distributions/ubuntu.py

index 72ec1daf226ca8c897a53bc88c119ca7b5a5f437..6804029722eb63b105c40cfe2766961d688e25e8 100644 (file)
@@ -8,7 +8,13 @@ from mkosi.state import MkosiState
 class UbuntuInstaller(DebianInstaller):
     @staticmethod
     def repositories(state: MkosiState, local: bool = True) -> list[str]:
-        repos = ' '.join(("main", *state.config.repositories))
+        repos = ["main"]
+        if state.config.release not in ("focal", "jammy"):
+            # From kinetic onwards, the usr-is-merged package is available in universe and is required by
+            # mkosi to set up a proper usr-merged system so we add the universe repository unconditionally.
+            repos += ["universe"]
+
+        repos = ' '.join((*repos, *state.config.repositories))
 
         if state.config.local_mirror and local:
             return [f"deb [trusted=yes] {state.config.local_mirror} {state.config.release} {repos}"]