-
Notifications
You must be signed in to change notification settings - Fork 17
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 network_not_metered and custom check scripts #111
Conversation
Hi 👋 Just as a heads-up: Do you have any further questions about this PR? I'll be happy to answer them. |
8320439
to
91e481d
Compare
thanks so much for the PR! And thanks for giving this project some much needed love. LGTM, looks like it needs some formatting changes though. Sorry for the late reply, I've been pretty busy lately |
ok so formatting changes should probably work with just |
|
This pull request contains four small-ish fixes/improvements:
UBLUE_LOG
to match the behavior of most other tools--config
CLI option to allow alternate config files when testing...as well as two new features related to the update precondition checks (these two were the main driver for this pull request):
Add a
network_not_metered
check to prevent downloading multiple GB of data when on metered/mobile connections(the latter of which happened to me while using my smartphone as a hotspot).
This check should probably be enabled in all environments where NetworkManager is supported, to avoid annoying surprises on mobile data plans. It is currently disabled by default, though, to not break any existing installations.
Add a facility for using fully custom scripts to check for additional preconditions.
My personal rationale for this is that I want to be able to prevent unnecessary background work when using my laptop for a DJ set, to avoid stutter. I'm not sure yet whether I want to use a manual settings toggle or automatic detection of the DJ software for this, but implementing it in a flexible manner allows me and other to solve these usecases without bloating up the
ublue_update
code too much.Fixes #115