]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Write dnf/zypper default repos as mkosi.repo
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 3 Jul 2023 11:56:40 +0000 (13:56 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 3 Jul 2023 12:12:04 +0000 (14:12 +0200)
This is more identifiable than a file named after the distribution
since such a file could conceivably be shipped by the distro as well.

mkosi/distributions/fedora.py
mkosi/distributions/opensuse.py

index 2f1330a2fad92421edafe6cad9544af6fee5d391..515c1e2f510c85f15cb7e44615ce466bd5d92761 100644 (file)
@@ -134,7 +134,7 @@ def setup_dnf(state: MkosiState, repos: Sequence[Repo]) -> None:
             )
         )
 
-    repofile = state.pkgmngr / f"etc/yum.repos.d/{state.config.distribution}.repo"
+    repofile = state.pkgmngr / "etc/yum.repos.d/mkosi.repo"
     if not repofile.exists():
         repofile.parent.mkdir(exist_ok=True, parents=True)
         with repofile.open("w") as f:
index 881cb808dd3a5b4c7c48d2a022dabd013465ef73..4ef779d4beb53fe7439ff533c3fc6af6787347eb 100644 (file)
@@ -96,7 +96,7 @@ def setup_zypper(state: MkosiState, repos: Sequence[Repo]) -> None:
                 )
             )
 
-    repofile = state.pkgmngr / f"etc/zypp/repos.d/{state.config.distribution}.repo"
+    repofile = state.pkgmngr / "etc/zypp/repos.d/mkosi.repo"
     if not repofile.exists():
         repofile.parent.mkdir(exist_ok=True, parents=True)
         with repofile.open("w") as f: