[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
Lucas Albuquerque Medeiros de Moura
2003543 at bugs.launchpad.net
Tue Jan 24 12:50:27 UTC 2023
** Description changed:
+ [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/.
+ 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
--
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:
New
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