]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Move PackageManagerTrees= to the Distribution section
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 26 Oct 2023 11:39:24 +0000 (13:39 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 26 Oct 2023 11:39:24 +0000 (13:39 +0200)
This makes more sense than the Content section, since these trees
don't actually end up in the image.

mkosi/config.py
mkosi/resources/mkosi.md

index 9bdb87c399ef4b9080350d21eb9a47acd1bc64a6..29d8a76f5074e1855ad081bf66a275c80e018998 100644 (file)
@@ -728,6 +728,7 @@ class MkosiConfig:
     repository_key_check: bool
     repositories: list[str]
     cache_only: bool
+    package_manager_trees: list[tuple[Path, Optional[Path]]]
 
     output_format: OutputFormat
     manifest_format: list[ManifestFormat]
@@ -753,7 +754,6 @@ class MkosiConfig:
 
     base_trees: list[Path]
     skeleton_trees: list[tuple[Path, Optional[Path]]]
-    package_manager_trees: list[tuple[Path, Optional[Path]]]
     extra_trees: list[tuple[Path, Optional[Path]]]
 
     remove_packages: list[str]
@@ -1138,6 +1138,16 @@ SETTINGS = (
         parse=config_parse_boolean,
         help="Only use the package cache when installing packages",
     ),
+    MkosiConfigSetting(
+        dest="package_manager_trees",
+        long="--package-manager-tree",
+        metavar="PATH",
+        section="Distribution",
+        parse=config_make_list_parser(delimiter=",", parse=make_source_target_paths_parser()),
+        default_factory=lambda ns: ns.skeleton_trees,
+        default_factory_depends=("skeleton_trees",),
+        help="Use a package manager tree to configure the package manager",
+    ),
 
     MkosiConfigSetting(
         dest="output_format",
@@ -1334,16 +1344,6 @@ SETTINGS = (
         path_default=False,
         help="Use a skeleton tree to bootstrap the image before installing anything",
     ),
-    MkosiConfigSetting(
-        dest="package_manager_trees",
-        long="--package-manager-tree",
-        metavar="PATH",
-        section="Content",
-        parse=config_make_list_parser(delimiter=",", parse=make_source_target_paths_parser()),
-        default_factory=lambda ns: ns.skeleton_trees,
-        default_factory_depends=("skeleton_trees",),
-        help="Use a package manager tree to configure the package manager",
-    ),
     MkosiConfigSetting(
         dest="extra_trees",
         long="--extra-tree",
@@ -2708,6 +2708,7 @@ def summary(config: MkosiConfig) -> str:
       Repo Signature/Key check: {yes_no(config.repository_key_check)}
                   Repositories: {line_join_list(config.repositories)}
         Use Only Package Cache: {yes_no(config.cache_only)}
+         Package Manager Trees: {line_join_source_target_list(config.package_manager_trees)}
 
     {bold("OUTPUT")}:
                  Output Format: {config.output_format}
@@ -2734,7 +2735,6 @@ def summary(config: MkosiConfig) -> str:
 
                     Base Trees: {line_join_list(config.base_trees)}
                 Skeleton Trees: {line_join_source_target_list(config.skeleton_trees)}
-         Package Manager Trees: {line_join_source_target_list(config.package_manager_trees)}
                    Extra Trees: {line_join_source_target_list(config.extra_trees)}
 
                Remove Packages: {line_join_list(config.remove_packages)}
index a6a8789fdf0c3ada9a871d39dc5acf740836a6af..c50d138002c3ef1e71e71912359472af3fe836c3 100644 (file)
@@ -489,6 +489,19 @@ boolean argument: either `1`, `yes`, or `true` to enable, or `0`, `no`,
   reproducibility, as long as the package cache is already fully
   populated.
 
+`PackageManagerTrees=`, `--package-manager-tree=`
+
+: This option mirrors the above `SkeletonTrees=` option and defaults to the
+  same value if not configured otherwise, but installs the files to a
+  subdirectory of the workspace directory instead of the OS tree. This
+  subdirectory of the workspace is used to configure the package manager.
+
+: `SkeletonTrees=` and `PackageManagerTrees=` fulfill similar roles. Use
+  `SkeletonTrees=` if you want the files to be present in the final image. Use
+  `PackageManagerTrees=` if you don't want the files to be present in the final
+  image, e.g. when building an initrd or if you want to refer to paths outside
+  of the image in your repository configuration.
+
 ### [Output] Section
 
 `Format=`, `--format=`, `-t`
@@ -757,19 +770,6 @@ boolean argument: either `1`, `yes`, or `true` to enable, or `0`, `no`,
   file may be provided too. `mkosi.skeleton.tar` will be automatically
   used if found in the local directory.
 
-`PackageManagerTrees=`, `--package-manager-tree=`
-
-: This option mirrors the above `SkeletonTrees=` option and defaults to the
-  same value if not configured otherwise, but installs the files to a
-  subdirectory of the workspace directory instead of the OS tree. This
-  subdirectory of the workspace is used to configure the package manager.
-
-: `SkeletonTrees=` and `PackageManagerTrees=` fulfill similar roles. Use
-  `SkeletonTrees=` if you want the files to be present in the final image. Use
-  `PackageManagerTrees=` if you don't want the files to be present in the final
-  image, e.g. when building an initrd or if you want to refer to paths outside
-  of the image in your repository configuration.
-
 `ExtraTrees=`, `--extra-tree=`
 
 : Takes a colon separated pair of paths. The first path refers to a