← Back to team overview

mythbuntu-bugs team mailing list archive

[Bug 1013171] Re: Many package hooks not ported to python3

 

compiz needs the same one-line patch as the last few, and it has another
issue, at least on my machine.  It appears the 'source_compiz.py' hook
needs this import:

  from apport.hookutils import *

And I've added that in my patch.  Without it 'ubuntu-bug compiz' throws
an exception, saying the function 'command_output' is not defined.

  ERROR: hook /usr/share/apport/package-hooks//source_compiz.py crashed:
  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/apport/report.py", line 799, in add_hooks_info
      symb['add_info'](self, ui)
    File "/usr/share/apport/package-hooks//source_compiz.py", line 18, in add_info
      report['CompizPlugins'] = command_output(['gconftool-2',
  NameError: global name 'command_output' is not defined

Some apport hooks have the import statement above.  Some have just
'import apport.hookutils'.  Only the former fixed this on my system.
The latter seems to work fine for other packages, but not here.  Maybe
I'm misssing something; I didn't explore this any further.   (Nor did I
try to fix bug 777221 while I was in there. :)

Thanks.


** Patch added: "python3 patch for compiz's apport hook.  also adds an 'import' that seems needed."
   https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/1013171/+attachment/3207409/+files/compiz.patch

** Changed in: compiz (Ubuntu Quantal)
       Status: New => Confirmed

-- 
You received this bug notification because you are a member of Mythbuntu
Bug Team, which is subscribed to mythtv in Ubuntu.
https://bugs.launchpad.net/bugs/1013171

Title:
  Many package hooks not ported to python3

Status in “apport” package in Ubuntu:
  Fix Released
Status in “apport-symptoms” package in Ubuntu:
  Fix Released
Status in “bluez” package in Ubuntu:
  Fix Released
Status in “cairo-dock” package in Ubuntu:
  Fix Released
Status in “chromium-browser” package in Ubuntu:
  Confirmed
Status in “compiz” package in Ubuntu:
  Confirmed
Status in “connman” package in Ubuntu:
  Confirmed
Status in “dkms” package in Ubuntu:
  Fix Released
Status in “gnome-control-center” package in Ubuntu:
  Fix Committed
Status in “gnome-settings-daemon” package in Ubuntu:
  Confirmed
Status in “indicator-applet” package in Ubuntu:
  Confirmed
Status in “libatasmart” package in Ubuntu:
  Fix Released
Status in “lxpanel” package in Ubuntu:
  Confirmed
Status in “mdadm” package in Ubuntu:
  Fix Released
Status in “mysql-5.5” package in Ubuntu:
  Confirmed
Status in “mythtv” package in Ubuntu:
  Fix Released
Status in “nautilus” package in Ubuntu:
  Confirmed
Status in “network-manager” package in Ubuntu:
  Fix Committed
Status in “shadow” package in Ubuntu:
  Fix Released
Status in “udisks2” package in Ubuntu:
  Fix Released
Status in “unity” package in Ubuntu:
  Confirmed
Status in “xdiagnose” package in Ubuntu:
  Fix Released
Status in “apport” source package in Quantal:
  Fix Released
Status in “apport-symptoms” source package in Quantal:
  Fix Released
Status in “bluez” source package in Quantal:
  Fix Released
Status in “cairo-dock” source package in Quantal:
  Fix Released
Status in “chromium-browser” source package in Quantal:
  Confirmed
Status in “compiz” source package in Quantal:
  Confirmed
Status in “connman” source package in Quantal:
  Confirmed
Status in “dkms” source package in Quantal:
  Fix Released
Status in “gnome-control-center” source package in Quantal:
  Fix Committed
Status in “gnome-settings-daemon” source package in Quantal:
  Confirmed
Status in “indicator-applet” source package in Quantal:
  Confirmed
Status in “libatasmart” source package in Quantal:
  Fix Released
Status in “lxpanel” source package in Quantal:
  Confirmed
Status in “mdadm” source package in Quantal:
  Fix Released
Status in “mysql-5.5” source package in Quantal:
  Confirmed
Status in “mythtv” source package in Quantal:
  Fix Released
Status in “nautilus” source package in Quantal:
  Confirmed
Status in “network-manager” source package in Quantal:
  Fix Committed
Status in “shadow” source package in Quantal:
  Fix Released
Status in “udisks2” source package in Quantal:
  Fix Released
Status in “unity” source package in Quantal:
  Confirmed
Status in “xdiagnose” source package in Quantal:
  Fix Released

Bug description:
  Since the description here is the only post that can be updated, it
  seems the best place to keep a changing list of packages that need
  examining.  (The original description was brief, and about only one
  package.)

  We've fixed all the packages that found in the apt logs uploaded in
  the first round of breakage.  Now I've tried to review all the other
  apport hooks I could find in Quantal.  Working from the archive's
  Contents file, I got the list of packages that have files under
  /usr/share/apport/package-hooks .  I skipped the packages already
  fixed above, and those that were on my system, during the first round
  of breakage, and had no problems.  For the rest, I downloaded the
  debs, extracted the apport hooks, and ran '2to3' on them.  I've posted
  patches for every package that broke under python3.

  Thanks - Edward Donovan <edward.donovan@xxxxxxxxxx>

  These packages didn't break during the apport upgrade that forced a
  recompile, but they get warnings from the 2to3 tool:

    compiz-core
    eclipse-platform
    gnome-control-center-data
    gnome-settings-daemon
    grub-common
    nautilus-data
    unity-common
    apache2.2-common

  Now we have a bug report for at least gnome-control-center, bug
  1018537, which I've duped here.  So these may need patching, too.

  Hm...from a preliminary look, a number of those use the same code:

      if report.has_key("Stacktrace")

  which generates an exception with python3.  We're probably going to
  want to change those to

     if "Stacktrace" in report

  and I'll try to post some of those simple patches, soon.

  Side note:

    rss-glx: the python is fine, but the hook file is just named
  'source', with no package name or extension, so I filed bug 1017780
  about that.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1013171/+subscriptions