[Bug 1913726] Re: /usr/lib/update-notifier/list-oem-metapackages:apt_pkg.Error:/usr/lib/update-notifier/list-oem-metapackages at 43:__init__:open

Ɓukasz Zemczak 1913726 at bugs.launchpad.net
Thu Mar 25 10:34:26 UTC 2021


Next time also include the version number of the package that has been
tested! But otherwise, it's all good.

-- 
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/1913726

Title:
  /usr/lib/update-notifier/list-oem-metapackages:apt_pkg.Error:/usr/lib
  /update-notifier/list-oem-metapackages at 43:__init__:open

Status in update-notifier package in Ubuntu:
  Fix Released
Status in update-notifier source package in Focal:
  Fix Committed

Bug description:
  [ Description ]

  If you have malformed apt lists, list-oem-metapackages, a script which
  update-notifier runs before it launches update-manager, can crash.

  [ Fix ]

  Catch failures to construct an apt.Cache object and exit.

  [ QA ]

  1. Edit a list file in /var/lib/apt/lists which is being used - for example that for the Ubuntu archive's 'main' component.
  2. Type some gibberish at the top.
  3. Run /usr/lib/update-notifier/list-oem-metapackages as a regular user.
  4. When using the current version of update-notifier this should crash. After updating it should print an error and exit 0.
  5. Now you can `apt update` or revert what you did in step 2 manually.

  [ Where problems could occur ]

  We're proceeding to run update-manager now when we know that apt is in
  a bogus state. This was the status quo for a long time before the
  recent update which introduced list-oem-metapackages, but we could
  maybe do something different there.

  [ 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.38, the problem page at https://errors.ubuntu.com/problem/e8eeed367adc9f2602fec155d19013736a59b99c 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/.

  Traceback (most recent call last):
    File "/usr/lib/update-notifier/list-oem-metapackages", line 43, in <module>
      cache = apt.Cache()
    File "/usr/lib/python3/dist-packages/apt/cache.py", line 170, in __init__
      self.open(progress)
    File "/usr/lib/python3/dist-packages/apt/cache.py", line 232, in open
      self._cache = apt_pkg.Cache(progress)
  apt_pkg.Error: E:can not open /var/lib/apt/lists/fr.archive.ubuntu.com_ubuntu_dists_focal_InRelease - fopen (13: Permission denied), E:The package lists or status file could not be parsed or opened.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/update-notifier/+bug/1913726/+subscriptions



More information about the foundations-bugs mailing list