[Bug 2003543] Re: /usr/lib/update-notifier/package-data-downloader:KeyError:/usr/lib/update-notifier/package-data-downloader at 351:process_download_requests:trigger_update_notifier:substitute:convert
Andreas Hasenack
2003543 at bugs.launchpad.net
Tue Jan 24 22:51:57 UTC 2023
Hello errors.ubuntu.com, or anyone else affected,
Accepted update-notifier into jammy-proposed. The package will build now
and be available at https://launchpad.net/ubuntu/+source/update-
notifier/3.192.54.5 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-
jammy to verification-done-jammy. If it does not fix the bug for you,
please add a comment stating that, and change the tag to verification-
failed-jammy. 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.
** Tags added: verification-needed-jammy
** Tags added: verification-needed-focal
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to update-notifier in Ubuntu.
https://bugs.launchpad.net/bugs/2003543
Title:
/usr/lib/update-notifier/package-data-
downloader:KeyError:/usr/lib/update-notifier/package-data-
downloader at 351:process_download_requests:trigger_update_notifier:substitute:convert
Status in update-notifier package in Ubuntu:
Fix Committed
Status in update-notifier source package in Xenial:
Fix Committed
Status in update-notifier source package in Bionic:
Fix Committed
Status in update-notifier source package in Focal:
Fix Committed
Status in update-notifier source package in Jammy:
Fix Committed
Status in update-notifier source package in Kinetic:
Fix Committed
Bug description:
[Original Description]
The Ubuntu Error Tracker has been receiving reports about a problem regarding update-notifier. This problem was most recently seen with package version 3.192.60, the problem page at https://errors.ubuntu.com/problem/09c9352b62a3d0ae149fb2c93dbd80a2a84d4053 contains more details, including versions of packages affected, stacktrace or traceback, and individual crash reports.
If you do not have access to the Ubuntu Error Tracker and are a software developer, you can request it at http://forms.canonical.com/reports/
[Impact]
If there is an error on the package-data-downloader script and the
user is using an affected locale, this traceback will appear and
prevent the user from seeing the real issue that is affecting the
script.
[Test Case]
You can replicate this issue by running the following script:
---------------------------------
#!/bin/bash
set -e
series=$1
name=$series-dev
cleanup () {
lxc delete $name --force
}
on_err () {
echo -e "Test Failed"
cleanup
exit 1
}
trap on_err ERR
lxc launch ubuntu-daily:$series $name
sleep 10
# Update update-notifier package
lxc exec $name -- sh -c "echo \"deb http://archive.ubuntu.com/ubuntu $series-proposed main\" | tee /etc/apt/sources.list.d/proposed.list"
lxc exec $name -- sudo apt-get update > /dev/null
lxc exec $name -- sudo apt-get install update-notifier-common -y > /dev/null
lxc exec $name -- apt-cache policy update-notifier-common
# Change locales to welsh
lxc exec $name -- sh -c "DEBIAN_FRONTEND=noninteractive sudo apt-get install language-pack-cy -y > /dev/null"
lxc exec $name -- sudo update-locale LANG=cy_GB.UTF-8
lxc exec $name -- sudo reboot
sleep 5
lxc config set $name environment.LC_ALL=cy_GB.UTF-8
# Installing a fonts package
lxc exec $name -- apt-get update > /dev/null
lxc exec $name -- apt-get -y --download-only install ttf-mscorefonts-installer
lxc config device add $name eth0 none
pkg_name=$(lxc exec $name -- ls /var/cache/apt/archives/ | grep ttf)
lxc exec $name -- dpkg -i /var/cache/apt/archives/$pkg_name
cleanup
--------------------------------------------
Once the new package is in proposed, we can re-use this script to
verify that the traceback is no longer appearing.
[Discussion]
This error is being caused by an incorrectly translated variable in a template file. This template file is being used by the package-data-downloader script, which is delivered by the update-notifier-common
package. If the user is using one of the affected locales (i.e. cy_GB.UTF-8) and the user installs a package that triggers it (i.e. ttf-mscorefonts-installer) and the script fail somehow, the user will be presented with this stacktrace error.
The fix for this is to simply not translate the variable name in the
template file.
[Changelog]
* po/*.po: do not translate template variable needed for
package-data-downloader script
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/update-notifier/+bug/2003543/+subscriptions
More information about the foundations-bugs
mailing list