Issues with PackageKit?


#1

It seems that PackageKit is having some issues on Silverblue 29 and earlier and I wanted to confirm if anyone has had the same problems. I was having issues with deja-dup giving the following error when trying to create a local backup…

Error calling StartServiceByName for org.freedesktop.PackageKit: Timeout was reached

Which lead me to…


https://access.redhat.com/solutions/2051343 Which I can’t view
https://unix.stackexchange.com/questions/249575/systemctl-keeps-timing-out-on-service-restart

So I just ran pkcon to see if it would do anything but it gave the following…

$ pkcon
Failed to contact PackageKit: Error calling StartServiceByName for org.freedesktop.PackageKit: GDBus.Error:org.freedesktop.DBus.Error.TimedOut: Failed to activate service 'org.freedesktop.PackageKit': timed out (service_start_timeout=25000ms)

Has anyone else had these issues or know of a fix?


#2

It seems to be silverblue specific and I didn’t have these issue on fedora workstation.


#3

What are you trying to do with package kit on Silverblue? Just curious, did you install it already? That article noted is from 2015, is it even relevant to your situation today?
I couldn’t find a flatpak of PackageKit, so I am going to guess you need it installed as a layered rpm, using rpm-ostree to install it.


#4

Yeah I was just trying to figure out what was going on and those are what turned up. But I am trying to use deja-dup to make backups and it keeps timing out (it is a layered package). Which from the links and error from deja-dup it is an issue with packagekit. Which I would assume is installed by default or at least a dependency of deja-dup since this issue doesn’t appear in fedora workstation.


#5

PackageKit is supposed to be an abstraction layer over different packaging systems. However, as there is no rpm-ostree backend for PackageKit, there’s little reason to include PackageKit in Silverblue; it wouldn’t be able to do anything. Is there a way to have deja-dup not want PackageKit?

FWIW there’s a bug open for this: https://bugzilla.redhat.com/show_bug.cgi?id=1626898


#6

Yeah but there hasn’t been much activity on that front. However, I am not sure if there is a way to have deja-dup not use PackageKit.


#7

From a brief look at the source, it seems as if deja-dup is supposed to simply continue on if PackageKit isn’t running. You might want to file a bug here.

A very round-a-bout workaround could be to build from source with PackageKit support disabled, e.g. via GNOME Builder or similar…


#8

They do appear to have a flatpak when I look here https://gitlab.gnome.org/World/deja-dup or at least there is a flatpak directory at that repo. For fedora, they list using sudo yum install deja-dup which I take to be sudo dnf install deja-dup now. On a related but sort of off topic direction, why not make a local git repo on your machine that you just tar off every so often to an external storage device? I mean aside from the scripting to make it automatic.
They definitely have been working on a flatpak since there is a yaml flatpak file there. Also noticed that one Michael Terry has been regularly contributing with the last about 19 hours ago as of now.


#9

I’ll take a look at filing a bug report there then.


#10

@jakfrost A flatpak would solve my issues so I’ll check that out!


#11

Yeah,

I’m not certain they have the actual flatpak going, but they do have a flatpak dir with a yaml file that looks an awful lot like a flatpak ref file. It wouldn’t be too hard to start one from it if needed I believe.


#12

It seems to be valid, though I’m not sure if it’s available prebuilt. Been there for a while, at minimum.


#13

I couldn’t find a prebuilt either, and I think some attention would be needed to get it to actually build a flatpak. I could clone the repo and try builder on it.


#14

Not sure if you were able to build it, so here’s the bundle I built:

https://drive.google.com/file/d/1Ar5ONoLcSRhzuvnBBI6Ojsylnbxdv6RA/view?usp=sharing


#15

I tried to build from your link and get errors in both Gnome SW and at the command line with flatpak.


#16

:thinking: What were the errors? It was working for me, though I’m also on Flatpak 1.1.3 pulled from rawhide.


#17

The Gnome SW error was
“failed to install: File not supported”

And from Flatpak at the terminal was “error: Invalid .flatpakref: Key file contains line “flatpak������ref�����app/org.gnome.DejaDupDevel/x86_64/master��s����metadata��������[Application]” which is not a key-value pair, group, or comment”
And the flatpak version I am running is 1.0.6, from Silverblue 29, not rawhide.
Sorry for the character’s, it could be because of my font playing yesterday.


#18

It’s because:

# cat /usr/lib/systemd/system/packagekit.service 
[Unit]
...
# PK doesn't know how to do anything on ostree-managed systems;
# currently the design is to have dedicated daemons like
# eos-updater and rpm-ostree, and gnome-software talks to those.
ConditionPathExists=!/run/ostree-booted

And unfortunately today DBus doesn’t know how to turn that into “service unavailable” rather than a timeout.


#19

Thank you for the explanation.


#20

Hmm, hadn’t heard of DejaDup before. Glancing at the codebase, it seems like it’s using PackageKit to try to install the packages needed for the storage backend of choice. I’d agree using a flatpak would be ideal. Otherwise, DejaDup could be modified to just (1) not start PackageKit if all the needed packages are installed, and (2) if there are missing packages, just error out with the list if PackageKit fails to come up. One could then rpm-ostree install those at least.