osbuild/cli: prefer --cache over --store

Make primary name of the cache/store argument 'cache'.  Let's start
preferring it.
This commit is contained in:
Achilleas Koutsou 2025-01-20 22:04:27 +01:00 committed by Simon de Vlieger
parent db7867833a
commit 1a529d78a9

View file

@ -69,7 +69,7 @@ def parse_arguments(sys_argv: List[str]) -> argparse.Namespace:
parser.add_argument("manifest_path", metavar="MANIFEST",
help="json file containing the manifest that should be built, or a '-' to read from stdin")
parser.add_argument("--store", "--cache", metavar="DIRECTORY", type=os.path.abspath,
parser.add_argument("--cache", "--store", metavar="DIRECTORY", type=os.path.abspath,
default=".osbuild",
help="directory where sources and intermediary os trees are stored")
parser.add_argument("-l", "--libdir", metavar="DIRECTORY", type=os.path.abspath, default="/usr/lib/osbuild",
@ -168,7 +168,7 @@ def osbuild_cli() -> int:
monitor_name = "NullMonitor" if (args.json or args.quiet) else "LogMonitor"
try:
with ObjectStore(args.store) as object_store:
with ObjectStore(args.cache) as object_store:
if args.cache_max_size is not None:
object_store.maximum_size = args.cache_max_size