Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add functions that generalise stage option struct creation #1550

Open
achilleas-k opened this issue Jul 13, 2021 · 1 comment
Open

Add functions that generalise stage option struct creation #1550

achilleas-k opened this issue Jul 13, 2021 · 1 comment

Comments

@achilleas-k
Copy link
Member

The functions in the stage_options.go file are the followup to the xStageOptions() methods from previous image type definitions (e.g., rpmStageOptions()) so they ended up in the same place for 8.5. They would be a lot more useful if they could be generalised and added to each stage in the osbuild2 package as analogues to the NewXStage() function. Right now they are only meant to be used in their respective distro package and there are several distro-specific hard-coded values.

Originally discussed in #1536 (comment)

@teg
Copy link
Member

teg commented Jul 13, 2021

Would love to see things generalised.

The reason this was initially kept in each distro was to make sure that any policy was only defined in the individual distros, mainly to avoid a situation where we would change generic functions for the purposes of a new distro and accidentally changing them for old ones too (or just it being tricky to keep track of the consequences of changing things).

I think if the helpers are sufficiently generic, this shouldn't be a problem.

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

No branches or pull requests

2 participants