This bug was fixed in the package ubuntu-advantage-tools - 30.1

---------------
ubuntu-advantage-tools (30.1) noble; urgency=medium

  * fix UnboundLocalError in update-check error handling (LP: #2043836)

 -- Grant Orndorff <grant.orndo...@canonical.com>  Fri, 17 Nov 2023
14:25:22 -0500

** Changed in: ubuntu-advantage-tools (Ubuntu)
       Status: Triaged => 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/2043836

Title:
  /usr/bin/ubuntu-
  
advantage:UnboundLocalError:wrapper:main:action_security_status:security_status_dict:get_installed_packages_by_origin:__enter__:get_apt_pkg_cache:get_last_known_candidate:get_pkg_candidate_version:__enter__:get_apt_pkg_cache:/usr/bin/ubuntu-
  
advantage@33:wrapper:_warn_about_new_version:check_for_new_version:get_last_known_candidate

Status in ubuntu-advantage-tools package in Ubuntu:
  Fix Released
Status in ubuntu-advantage-tools source package in Xenial:
  New
Status in ubuntu-advantage-tools source package in Bionic:
  New
Status in ubuntu-advantage-tools source package in Focal:
  New
Status in ubuntu-advantage-tools source package in Jammy:
  New
Status in ubuntu-advantage-tools source package in Lunar:
  New
Status in ubuntu-advantage-tools source package in Mantic:
  New

Bug description:
  [ Impact ]

  When apt cannot be run as a normal user, and a pro command is run as a
  normal user, a bug occurs in the error handling. An UnboundLocalError
  occurs.

  The fix is to give that variable an initial value so that it is not
  unbound during the error handling.

  [ Test Plan ]

  lxc launch ubuntu-daily:jammy test
  lxc shell test
  # now inside the container
  # intentionally mess up permissions on apt-related files
  chmod 600 /var/lib/dpkg
  sudo -u ubuntu pro version
  # that will give you a long backtrace if the bug is present

  [ Where problems could occur ]

  The changed code involves notifying the user if there is a newer
  version of u-a-t available. It runs at the end of every pro CLI
  command. If a mistake was made it could prevent pro from notifying
  users that an update is available. In the worst case, if the change
  causes a permanent error, then that would cause all pro commands to
  start exiting non-zero.

  [ Original Description ]

  The Ubuntu Error Tracker has been receiving reports about a problem regarding 
ubuntu-advantage-tools.  This problem was most recently seen with package 
version 30~22.04, the problem page at 
https://errors.ubuntu.com/problem/f81cc464c2fac370f79ae4c1c2f3400b2eb55481 
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/.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/2043836/+subscriptions


_______________________________________________
Mailing list: https://launchpad.net/~group.of.nepali.translators
Post to     : group.of.nepali.translators@lists.launchpad.net
Unsubscribe : https://launchpad.net/~group.of.nepali.translators
More help   : https://help.launchpad.net/ListHelp

Reply via email to