Merge lp:~rbalint/update-notifier/motd-stale-pkglist into lp:update-notifier/ubuntu
Status: | Merged |
---|---|
Merged at revision: | 976 |
Proposed branch: | lp:~rbalint/update-notifier/motd-stale-pkglist |
Merge into: | lp:update-notifier/ubuntu |
Diff against target: |
84 lines (+30/-1) 6 files modified
data/Makefile.am (+1/-1) data/notify-updates-outdated (+19/-0) debian/90-updates-available (+2/-0) debian/changelog (+6/-0) debian/update-notifier-common.install (+1/-0) po/POTFILES.in (+1/-0) |
To merge this branch: | bzr merge lp:~rbalint/update-notifier/motd-stale-pkglist |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Julian Andres Klode | Needs Fixing | ||
Matthew Paul Thomas | Pending | ||
Review via email: mp+372675@code.launchpad.net |
Description of the change
This is how MOTD looks like with the change:
-----
root@ee-debconf:~# update-motd
Welcome to Ubuntu Eoan Ermine (development branch) (GNU/Linux 5.0.0-25-generic x86_64)
* Documentation: https:/
* Management: https:/
* Support: https:/
System information as of Thu Sep 12 08:00:34 UTC 2019
System load: 0.58 Processes: 30
Usage of /home: unknown Users logged in: 0
Memory usage: 0% IP address for eth0: 10.84.73.74
Swap usage: 81%
* Congrats to the Kubernetes community on 1.16 beta 1! Now available
in MicroK8s for evaluation and testing, with upgrades to RC and GA
snap info microk8s
205 updates can be installed immediately.
0 of these updates are security updates.
To see these additional updates run: apt list --upgradable
root@ee-debconf:~# touch -t 01010101 /var/lib/
root@ee-debconf:~# update-motd
Welcome to Ubuntu Eoan Ermine (development branch) (GNU/Linux 5.0.0-25-generic x86_64)
* Documentation: https:/
* Management: https:/
* Support: https:/
System information as of Thu Sep 12 08:00:41 UTC 2019
System load: 0.65 Processes: 30
Usage of /home: unknown Users logged in: 0
Memory usage: 0% IP address for eth0: 10.84.73.74
Swap usage: 81%
* Congrats to the Kubernetes community on 1.16 beta 1! Now available
in MicroK8s for evaluation and testing, with upgrades to RC and GA
snap info microk8s
205 updates can be installed immediately.
0 of these updates are security updates.
To see these additional updates run: apt list --upgradable
The information about available updates is more than a week old.
To download information about new updates run: apt update
root@ee-debconf:~#
---
I chose to hardcode one week to keep the gettext string very simple and IMO it is a reasonable time after which staleness should be reported.
The message is also shown when the updates-available file does not exist:
---
root@ee-debconf:~# rm /var/lib/
root@ee-debconf:~# update-motd
Welcome to Ubuntu Eoan Ermine (development branch) (GNU/Linux 5.0.0-25-generic x86_64)
* Documentation: https:/
* Management: https:/
* Support: https:/
System information as of Thu Sep 12 08:07:42 UTC 2019
System load: 0.77 Processes: 29
Usage of /home: unknown Users logged in: 0
Memory usage: 0% IP address for eth0: 10.84.73.74
Swap usage: 81%
* Congrats to the Kubernetes community on 1.16 beta 1! Now available
in MicroK8s for evaluation and testing, with upgrades to RC and GA
snap info microk8s
The information about available updates is more than a week old.
To download information about new updates run: apt update
---
This is a bit ugly but it is not likely to occur in practice due shipping the file in official images.
I can add more code to handle that, too. For the first round I tried to keep the code very simple.
I just added sudo to prefix apt command.