Skip to content

Commit

Permalink
Rename some opts to be more consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
NekkoDroid committed Nov 18, 2024
1 parent 790f259 commit 464ad4b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 14 deletions.
8 changes: 4 additions & 4 deletions mkosi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1230,10 +1230,10 @@ def finalize_default_initrd(
"--compress-level", str(config.compress_level),
"--with-network", str(config.with_network),
"--cache-only", str(config.cacheonly),
*(["--output-dir", str(output_dir)] if output_dir else []),
*(["--workspace-dir", str(config.workspace_dir)] if config.workspace_dir else []),
*(["--cache-dir", str(config.cache_dir)] if config.cache_dir else []),
*(["--package-cache-dir", str(config.package_cache_dir)] if config.package_cache_dir else []),
*(["--output-directory", str(output_dir)] if output_dir else []),
*(["--workspace-directory", str(config.workspace_dir)] if config.workspace_dir else []),
*(["--cache-directory", str(config.cache_dir)] if config.cache_dir else []),
*(["--package-cache-directory", str(config.package_cache_dir)] if config.package_cache_dir else []),
*(["--local-mirror", str(config.local_mirror)] if config.local_mirror else []),
"--incremental", str(config.incremental),
*(f"--package={package}" for package in config.initrd_packages),
Expand Down
16 changes: 14 additions & 2 deletions mkosi/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2377,6 +2377,8 @@ def parse_ini(path: Path, only_sections: Collection[str] = ()) -> Iterator[tuple
ConfigSetting(
dest="output_dir",
short="-O",
long="--output-directory",
compat_longs=("--output-dir",),
metavar="DIR",
name="OutputDirectory",
section="Output",
Expand Down Expand Up @@ -2422,7 +2424,8 @@ def parse_ini(path: Path, only_sections: Collection[str] = ()) -> Iterator[tuple
),
ConfigSetting(
dest="repart_dirs",
long="--repart-dir",
long="--repart-directory",
compat_longs=("--repart-dir",),
metavar="PATH",
name="RepartDirectories",
section="Output",
Expand Down Expand Up @@ -3225,6 +3228,8 @@ def parse_ini(path: Path, only_sections: Collection[str] = ()) -> Iterator[tuple
),
ConfigSetting(
dest="workspace_dir",
long="--workspace-directory",
compat_longs=("--workspace-dir",),
metavar="DIR",
name="WorkspaceDirectory",
section="Build",
Expand All @@ -3234,6 +3239,8 @@ def parse_ini(path: Path, only_sections: Collection[str] = ()) -> Iterator[tuple
),
ConfigSetting(
dest="cache_dir",
long="--cache-directory",
compat_longs=("--cache-dir",),
metavar="PATH",
name="CacheDirectory",
section="Build",
Expand All @@ -3244,6 +3251,8 @@ def parse_ini(path: Path, only_sections: Collection[str] = ()) -> Iterator[tuple
),
ConfigSetting(
dest="package_cache_dir",
long="--package-cache-directory",
compat_longs=("--package-cache-dir",),
metavar="PATH",
name="PackageCacheDirectory",
section="Build",
Expand All @@ -3253,6 +3262,8 @@ def parse_ini(path: Path, only_sections: Collection[str] = ()) -> Iterator[tuple
),
ConfigSetting(
dest="build_dir",
long="--build-directory",
compat_longs=("--build-dir",),
metavar="PATH",
name="BuildDirectory",
section="Build",
Expand Down Expand Up @@ -3532,7 +3543,8 @@ def parse_ini(path: Path, only_sections: Collection[str] = ()) -> Iterator[tuple
),
ConfigSetting(
dest="sysupdate_dir",
long="--sysupdate-dir",
long="--sysupdate-directory",
compat_longs=("--sysupdate-dir",),
metavar="PATH",
name="SysupdateDirectory",
section="Host",
Expand Down
16 changes: 8 additions & 8 deletions mkosi/resources/man/mkosi.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ boolean argument: either `1`, `yes`, or `true` to enable, or `0`, `no`,
: Configure the compression level to use. Takes an integer. The possible
values depend on the compression being used.

`OutputDirectory=`, `--output-dir=`, `-O`
`OutputDirectory=`, `--output-directory=`, `-O`
: Path to a directory where to place all generated artifacts. If this is
not specified and the directory `mkosi.output/` exists in the local
directory, it is automatically used for this purpose.
Expand Down Expand Up @@ -623,7 +623,7 @@ boolean argument: either `1`, `yes`, or `true` to enable, or `0`, `no`,
root or `/usr` partition along with its Verity partition and unified
kernel. By default `uki`, `kernel` and `initrd` are split out.

`RepartDirectories=`, `--repart-dir=`
`RepartDirectories=`, `--repart-directory=`
: Paths to directories containing systemd-repart partition definition
files that are used when mkosi invokes systemd-repart when building a
disk image. If `mkosi.repart/` exists in the local directory, it will
Expand Down Expand Up @@ -1386,7 +1386,7 @@ boolean argument: either `1`, `yes`, or `true` to enable, or `0`, `no`,
for `/etc/dnf/dnf.conf` in the sandbox trees if `dnf` is used to
install packages.

`WorkspaceDirectory=`, `--workspace-dir=`
`WorkspaceDirectory=`, `--workspace-directory=`
: Path to a directory where to store data required temporarily while
building the image. This directory should have enough space to store
the full OS image, though in most modes the actually used disk space
Expand All @@ -1398,7 +1398,7 @@ boolean argument: either `1`, `yes`, or `true` to enable, or `0`, `no`,
should an `mkosi` invocation be aborted abnormally (for example, due
to reboot/power failure).

`CacheDirectory=`, `--cache-dir=`
`CacheDirectory=`, `--cache-directory=`
: Takes a path to a directory to use as the incremental cache directory
for the incremental images produced when the `Incremental=` option is
enabled. If this option is not used, but a `mkosi.cache/` directory is
Expand All @@ -1410,7 +1410,7 @@ boolean argument: either `1`, `yes`, or `true` to enable, or `0`, `no`,
the distribution package manager used. If unset, a suitable directory
in the user's home directory or system is used.

`BuildDirectory=`, `--build-dir=`
`BuildDirectory=`, `--build-directory=`
: Takes a path to a directory to use as the build directory for build
systems that support out-of-tree builds (such as Meson). The directory
used this way is shared between repeated builds, and allows the build
Expand Down Expand Up @@ -1818,7 +1818,7 @@ boolean argument: either `1`, `yes`, or `true` to enable, or `0`, `no`,
of file if your workload produces more than `4G` worth of journal
data.

`SysupdateDirectory=`, `--sysupdate-dir=`
`SysupdateDirectory=`, `--sysupdate-directory=`
: Path to a directory containing systemd-sysupdate transfer definition
files that are used by `mkosi sysupdate`. If `mkosi.sysupdate/`
exists in the local directory, it will be used for this purpose as
Expand Down Expand Up @@ -2627,8 +2627,8 @@ project.
re-building of images. Specifically:

1. The package cache of the distribution package manager may be cached
between builds. This is configured with the `--cache-dir=` option or
the `mkosi.cache/` directory. This form of caching relies on the
between builds. This is configured with the `--cache-directory=` option
or the `mkosi.cache/` directory. This form of caching relies on the
distribution's package manager, and caches distribution packages
(RPM, DEB, …) after they are downloaded, but before they are
unpacked.
Expand Down

0 comments on commit 464ad4b

Please sign in to comment.