Skip to content
New issue

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

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

Already on GitHub? # to your account

some refactorings #17

Merged
merged 4 commits into from
Aug 8, 2024
Merged

some refactorings #17

merged 4 commits into from
Aug 8, 2024

Conversation

hannesm
Copy link
Contributor

@hannesm hannesm commented Aug 8, 2024

this also fixes #16

hannesm added 3 commits August 8, 2024 10:39
…amily as input

note that previously os_family and os_distribution were used:
 "bsd", "freebsd" -> pkg
 "debian", _ -> apt

and now, os and os_family are used:
  "freebsd", _ -> pkg
  "linux", "debian" -> apt
@hannesm hannesm requested a review from reynir August 8, 2024 08:59
| _ -> None
in
OpamFilter.filter_formula ~default:false env depends
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the reason to remove this ~default:false is that we notice future missing variables. we can re-add it if it is annoying.

the code is called from Orb with a try .. catch anyways, thus the filter_formula raising an exception is handled.

"OS_DISTRIBUTION", vars.os_distribution;
"OS_VERSION", vars.os_version;
"OS_FAMILY", vars.os_family;
"ARCH", vars.arch;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

we now include arch as well.

log "unsupported OS (no system packages), bsd without distribution"
end
| Some "debian" ->
let dump_system_packages ~os ~os_family filename =
Copy link
Contributor Author

Choose a reason for hiding this comment

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

as mentioned in the commit message, using os and os_family looks sufficient (for now).

Copy link
Contributor

@reynir reynir left a comment

Choose a reason for hiding this comment

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

This looks nice to me

@hannesm hannesm merged commit da200fd into next Aug 8, 2024
1 check passed
@hannesm hannesm deleted the refactor branch August 8, 2024 09:17
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

get some error since the opam-repository windows support landed
2 participants