[Bug 1926819] Re: Empty MOTD on up-to-date systems (includes fix)

Ɓukasz Zemczak 1926819 at bugs.launchpad.net
Mon May 31 17:16:21 UTC 2021


Hello Aaron, or anyone else affected,

Accepted update-notifier into hirsute-proposed. The package will build
now and be available at https://launchpad.net/ubuntu/+source/update-
notifier/3.192.40.3 in a few hours, and then in the -proposed
repository.

Please help us by testing this new package.  See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
to enable and use -proposed.  Your feedback will aid us getting this
update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested, what testing has been
performed on the package and change the tag from verification-needed-
hirsute to verification-done-hirsute. If it does not fix the bug for
you, please add a comment stating that, and change the tag to
verification-failed-hirsute. In either case, without details of your
testing we will not be able to proceed.

Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification .  Thank you in
advance for helping!

N.B. The updated package will be released to -updates after the bug(s)
fixed by this package have been verified and the package has been in
-proposed for a minimum of 7 days.

** Changed in: update-notifier (Ubuntu Hirsute)
       Status: New => Fix Committed

** Tags added: verification-needed verification-needed-hirsute

-- 
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 Released
Status in update-notifier source package in Focal:
  Fix Committed
Status in update-notifier source package in Hirsute:
  Fix Committed

Bug description:
  [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.

  [Original 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