Skip to content

Add --fast mode to skip artificial delays & show apt download progress#153

Open
FrankiePustorino wants to merge 1 commit intoUtappia:developfrom
FrankiePustorino:patch-3
Open

Add --fast mode to skip artificial delays & show apt download progress#153
FrankiePustorino wants to merge 1 commit intoUtappia:developfrom
FrankiePustorino:patch-3

Conversation

@FrankiePustorino
Copy link
Copy Markdown
Contributor

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.

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.
@cerebrux
Copy link
Copy Markdown
Member

cerebrux commented May 3, 2026

Nice work ! I'll test it the following weeks. Thanks for your continued contribution!

@FrankiePustorino
Copy link
Copy Markdown
Contributor Author

my pleasure :-)

@cerebrux cerebrux changed the base branch from master to develop May 5, 2026 10:49
@cerebrux cerebrux self-assigned this May 5, 2026
@cerebrux cerebrux added the Enhancement Proposed features label May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Proposed features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants