/usr/bin/apturl-gtk:AttributeError:/usr/bin/apturl-gtk@47:main:enableChannel:doEnableChannel

Bug #1566201 reported by errors.ubuntu.com bug bridge
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apturl (Ubuntu)
Fix Released
High
Mathieu Trudel-Lapierre
Xenial
Fix Released
High
Mathieu Trudel-Lapierre

Bug Description

[Impact]
Users may not be able to successfully install packages using apturl, especially from other channels from the release archive (ie. using the partner archive).

[Test case]
1) apturl-gtk "apt:adobe-flashplugin?channel=xenial-partner"

[Regression potential]
Possible regressions include a failure to see a package as not being virtual due to not finding the package in the right specified location; also, it may be possible for the UI interface to be shown as completely insensitive (can't be clicked) in the event of a regression.

--

The Ubuntu Error Tracker has been receiving reports about a problem regarding apturl. This problem was most recently seen with version 0.5.2ubuntu11, the problem page at https://errors.ubuntu.com/problem/7296934db3911cad4d00829c2f458a532da30d62 contains more details.

Revision history for this message
Brian Murray (brian-murray) wrote :

I was able to recreate this by changing $distro in the ProcCmdline from the a report to xenial. So this command crashes:

/usr/bin/python3 /usr/bin/apturl-gtk "apt:adobe-flashplugin?channel=xenial-partner"

With the following Traceback:

Traceback (most recent call last):
  File "/usr/bin/apturl-gtk", line 47, in <module>
    sys.exit(apturl.main())
  File "/usr/lib/python3/dist-packages/AptUrl/AptUrl.py", line 191, in main
    if self.enableChannel(apturl) != RESULT_OK:
  File "/usr/lib/python3/dist-packages/AptUrl/AptUrl.py", line 99, in enableChannel
    if not self.ui.doEnableChannel(channelpath, channelkey):
  File "/usr/lib/python3/dist-packages/AptUrl/gtk/GtkUI.py", line 135, in doEnableChannel
    apt_pkg.Config.FindDir("Dir::Etc::sourceparts")]
AttributeError: module 'apt_pkg' has no attribute 'Config'

Changed in apturl (Ubuntu):
status: New → Triaged
importance: Undecided → High
Revision history for this message
Brian Murray (brian-murray) wrote :

apt_pkg.Config.FindDir() should be apt_pkg.config.find_dir(), but with that I then get this Traceback:

raceback (most recent call last):
  File "/home/bdmurray/source-trees/apturl/trunk/AptUrl/gtk/backend/InstallBackendAptdaemon.py", line 35, in update
    yield self._run_in_dialog(trans, self.UPDATE)
AttributeError: 'InstallBackendAptdaemon' object has no attribute 'UPDATE'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/defer/__init__.py", line 487, in _inline_callbacks
    result = gen.send(result)
  File "/home/bdmurray/source-trees/apturl/trunk/AptUrl/gtk/backend/InstallBackendAptdaemon.py", line 39, in update
    self._action_done(self.UPDATE, True, False, None, None)
AttributeError: 'InstallBackendAptdaemon' object has no attribute 'UPDATE'

Revision history for this message
Brian Murray (brian-murray) wrote :

I've sorted out the UPDATE but that led to yet another one:

Traceback (most recent call last):
  File "/home/bdmurray/source-trees/apturl/trunk/AptUrl/gtk/backend/InstallBackendAptdaemon.py", line 83, in _on_finished
    True, result, None, None)
  File "/usr/lib/python3/dist-packages/UpdateManager/backend/__init__.py", line 80, in _action_done
    self.window_main.start_available(is_cancelled_update)
TypeError: <lambda>() takes 0 positional arguments but 1 was given

Just removing "is_cancelled_update" ends up presenting a dialog box about installing adobe flash that has unclickable buttons.

Revision history for this message
Brian Murray (brian-murray) wrote :

Actually the Traceback is the following:

  File "/home/bdmurray/source-trees/apturl/trunk/AptUrl/gtk/backend/InstallBackendAptdaemon.py", line 82, in _on_finished
    True, dialog._transaction.exit == EXIT_SUCCESS, None, None)
  File "/usr/lib/python3/dist-packages/UpdateManager/backend/__init__.py", line 80, in _action_done
    self.window_main.start_available(cancelled_update=is_cancelled_update)
TypeError: <lambda>() got an unexpected keyword argument 'cancelled_update'

Revision history for this message
Sebastien Bacher (seb128) wrote :

Seems like Brian&Mathieu got a fix for that uploaded to y
https://launchpad.net/ubuntu/+source/apturl/0.5.2ubuntu12

The upload failed to build though because packagekit 1.0 which has been merged/uploaded in y-proposed is creating issues, should be fine to SRU it though?

Changed in apturl (Ubuntu):
assignee: nobody → Mathieu Trudel-Lapierre (cyphermox)
status: Triaged → In Progress
Changed in apturl (Ubuntu Xenial):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Mathieu Trudel-Lapierre (cyphermox)
description: updated
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello errors.ubuntu.com, or anyone else affected,

Accepted apturl into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/apturl/0.5.2ubuntu11.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in apturl (Ubuntu Xenial):
status: In Progress → Fix Committed
Changed in apturl (Ubuntu):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Brian Murray (brian-murray) wrote :

I no longer receive a Traceback with the version of apturl from -proposed and end up receiving a dialog where I can choose to install adobe flash or not.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apturl - 0.5.2ubuntu11.1

---------------
apturl (0.5.2ubuntu11.1) xenial; urgency=medium

  * Fix common crashes (AttributeError in doEnableChannel), due to changes
    in apt_pkg API, etc. (LP: #1566201)

  [ Brian Murray ]
  * Port to proper apt_pkg APIs.

  [ Mathieu Trudel-Lapierre ]
  * Override the start_available and start_error functions from Aptdaemon
    backend correctly to match the passed parameters.
  * Use pkexec rather than gksu to do our external calls to apt-key, install,
    and software-properties, etc; since they need admin privileges.

 -- Mathieu Trudel-Lapierre <email address hidden> Tue, 24 May 2016 12:00:20 -0400

Changed in apturl (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Adam Conrad (adconrad) wrote : Update Released

The verification of the Stable Release Update for apturl has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apturl - 0.5.2ubuntu12

---------------
apturl (0.5.2ubuntu12) yakkety; urgency=medium

  * Fix common crashes (AttributeError in doEnableChannel), due to changes
    in apt_pkg API, etc. (LP: #1566201)

  [ Brian Murray ]
  * Port to proper apt_pkg APIs.

  [ Mathieu Trudel-Lapierre ]
  * Override the start_available and start_error functions from Aptdaemon
    backend correctly to match the passed parameters.
  * Use pkexec rather than gksu to do our external calls to apt-key, install,
    and software-properties, etc; since they need admin privileges.

 -- Mathieu Trudel-Lapierre <email address hidden> Thu, 19 May 2016 22:17:50 -0400

Changed in apturl (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.