Adding repository via PackageKit D-Bus interface does not work

Bug #1397374 reported by Till Kamppeter
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
packagekit (Ubuntu)
New
Low
Unassigned

Bug Description

I am on Ubuntu Utopic (14.10) and want to do the following, preferably
with a Python script.

I want to install a printer driver package from Epson (which is
available as both DEB and RPM) through its apt or yum repository so that
future updates get installed automatically through the distro's update
mechanism. I also want to assure by means of a key fingerprint that
repository and package are really from Epson.

The package name for example is

epson-inkjet-printer-escpr

The key fingerprint is

E5220FB7014D0FBDA50DFC2BE5E86C008AA65D56

and the Debian package repository is

deb http://download.ebz.epson.net/dsc/op/stable/debian/ lsb3.2 main

This data is polled from OpenPrinting:

https://www.openprinting.org/query.cgi?moreinfo=1&showprinterid=1&onlynewestdriverpackages=0&architectures=amd64&noobsoletes=1&onlyfree=0&onlymanufacturer=0&onlydownload=1&packagesystem=deb&onlysigneddriverpackages=0&format=xml&type=drivers&printer=MFG:EPSON;MDL:EP-801A%20Series;DES:EPSON%20EP-801A%20Series;CLS:PRINTER;

You can replace the packagesystem=deb in the URL by packagesystem=rpm
for RPM-based distros.

Now I run a script of system-config-printer,
/usr/share/system-config-printer/install-printerdriver.py via the command

install-printerdriver 'epson-inkjet-printer-escpr' 'deb
http://download.ebz.epson.net/dsc/op/stable/debian/ lsb3.2 main'
'E5220FB7014D0FBDA50DFC2BE5E86C008AA65D56'

Or by pasting the commands at the python prompt:

till@till-twist:~/ubuntu/system-config-printer/test$ python3
Python 3.4.2 (default, Oct 8 2014, 13:08:17)
[GCC 4.9.1] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from gi.repository import GLib, PackageKitGlib
>>> import sys
>>> def progress(progress, type, user_data):
... pass
...
>>> pk = PackageKitGlib.Client()
>>> repo = 'deb http://download.ebz.epson.net/dsc/op/stable/debian/
lsb3.2 main'
>>> res = pk.repo_enable(repo, True, None, progress, None)

And I get

Could not found the repositorie

And if I do

pkcon repo-enable 'deb
http://download.ebz.epson.net/dsc/op/stable/debian/ lsb3.2 main'

I get the same error. I tried also with other repositories, even ones
which are already added to the system and always get this error.

How do I add a repository with PackageKit?

till@till-twist:~/ubuntu/system-config-printer/test$ pkcon backend-details
Name: aptcc
Description: APTcc
Author: Daniel Nicoletti <email address hidden>
till@till-twist:~/ubuntu/system-config-printer/test$

Another problem is installing the signature. Formerly

>>> repo_gpg_id = "E5220FB7014D0FBDA50DFC2BE5E86C008AA65D56"
>>> res = pk.install_signature(PackageKitGlib.SigTypeEnum.GPG,
repo_gpg_id, '', None, progress, None)
>>>

worked (note the empty string for the package ID). Now a package ID is
required, and to obtain it I have to add the repository, but is it not a
security problem to already add the repository if the signature is not
yet installed?

This all still worked on Trusty (14.04).

Is there a problem with the Python bindings of the client (perhaps due
to Python3)? Or is perhaps the D-Bus service (aptdaemon on Ubuntu) at fault?

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Setting importance to "High" as this breaks automatic printer driver package installation by system-config-printer in both Utopic and Vivid.

Note that I cannot replace the PackageKit API use by direct use of apt as system-config-printer is for both Debian/Ubuntu (DEB) and Red Hat/Fedora/... (RPM).

Changed in aptdaemon (Ubuntu):
importance: Undecided → High
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Sorry, on my system there was for some reason, perhaps some experiments several months ago, installed the original PackageKit D-Bus service ("packagekit" binary package) and not the Ubuntu standard PackageKit D-Bus service emulation using aptdaemon ("python3-aptdaemon.pkcompat" binary package). aptdaemon was installed, giving me the impression that it was used.

This caused the bug to occur and after returning to the standard setup with python3-aptdaemon.pkcompat the bug went away.

So the bug is most probably in the packagekit package and most users are stillhaving automatic printer driver installation working, so moving to packagekit and lowering importance ...

Changed in aptdaemon (Ubuntu):
importance: High → Low
affects: aptdaemon (Ubuntu) → packagekit (Ubuntu)
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.