Adding repository via PackageKit D-Bus interface does not work
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-
The key fingerprint is
E5220FB7014D0FB
and the Debian package repository is
deb http://
This data is polled from OpenPrinting:
You can replace the packagesystem=deb in the URL by packagesystem=rpm
for RPM-based distros.
Now I run a script of system-
/usr/share/
install-
http://
'E5220FB7014D0F
Or by pasting the commands at the python prompt:
till@till-
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.
>>> repo = 'deb http://
lsb3.2 main'
>>> res = pk.repo_
And I get
Could not found the repositorie
And if I do
pkcon repo-enable 'deb
http://
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-
Name: aptcc
Description: APTcc
Author: Daniel Nicoletti <email address hidden>
till@till-
Another problem is installing the signature. Formerly
>>> repo_gpg_id = "E5220FB7014D0F
>>> res = pk.install_
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?
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).