Bug#826751: apt: download even not on AC power
Package: apt
Version: 1.2.12
Severity: wishlist
File: /usr/lib/apt/apt.systemd.daily
Dear Maintainer,
On my last laptop, I appreciated the forbearance of the daily apt cron
run, which exited on battery power. This laptop fortunately has an SSD,
and the apt run doesn't produce much battery drain.
Thus, could the apt.systemd.daily script incorporate an option like
"DownloadEvenOnBatteryPower" (false by default)? For now, I comment out
the two checks as shown in the following diff. But whenever the script
is updated upstream, I lose my change.
--- /usr/lib/apt/apt.systemd.daily 2016-05-11 10:48:22.000000000 -0400
+++ /usr/lib/apt/apt.systemd.daily 2016-06-08 11:29:04.117437843 -0400
@@ -357,7 +357,7 @@
set -x
fi
-check_power || exit 0
+# check_power || exit 0
# check if we can lock the cache and if the cache is clean
if which apt-get >/dev/null 2>&1 && ! eval apt-get check $XAPTOPT $XSTDERR ; then
@@ -410,7 +410,7 @@
do_cache_backup $BackupArchiveInterval
# ensure we don't do this on battery
-check_power || exit 0
+# check_power || exit 0
# include default system language so that "apt-get update" will
# fetch the right translated package descriptions
-- System Information:
Debian Release: stretch/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.5.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages apt depends on:
ii adduser 3.114
ii debian-archive-keyring 2014.3
ii gnupg 1.4.20-6
ii gnupg2 2.1.11-7
ii gpgv 1.4.20-6
ii init-system-helpers 1.34
ii libapt-pkg5.0 1.2.12
ii libc6 2.22-9
ii libgcc1 1:6.1.1-4
ii libstdc++6 6.1.1-4
apt recommends no packages.
Versions of packages apt suggests:
pn apt-doc <none>
ii aptitude 0.7.5-3
ii dpkg-dev 1.18.7
ii python-apt 1.1.0~beta2
ii synaptic 0.83+b1
-- no debconf information
-- debsums errors found:
debsums: changed file /usr/lib/apt/apt.systemd.daily (from apt package)
Reply to: