Add --fast mode to skip artificial delays & show apt download progress#153
Open
FrankiePustorino wants to merge 1 commit intoUtappia:developfrom
Open
Add --fast mode to skip artificial delays & show apt download progress#153FrankiePustorino wants to merge 1 commit intoUtappia:developfrom
FrankiePustorino wants to merge 1 commit intoUtappia:developfrom
Conversation
The script includes many sleep calls and a 5‑second countdown, adding ~20s of unnecessary wait. The pre‑flight check runs a full apt -s dist-upgrade simulation, duplicating work and costing 10–30s on large systems. The apt full-upgrade output was redirected through grep, which destroyed the dynamic download progress bar. Users couldn't see how much was downloading. Solution -f / --fast flag: When active, all sleep calls are bypassed, the countdown is skipped, and the heavy apt -s dist-upgrade simulation is replaced with a quick apt-get check. Essential safety checks remain unchanged. Progress bar fix: The full-upgrade command now pipes only stderr through grep, keeping the apt progress bar visible on stdout. Changes Added global variable UCARE_FAST=0. Introduced _sleep() helper that respects fast mode; replaced every sleep with _sleep. COUNTDOWN() now skips the wait in fast mode. In PREUPDATE_PREFLIGHT, the upgrade simulation block is conditional; in fast mode runs apt-get check instead. In MAINTENANCE, changed full-upgrade redirection to 2> >(grep ... >&2) to preserve progress output. Added -f/--fast option parsing and help text. Backward Compatibility No existing behavior changes unless the new flag is explicitly used. All other options remain identical.
Member
|
Nice work ! I'll test it the following weeks. Thanks for your continued contribution! |
Contributor
Author
|
my pleasure :-) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The script includes many sleep calls and a 5‑second countdown, adding ~20s of unnecessary wait.
The pre‑flight check runs a full apt -s dist-upgrade simulation, duplicating work and costing 10–30s on large systems.
The apt full-upgrade output was redirected through grep, which destroyed the dynamic download progress bar. Users couldn't see how much was downloading.
Solution
-f / --fast flag: When active, all sleep calls are bypassed, the countdown is skipped, and the heavy apt -s dist-upgrade simulation is replaced with a quick apt-get check. Essential safety checks remain unchanged.
Progress bar fix: The full-upgrade command now pipes only stderr through grep, keeping the apt progress bar visible on stdout.
Changes
Added global variable UCARE_FAST=0.
Introduced _sleep() helper that respects fast mode; replaced every sleep with _sleep.
COUNTDOWN() now skips the wait in fast mode.
In PREUPDATE_PREFLIGHT, the upgrade simulation block is conditional; in fast mode runs apt-get check instead.
In MAINTENANCE, changed full-upgrade redirection to 2> >(grep ... >&2) to preserve progress output.
Added -f/--fast option parsing and help text.
Backward Compatibility
No existing behavior changes unless the new flag is explicitly used. All other options remain identical.