That's a good idea.  It might be good if this was at a low enough level
in apt that aptitude, and even apt-get, could prompt, too.  (or just
warn if non-interactive).

 Download speed is very hard to predict, and could take a _really_ long
time.  So it would be smart to check battery status after download but
before install.  Alway warn at that point if you're on batteries, but if
there is lots of battery left and few updates, don't hold up the process
by waiting for user input.

 A good heuristic might be:  Get time until battery-critical shutdown
(from ACPI on PC hardware...).  Estimate update install time very
conservatively (in case of slow discs and/or competing I/O load) as 5s
per package + 10s per uncompressed MB.  (made-up numbers, not based on
any measurements.)  Some packages have time-consuming post-install
scripts; another reason for a conservative estimate.

  If install time > (battery - 10min), wait for user confirmation.  This
is after download.  But always warn when on battery before starting to
download, in case the user goes away right after starting the download.

 The extra heuristics for forcing user confirmation before actually
installing when on battery may be excessive, but a forced shutdown
during an update could cause a really big problem.  (most laptops
support suspend or hibernate, but some may resort to shutdown -h now.)

-- 
update manager should warn about laptop running on battery when installing big 
updates
https://bugs.launchpad.net/bugs/377697
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to