[Bug 1512326] Re: Running apt-check --package-names returns an unknown error

Woody dave at woodwardmail.com
Fri Feb 12 10:54:23 UTC 2016


Have tested version 3.163.1, and can confirm this is fixed.

Thanks

Woody

$ /usr/lib/update-notifier/apt-check --package-names
libavresample-ffmpeg2
gstreamer1.0-plugins-bad-faad
simple-scan
gstreamer1.0-libav
gir1.2-gst-plugins-base-1.0
libgstreamer-plugins-base1.0-0
libpgm-5.1-0
gstreamer1.0-plugins-base
gir1.2-gtk-3.0
gstreamer1.0-x
gstreamer1.0-plugins-ugly-amr

$ dpkg -s update-notifier-common
Package: update-notifier-common
Status: install ok installed
Priority: optional
Section: gnome
Installed-Size: 1372
Maintainer: Michael Vogt <michael.vogt at ubuntu.com>
Architecture: all
Source: update-notifier
Version: 3.163.1

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

Title:
  Running apt-check --package-names returns an unknown error

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

Bug description:
  When running /usr/lib/update-notifier/apt-check --package-names the
  following error is returned:

  $ /usr/lib/update-notifier/apt-check --package-names
  E: Unknown Error: '<class 'TypeError'>' (map() must have at least two arguments.)

  What I expected was a list of packages which can be upgraded.

  From what I understand, the map function requires 2 arguments, but the
  list comprehension used is only creating a single argument, which is
  the package name.

  I found if  I changed the function

  def write_package_names(outstream, cache, depcache):
      " write out package names that change to outstream "
      pkgs = [pkg for pkg in cache.packages if depcache.marked_install(pkg) or
          depcache.marked_upgrade(pkg)]
      outstream.write("\n".join(map([p.name for p in pkgs])))


  def write_package_names(outstream, cache, depcache):
      " write out package names that change to outstream "
      pkgs = [pkg for pkg in cache.packages if depcache.marked_install(pkg) or
          depcache.marked_upgrade(pkg)]
      outstream.write("\n".join([p.name for p in pkgs]))        #Removed the map() function

  
  Additional info:
  $ lsb_release -rd
  Description:    Ubuntu 15.10
  Release:        15.10

  $ apt-cache policy update-notifier-common
  update-notifier-common:
    Installed: 3.163
    Candidate: 3.163
    Version table:
   *** 3.163 0
          500 http://gb.archive.ubuntu.com/ubuntu/ wily/main amd64 Packages
          100 /var/lib/dpkg/status

  Thanks

  Dave

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



More information about the foundations-bugs mailing list