Switch gnome-software to use PackageKit backend

Bug #1643134 reported by Jeremy Bicha on 2016-11-19
This bug affects 5 people
Affects Status Importance Assigned to Milestone
gnome-software (Ubuntu)

Bug Description

This is a tracking bug to switch gnome-software from the Ubuntu-specific apt backend to the PackageKit backend used by other distros. In particular this is the backend used by Debian.

To build, just uncomment the commented-out packagekit line in gnome-software's debian/rules and remove libapt-pkg-dev from Build-Depends. (You can also drop aptdaemon from Depends.)

- It fixes some annoying bugs lingering in Ubuntu 16.04 LTS: LP: #1551599.

- It may also allow us to drop sessioninstaller (LP: #1661371)

- On an individual app page, Source is listed as something like 'ubuntu-zesty-universe' or ubuntu-yakkety-updates-main' or 'lp-ppa-gnome3-team-gnome3-staging-yakkety-main' instead of just 'Ubuntu'

- On an individual app page, apps from multiverse or restricted will show License as 'Proprietary' (example: VirtualBox or Devede ). This also happens for locally installed apps (i.e. not matching what's in your apt sources). I don't think it happens for PPAs since everything in a PPA is in 'main'.

- If you install an app using GNOME Software (or I assume another PackageKit app), it lists the date it was last installed or updated on the individual app page with a link to see its update history. (But the problem here is that update-manager doesn't use PK nor does apt on the command line.)

- Any update, no matter how small, is only permitted as an offline update. The button says "Restart & Install". It does seem to work fine though.

- Another bug is that installing or Removing an app inside GNOME Software is enough for it to "forget" about available Updates and think that everything is "up to date".

(It looks like gnome-software 3.24 will let us completely disable gnome-software's update mechanism and the Updates tab by default so these previous two differences may be irrelevant then.)

Jeremy Bicha (jbicha) on 2016-11-19
description: updated
Jeremy Bicha (jbicha) on 2016-11-19
description: updated
Jeremy Bicha (jbicha) on 2016-11-19
tags: added: patch
Changed in gnome-software (Ubuntu):
status: Confirmed → Triaged
Jeremy Bicha (jbicha) on 2016-11-23
description: updated
Jeremy Bicha (jbicha) on 2017-03-15
description: updated
Jeremy Bicha (jbicha) on 2017-03-15
description: updated
Matthias Klumpp (ximion) wrote :

Sessioninstaller purely exists because of Aptdaemon - with Aptdaemon gone, native PackageKit frontends like GNOME Software and Apper can cover all of its functionality.

For the install-list-shorter issue, you might want to update to the current PackageKit release in unstable/testing, which contains a bugfix which might be related to this issue.

Jeremy Bicha (jbicha) wrote :

Matthias, thanks. Yes, I can't duplicate the install-list-shorter issue any more so I dropped it from the description now. zesty is in sync with stretch's packagekit except for

I tried gnome-software with PackageKit again today and it felt at least as good as the 'apt' backend for me.

Matthias Klumpp (ximion) wrote :

> zesty is in sync with stretch's packagekit except for

That particular bug is staged in Git.
But I don't think PK in Ubuntu is in sync with Stretch, unless Launchpad is lying to me:
1.1.5-2 vs. 1.1.5-1ubuntu1

Jeremy Bicha (jbicha) wrote :

gnome-software with PackageKit enabled is now available for testing in this PPA:

If anyone wants to test the sessioninstaller replacement, uninstall sessioninstaller, install gstreamer1.0-packagekit then follow the test case at LP: #1661371

Matthias, I opened LP: #1673302 for the PK update.

I confirm that work fine with totem.

gnome-software by default now pops up a Shell notification asking for confirmation before launching the codec search.

Rhythmbox it necessary to make implementation to pass down necessary flags to supress the Shell notification in that case:

Without this implementation, rhythmbox doesn't show up a installer (e.g. gnome-software) to search missing codecs.

Jeremy Bicha (jbicha) on 2017-03-22
description: updated
Jeremy Bicha (jbicha) on 2017-03-22
description: updated
Matthias Klumpp (ximion) wrote :

> (But the problem here is that update-manager doesn't use PK nor does apt on the command line.)

Well, APT tells PackageKit about changes though, so it at least has information about the update state of a package.
I am not 100% sure whether the update history will fully work though (it's likely that it will be incomplete).

Changed in gnome-software (Ubuntu):
importance: Wishlist → Medium
assignee: nobody → Robert Ancell (robert-ancell)
Changed in gnome-software (Ubuntu):
status: Triaged → In Progress
Robert Ancell (robert-ancell) wrote :

Currently working on getting debconf linked up then this should be good to go.

Matthias Klumpp (ximion) wrote :

@robert-ancell: Awesome! You can probably just copy the Debconf bits from GNOME Software, tbh I am a bit surprised that this wasn't there before...
Might be worth fixing in Debian for the next release as well, or backporting at least.

Robert Ancell (robert-ancell) wrote :

Turns out that gnome-software has explicitly disabled interactivity in the packagekit plugins, this is why the debconf doesn't work:

pk_client_set_interactive (PK_CLIENT (priv->task), FALSE);

I'll ask upstream why this is...

Matthias Klumpp (ximion) wrote :

Richard hates stuff asking questions during installation ;-) - that's *the* longest discussion we had, since PackageKit's inception:
What is Hughsie's law?

A joke that started on IRC late one night in '07. Put formally it is: Authentication or license prompts can only be done before the transaction has started, and messages or notices about the transaction can only be shown after the transaction has completed.
(no sure why this isn't on the PK FAQ anymore)

If the aptcc PackageKit backend receives a request to be noninteractive, it should set the Debconf frontent to `noninteractive` and disable everything that could potentially ask questions.
This should at least prevent the update process to hang on Debconf prompts.
I guess we could enable Debconf prompts for GS though (maybe make it configurable, so Fedora and other distros can be non-interactive by default), as apparently it seems to work okay at Ubuntu for the current aptd backend.

Jeremy Bicha (jbicha) wrote :

Matthias, are you aware that Ubuntu recently enabled debconf for gnome-software? (LP: #1679435)

If it's not too hard to get that working with PackageKit, should that be pushed into Debian stretch now?

Matthias Klumpp (ximion) wrote :

@jbicha: That was for Ubuntu's aptd GNOME Software backend, using Debconf with PackageKit is a little different (shouldn't be too hard to add, and I am rather confident that hughsie would even allow this feature upstream).
So, in Debian we'd need the PK version, as aptd is dead and removed from Debian. I did run a couple of tests with Debconf-using stuff and GNOME Software about a year ago, and the behavior then was that the questions didn't get asked but the transaction also wasn't blocked (as expected).
So, adding proper Debconf support to GS is "nice to have" at this point, but not essential at Debian.

Matthias Klumpp (ximion) wrote :

Oh, with "essential" I mean RC-worthy or important-for-the-release. Long term, we likely do want Debconf to work (I haven't had time to look into it yet though, that's why I like that Robert apparently looks into it now).

Robert Ancell (robert-ancell) wrote :

It was simply disabled in GNOME Software and Richard is fine with enabling it:

I tested it and it works fine with this change.

Robert Ancell (robert-ancell) wrote :

commit 8ecc6713380cd6922adfc2892d8282891eedf3ec
Author: Robert Ancell <email address hidden>
Date: Thu May 18 09:10:51 2017 +1200

    packagekit: Don't explicitly disable PackageKit interactivity

    We need interactivity for debconf prompts to install when installing .debs.
    This is not most packages (i.e. not normally apps) but some dependencies can
    trigger debconf prompts. If PackageKit is set to be non-interactive then
    these packages never complete installation and the user is left confused.
    The default PackageKit behaviour is to allow interactivity.


Robert Ancell (robert-ancell) wrote :

We can drop the dpkg plugin in gnome-software master once this is complete:

Robert Ancell (robert-ancell) wrote :

Iain raised two issues via email:

There's two things I'm already aware of.

  - It came up last cycle that when PK is built, gnome-software claims
    the PackageKit session interface on the bus. This is used for
    example to install missing GStreamer codecs but it turned out to be
    broken, so we disabled it. We should make sure to track that and get
    it working. Not sure what will be needed - maybe some aptcc work.

  - I talked to Richard about this and he isn't interested in supporting
    it - probably fairly - but maybe we want to turn off updates in the
    PackageKit plugin as long as we have update-manager. I'm not sure it
    was the best idea for us to support upgrades in the apt plugin, but
    PK inside gnome-software doesn't do UPDATABLE_LIVE (online) updates
    at the minute. It would be work to enable those and I think we might
    want to punt on this until we get agreement to get rid of
    update-manager, presumably not in this cycle. That conversation was
    what led Richard to work on release EOL support inside
    gnome-software though, which was nice. :)

Changed in gnome-software (Ubuntu):
assignee: Robert Ancell (robert-ancell) → nobody
Matthias Klumpp (ximion) wrote :

Regarding GStreamer:
Iain has made a patch for that: https://github.com/hughsie/PackageKit/pull/193 - looks good to me, and will definitely be in the next PK release / the Debian packaging.

To the second point: Couldn't the PK plugin be extended to support live updates by default if set as a compile-time switch?

Changed in gnome-software (Ubuntu):
status: In Progress → Fix Released
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.