[Bug 1926819] Re: Empty MOTD on up-to-date systems (includes fix)
Lucas Albuquerque Medeiros de Moura
1926819 at bugs.launchpad.net
Fri May 14 21:00:02 UTC 2021
SRU template verification
[Impact]
On a system without updates to be installed, not showing any message in motd feels that something went wrong in the backend. Also, currently we are printing unwanted white spaces in that scenario, which is not a good user experience here.
[Test case]
To reproduce the issue, you can:
1. Launch a xenial container
2. Remove ubuntu-advantage-tools from the system
This package will make update-notifier show more messages which are not needed in that test
3. Run an apt update
4. Install update-notifier
5. Run apt upgrade
6. Run /usr/lib/update-notifier/apt_check.py --human-readable
7. Verify we deliver an empty message
To verify that the error is fixed:
1. Run the past scenario until step 4
2. Install the new update-notifier from this ppa:
https://launchpad.net/~lamoura/+archive/ubuntu/update-notifier-test-ppa/
3. Run `/usr/lib/update-notifier/apt-check --human-readable`
4. Verify that the command print the following message:
0 updates can be applied immediately.
[Where problems could occur]
We are bringing back a behavior that was already present in the package,
but removed in the last version of it. We will now be impacting users
that may not be relying in that message anymore. But we believe this
should not be a huge issue if that happens, since users were already
relying on the old behavior.
[Discussion]
Currently, motd will not output a message if the system does not have any updates to apply. However, this is not ideal since this may cause the impression that there is something wrong with motd or the system. Also, the empty message we produce in that scenario is not completely empty, it does contain some white spaces on it, which is completely unnecessary.
Because of that, we are bringing back the behavior of printing the
message:
0 updates can be applied immediately.
If no updates need to be applied in the system.
--
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1926819
Title:
Empty MOTD on up-to-date systems (includes fix)
Status in update-notifier package in Ubuntu:
Fix Committed
Bug description:
Starting with update-notifier-common 3.192.30.7 (focal), my up-to-date
systems are showing this MOTD on login:
Welcome to Ubuntu 20.04.2 LTS (GNU/Linux 5.4.0-72-generic x86_64)
user at host:~$
I've attached a patch that fixes this issue and adds more test cases.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/update-notifier/+bug/1926819/+subscriptions
More information about the Ubuntu-sponsors
mailing list