← Back to team overview

group.of.nepali.translators team mailing list archive

[Bug 2003543] Re: /usr/lib/update-notifier/package-data-downloader:KeyError:/usr/lib/update-notifier/package-data-downloader@351:process_download_requests:trigger_update_notifier:substitute:convert

 

This bug was fixed in the package update-notifier - 3.192.30.16

---------------
update-notifier (3.192.30.16) focal; urgency=medium

  * po/*.po: do not translate template variable needed for
    package-data-downloader script (LP: #2003543)

update-notifier (3.192.30.15) focal; urgency=medium

  [ Renan Rodrigo Barbosa]
  * Rely on the Pro Client apt esm cache to check for esm updates
    (LP: #2002168)

 -- Lucas Moura <lucas.moura@xxxxxxxxxxxxx>  Fri, 20 Jan 2023 16:17:53
-0300

** Changed in: update-notifier (Ubuntu Bionic)
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/2003543

Title:
  /usr/lib/update-notifier/package-data-
  downloader:KeyError:/usr/lib/update-notifier/package-data-
  downloader@351:process_download_requests:trigger_update_notifier:substitute:convert

Status in update-notifier package in Ubuntu:
  Fix Released
Status in update-notifier source package in Xenial:
  Fix Released
Status in update-notifier source package in Bionic:
  Fix Released
Status in update-notifier source package in Focal:
  Fix Released
Status in update-notifier source package in Jammy:
  Fix Released
Status in update-notifier source package in Kinetic:
  Fix Released

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

  echo "#########################################"
  echo "Installing latest version of update-notifier"
  lxc exec $name -- 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
  echo -e "#########################################\n"

  echo "#########################################"
  echo "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
  echo -e "#########################################\n"

  echo "#########################################"
  echo "Installing fonts package (verify stacktrace)"
  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 -- sh -c "cd /var/cache/apt/archives; echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections"
  lxc exec $name -- sh -c "dpkg -i /var/cache/apt/archives/$pkg_name || true"
  lxc exec $name -- apt purge ttf-mscorefonts-installer -y > /dev/null
  echo -e "#########################################\n"

  lxc config device remove $name eth0
  lxc exec $name -- sudo reboot
  sleep 5

  echo "#########################################"
  echo "Update update-notifier package to proposed version"
  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
  echo -e "#########################################\n"

  echo "#########################################"
  echo "Installing fonts package (verify no error)"
  lxc config device add $name eth0 none
  lxc exec $name -- sh -c "cd /var/cache/apt/archives; echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections"
  lxc exec $name -- sh -c "dpkg -i /var/cache/apt/archives/$pkg_name || true"
  echo -e "#########################################\n"

  echo "#########################################"
  echo "Verify that file created by package-data-downloader has the \$package variable replaced"
  if lxc exec $name -- grep -Fq "\$package" /var/lib/update-notifier/user.d/data-downloads-failed; then
      echo "FAILURE: \$package variable found"
  else
      echo "SUCCESS: No \$package variable found"
  fi

  if lxc exec $name -- grep -Fq "ttf-mscorefonts-installer" /var/lib/update-notifier/user.d/data-downloads-failed; then
      echo "SUCCESS: ttf-mscorefonts-installer appears in the file"
  else
      echo "FAILURE: ttf-mscorefonts-installer does not appear in the file"
  fi

  echo -e "#########################################\n"
  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