Skip to content

Fix PackageKit D-Bus lifecycle - #477

Merged
tillkamppeter merged 1 commit into
masterfrom
fix-packagekit-private-dbus-lifecycle
Oct 2, 2026
Merged

tillkamppeter merged 1 commit into
masterfrom
fix-packagekit-private-dbus-lifecycle

Conversation

@SinghCod3r

@SinghCod3r SinghCod3r commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

What does this PR do?

Fixes the PackageKit private D-Bus connection lifecycle in the printer setup flow.

PackageKit fix

The private PackageKit D-Bus connection was being closed from the worker thread while GLib could still have pending messages for that connection.

This change:

  • disables exit_on_disconnect
  • keeps the private D-Bus connection alive until the GLib completion callback
  • closes the connection from the completion callback
  • falls back to querying CUPS when the PackageKit request fails

Regression test

Adds a regression test covering the failure path to verify that:

  • the private D-Bus connection is created with private=True
  • exit_on_disconnect is disabled
  • the connection is passed to the GLib completion callback
  • the connection is closed from the completion callback
  • CUPS fallback is triggered after the PackageKit failure

Testing

  • PackageKit lifecycle regression test passes.
  • Full test_newprinter.py test suite passes.
  • Manually tested the Xerox B235 printer flow.
  • PackageKit failure now falls back to CUPS without reproducing the previous segmentation fault.

@SinghCod3r
SinghCod3r marked this pull request as ready for review October 2, 2026 07:59
@SinghCod3r
SinghCod3r force-pushed the fix-packagekit-private-dbus-lifecycle branch from 3ca1788 to e6a3821 Compare October 2, 2026 08:33
@SinghCod3r SinghCod3r changed the title Fix PackageKit D-Bus lifecycle and driverless PPD handling Fix PackageKit D-Bus lifecycle Oct 2, 2026
@tillkamppeter
tillkamppeter merged commit 5b79d0d into master Oct 2, 2026
5 checks passed
@alexpevzner
alexpevzner deleted the fix-packagekit-private-dbus-lifecycle branch October 7, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants