Skip to content

main: rename data-dir to force-data-dir#386

Merged
lzap merged 1 commit intoosbuild:mainfrom
supakeen:rename-data-dir
Nov 27, 2025
Merged

main: rename data-dir to force-data-dir#386
lzap merged 1 commit intoosbuild:mainfrom
supakeen:rename-data-dir

Conversation

@supakeen
Copy link
Member

Let's name arguments that fully override built-in definitions with the force- prefix. This makes room for an extra-data-dir in the future that allows for drop-in data.

The same will be applied to passing other arguments in the future.

We use a normalization to rename the old argument to the new one so we can keep accessing it under a single name and a deprecation to hide the previous argument name but still accept it on the command.

Cobra will emit a deprecation warning for us.


I'm planning to add a --force-defs-dir argument to make using YAML definitions a little bit more discoverable (though still experimental initially). This aligns nicely with the --{force,extra}-repo and we'd be consistent over all arguments, as we'll likely want drop-in definitions and full override capabilities.

Let's name arguments that fully override built-in definitions with the
`force-` prefix. This makes room for an `extra-data-dir` in the future
that allows for drop-in data.

The same will be applied to passing other arguments in the future.

We use a normalization to rename the old argument to the new one so we
can keep accessing it under a single name and a deprecation to hide the
previous argument name but still accept it on the command.

Cobra will emit a deprecation warning for us.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
@supakeen supakeen requested a review from a team as a code owner November 26, 2025 09:42
@supakeen supakeen requested review from bcl, croissanne and mvo5 and removed request for a team November 26, 2025 09:42
Copy link
Contributor

@bcl bcl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@lzap lzap added this pull request to the merge queue Nov 27, 2025
Merged via the queue into osbuild:main with commit 4239aca Nov 27, 2025
12 of 48 checks passed
@mvo5
Copy link
Contributor

mvo5 commented Nov 27, 2025

I'm a bit late, sorry - should we update the README.md as well (that currently mentionds --data-dir) without the --force-data-dir?

@lzap
Copy link
Contributor

lzap commented Nov 27, 2025

Sorry for rushing that in.

@supakeen
Copy link
Member Author

I'm a bit late, sorry - should we update the README.md as well (that currently mentionds --data-dir) without the --force-data-dir?

Yes, I'll do a follow-up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants