]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Switch to debian unstable temporarily in default image and tests 2518/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 17 Mar 2024 13:44:03 +0000 (14:44 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 17 Mar 2024 15:00:00 +0000 (16:00 +0100)
pacman got removed from Debian Testing, so let's use unstable until
it's added back.

.github/workflows/ci.yml
mkosi.conf.d/20-debian-tools.conf [new file with mode: 0644]
mkosi.conf.d/20-debian/mkosi.conf
tests/__init__.py
tests/conftest.py

index 1a86bb32ad1a676e6398c103f99b02cefaa3d345..8abeffd097ebca7ff96b3fa72ecbf9d09621ce84 100644 (file)
@@ -181,5 +181,7 @@ jobs:
             --verbose \
             -m integration \
             --distribution ${{ matrix.distro }} \
+            $([ "${{ matrix.distro }}" = "debian" ] && echo --release=unstable) \
+            $([ "${{ matrix.tools }}" = "debian" ] && echo --tools-tree-release=unstable) \
             --tools-tree-distribution ${{ matrix.tools }} \
             tests/
diff --git a/mkosi.conf.d/20-debian-tools.conf b/mkosi.conf.d/20-debian-tools.conf
new file mode 100644 (file)
index 0000000..51cf221
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+[Match]
+ToolsTreeDistribution=debian
+
+[Host]
+@ToolsTreeRelease=unstable
index 5958f1ca8f80c4bf01d7d677d5729f643300d9d7..71f6934e61bd996f625cf403e1b4d3153df9f3fc 100644 (file)
@@ -4,6 +4,7 @@
 Distribution=debian
 
 [Distribution]
+@Release=unstable
 Repositories=non-free-firmware
 
 [Content]
index 74e05694f06c12160d203df851f1b8dedd6e5389..b59d5621b4218981de101d93e27430d5cea3c178 100644 (file)
@@ -24,6 +24,7 @@ class Image:
         distribution: Distribution
         release: str
         tools_tree_distribution: Optional[Distribution]
+        tools_tree_release: Optional[str]
         debug_shell: bool
 
     def __init__(self, config: Config, options: Sequence[PathString] = []) -> None:
@@ -78,6 +79,7 @@ class Image:
                 if self.config.tools_tree_distribution
                 else []
             ),
+            *(["--tools-tree-release", self.config.tools_tree_release] if self.config.tools_tree_release else []),
             *self.options,
             *options,
             "--output-dir", self.output_dir,
index 5de10c8ade6636ac4b7dc1ff35ad2bc079d4adce..e653c8891ae975e039f48040a594fa6f1793ad98 100644 (file)
@@ -34,6 +34,11 @@ def pytest_addoption(parser: Any) -> None:
         type=Distribution,
         choices=[Distribution(d) for d in Distribution.values()],
     )
+    parser.addoption(
+        "--tools-tree-release",
+        metavar="RELEASE",
+        help="Use the given tools tree release instead of the default one",
+    )
     parser.addoption(
         "--debug-shell",
         help="Pass --debug-shell when running mkosi",
@@ -49,6 +54,7 @@ def config(request: Any) -> Image.Config:
         distribution=distribution,
         release=release,
         tools_tree_distribution=cast(Distribution, request.config.getoption("--tools-tree-distribution")),
+        tools_tree_release=request.config.getoption("--tools-tree-release"),
         debug_shell=request.config.getoption("--debug-shell"),
     )