Let's allow getting the output when we invoke the package managers.
from mkosi.mounts import finalize_ephemeral_source_mounts
from mkosi.run import find_binary, run
from mkosi.sandbox import apivfs_cmd
-from mkosi.types import CompletedProcess, PathString
+from mkosi.types import _FILE, CompletedProcess, PathString
from mkosi.util import umask
*,
apivfs: bool = False,
mounts: Sequence[PathString] = (),
+ stdout: _FILE = None,
) -> CompletedProcess:
with finalize_ephemeral_source_mounts(context.config) as sources:
return run(
) + (apivfs_cmd(context.root) if apivfs else [])
),
env=context.config.environment,
+ stdout=stdout,
)
@classmethod
from mkosi.mounts import finalize_ephemeral_source_mounts
from mkosi.run import find_binary, run
from mkosi.sandbox import apivfs_cmd
-from mkosi.types import CompletedProcess, PathString
+from mkosi.types import _FILE, CompletedProcess, PathString
class Dnf(PackageManager):
arguments: Sequence[str] = (),
*,
apivfs: bool = False,
+ stdout: _FILE = None,
) -> CompletedProcess:
try:
with finalize_ephemeral_source_mounts(context.config) as sources:
) + (apivfs_cmd(context.root) if apivfs else [])
),
env=context.config.environment,
+ stdout=stdout,
)
finally:
# dnf interprets the log directory relative to the install root so there's nothing we can do but to remove
from mkosi.mounts import finalize_ephemeral_source_mounts
from mkosi.run import run
from mkosi.sandbox import apivfs_cmd
-from mkosi.types import CompletedProcess, PathString
+from mkosi.types import _FILE, CompletedProcess, PathString
from mkosi.util import umask
from mkosi.versioncomp import GenericVersion
arguments: Sequence[str] = (),
*,
apivfs: bool = False,
+ stdout: _FILE = None,
) -> CompletedProcess:
with finalize_ephemeral_source_mounts(context.config) as sources:
return run(
) + (apivfs_cmd(context.root) if apivfs else [])
),
env=context.config.environment,
+ stdout=stdout,
)
@classmethod
from mkosi.mounts import finalize_ephemeral_source_mounts
from mkosi.run import run
from mkosi.sandbox import apivfs_cmd
-from mkosi.types import CompletedProcess, PathString
+from mkosi.types import _FILE, CompletedProcess, PathString
class Zypper(PackageManager):
arguments: Sequence[str] = (),
*,
apivfs: bool = False,
+ stdout: _FILE = None,
) -> CompletedProcess:
with finalize_ephemeral_source_mounts(context.config) as sources:
return run(
) + (apivfs_cmd(context.root) if apivfs else [])
),
env=context.config.environment,
+ stdout=stdout,
)
@classmethod