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

cmake: move os-release parsing into oci branch #3052

Merged
merged 1 commit into from
May 13, 2024

Conversation

bluca
Copy link
Contributor

@bluca bluca commented Apr 21, 2024

os-release parsing is only needed for OCI usage, so move it inside the appropriate branch. Saves some operations at build time when not needed, and also it is necessary as not all OSes define VERSION_ID (e.g.: Debian Unstable and Archlinux), so doing the parsing in the main block breaks the build. By moving it inside the OCI block, it runs only when needed.

@ffesti
Copy link
Contributor

ffesti commented Apr 22, 2024

LGTM but Michal is more familiar with the CI stuff.

@ffesti ffesti requested a review from dmnks April 22, 2024 13:32
@dmnks dmnks self-assigned this Apr 23, 2024
@dmnks
Copy link
Contributor

dmnks commented May 13, 2024

The DOCKERFILE variable also needs to be set inside the block (since it uses OS_NAME as well). I've fixed up the commit accordingly.

Otherwise, looks good, thanks for the patch!

os-release parsing is only needed for OCI usage, so move it inside the
appropriate branch. Saves some operations at build time when not needed,
and also it is necessary as not all OSes define VERSION_ID (e.g.: Debian
Unstable and Archlinux)
@dmnks dmnks merged commit 71f2ca4 into rpm-software-management:master May 13, 2024
1 check passed
@dmnks dmnks added the test Testsuite-related label May 13, 2024
@dmnks
Copy link
Contributor

dmnks commented May 13, 2024

(As a cosmetic touch up, I've also switched up the lines with the find_program() ones so that the conditional below reads more naturally.)

@bluca bluca deleted the os_release_cmake branch May 13, 2024 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Testsuite-related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants