]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Always use mkosi.extra/ and mkosi.skeleton/ if they exist
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 29 Mar 2023 10:04:12 +0000 (12:04 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 29 Mar 2023 10:10:07 +0000 (12:10 +0200)
These should be additive instead of only being used when no explicit
extra/skeleton trees are configured.

NEWS.md
mkosi/__init__.py

diff --git a/NEWS.md b/NEWS.md
index 43075d94b997313065a907b92483260eead3a15c..5c6a36e1502071ec24ab87f032419e6670b8b9ad 100644 (file)
--- a/NEWS.md
+++ b/NEWS.md
@@ -58,6 +58,8 @@
   runtime. Use the new `--qemu-gui` option to start qemu in its graphical interface.
 - Removed `--netdev`. Can be replaced by manually installing systemd-networkd, putting a network file in the
   image and enabling systemd-networkd.
+- If `mkosi.extra/` or `mkosi.skeleton/` exist, they are now always used instead of only when no explicit
+  extra/skeleton trees are defined.
 
 ## v14
 
index 345a45a857a2eaca018c2cff97f479d6db20499b..fd32be39065cf12a43bd870a5551a64243c766f2 100644 (file)
@@ -2161,10 +2161,6 @@ def parse_boolean(s: str) -> bool:
 
 
 def find_extra(args: argparse.Namespace) -> None:
-
-    if len(args.extra_trees) > 0:
-        return
-
     if os.path.isdir("mkosi.extra"):
         args.extra_trees.append((Path("mkosi.extra"), None))
     if os.path.isfile("mkosi.extra.tar"):
@@ -2172,10 +2168,6 @@ def find_extra(args: argparse.Namespace) -> None:
 
 
 def find_skeleton(args: argparse.Namespace) -> None:
-
-    if len(args.skeleton_trees) > 0:
-        return
-
     if os.path.isdir("mkosi.skeleton"):
         args.skeleton_trees.append((Path("mkosi.skeleton"), None))
     if os.path.isfile("mkosi.skeleton.tar"):