Synaptic backend doesn't work in apturl

Bug #1338482 reported by Vlad Orlov on 2014-07-07
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
apturl (Ubuntu)
Medium
Unassigned

Bug Description

[Impact]

The Synaptic backend in apturl is non-functional. Trying to use it makes
apturl crash with Python error message.

The fix for this issue is provided in the debdiffs attached to the report.

It's a long-standing bug which is present in all current Ubuntu releases,
starting from Trusty. Would be nice to get it finally fixed. A non-working
backend isn't good at all, especially when the only other backend (aptdaemon)
might be removed soon, as stated in bug 1673258.

[Test Case]

The easiest way to make apturl use the Synaptic backend (without removing
aptdaemon from the system) is to set the environment variable when launching
it from the terminal:

$ UPDATE_MANAGER_FORCE_BACKEND_SYNAPTIC=1 apturl apt://gnome-calculator

You can use any other package which isn't installed. I chose gnome-calculator
as it wasn't installed in my Xubuntu and Ubuntu MATE systems.

The result of this will be crash of apturl with Python error message.
The package won't be installed.

[Regression Potential]

The patch only affects the Synaptic backend. It doesn't affect aptdaemon
backend or any other parts of code. Since the Synaptic backend was broken
before, it's not possible to break it further with some regression.

[Original Description]

System: Xubuntu 14.10
apturl version: 0.5.2ubuntu4

If you'll tell apturl to use the Synaptic backend (by either removing aptdaemon from the system or specifying UPDATE_MANAGER_FORCE_BACKEND_SYNAPTIC=1 before apturl in the terminal), it crashes with this error:

$ UPDATE_MANAGER_FORCE_BACKEND_SYNAPTIC=1 apturl apt://gcalctool
/usr/lib/python3/dist-packages/AptUrl/gtk/GtkUI.py:4: PyGIDeprecationWarning: Since version 3.11, calling threads_init is no longer needed. See: https://wiki.gnome.org/PyGObject/Threading
  GObject.threads_init()
Traceback (most recent call last):
  File "/usr/bin/apturl-gtk", line 43, in <module>
    ui = GtkUI()
  File "/usr/lib/python3/dist-packages/AptUrl/gtk/GtkUI.py", line 38, in __init__
    self.backend = get_backend(self.dia)
  File "/usr/lib/python3/dist-packages/AptUrl/gtk/backend/__init__.py", line 49, in get_backend
    return InstallBackendSynaptic(*args, **kwargs)
TypeError: __init__() missing 1 required positional argument: 'action'

Vlad Orlov (monsta) wrote :

The effect is exactly the same in Xubuntu 14.04 (apturl's version is also the same, 0.5.2ubuntu4).

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in apturl (Ubuntu):
status: New → Confirmed
Vlad Orlov (monsta) on 2016-05-06
tags: added: trusty
Vlad Orlov (monsta) wrote :

Same in 15.10 and 16.04.

tags: added: wily xenial
Changed in apturl (Ubuntu):
importance: Undecided → Medium
Vlad Orlov (monsta) on 2017-07-20
tags: added: zesty
Vlad Orlov (monsta) on 2017-09-11
tags: added: artful
removed: wily
Vlad Orlov (monsta) wrote :

So here's the fix for 17.10. Now Synaptic backend should work.

I've removed the part of debdiff with modifications to po/apturl.pot file as it's not relevant to the issue.

The attachment "Debdiff with the fix for Artful" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Vlad Orlov (monsta) wrote :
Vlad Orlov (monsta) wrote :
Vlad Orlov (monsta) wrote :

For 14.04 I had to add one more import to the code - workaround for https://bugzilla.gnome.org/show_bug.cgi?id=673396

Vlad Orlov (monsta) on 2017-11-11
description: updated
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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