PackageKit fails to start due to 'Undefined symbol "pkg_set_ignore_osversion"'.

Hello all!

I'm writing this to report that since the last update (version 1.3.4_1) ports-mgmt/packagekit stopped working.

I noticed this due to sysutils/plasma6-discover not being able to update packages and reporting the following error:
Code:
Failed to activate service 'org.freedesktop.PackageKit': timed out (service_start_timeout=25000ms)
Trying to launch the daemon manually gave me this output:
Code:
# /usr/local/libexec/packagekitd -v
20:03:02    PackageKit          Verbose debugging enabled (on console 1)
20:03:02    PackageKit          daemon shutdown set to 300 seconds
20:03:02    PackageKit          setting config file watch on /usr/local/etc/PackageKit/PackageKit.conf
20:03:02    PackageKit          Trying to load : freebsd
20:03:02    PackageKit          dlopening '/usr/local/lib/packagekit-backend/libpk_backend_freebsd.so'
Failed to load the backend: opening module freebsd failed : /usr/local/lib/packagekit-backend/libpk_backend_freebsd.so: Undefined symbol "pkg_set_ignore_osversion"
20:03:02    PackageKit          already closed (nonfatal)
This symbol was introduced with the following commit: https://cgit.freebsd.org/ports/commit/?id=c1bec0f41c77fc68cf22eb48d5529f0254b2c9ea.

As a workaround I compiled PackageKit locally, commenting out the "pkg_set_ignore_osversion" line from /usr/ports/ports-mgmt/packagekit/files/patch-backends_freebsd_PackageDatabase.hpp:
Code:
--- backends/freebsd/PackageDatabase.hpp.orig   2026-01-28 19:54:23 UTC
+++ backends/freebsd/PackageDatabase.hpp
@@ -252,6 +252,10 @@ class PackageDatabase { (private)
             if (lockType != PKGDB_LOCK_READONLY)
                 pk_backend_job_set_locked (job, FALSE);
         });
+
+        // We don't want libpkg to interactively ask us questions about OS
+        // versions mismatch. Provide a default "no" reply.
+        //pkg_set_ignore_osversion (FALSE);   <===== Commented out line.
     }

     struct cleanup_cb
so now PackageKit starts without problems:
Code:
20:10:03    PackageKit          Verbose debugging enabled (on console 1)
20:10:03    PackageKit          daemon shutdown set to 300 seconds
20:10:03    PackageKit          setting config file watch on /usr/local/etc/PackageKit/PackageKit.conf
20:10:03    PackageKit          Trying to load : freebsd
20:10:03    PackageKit          dlopening '/usr/local/lib/packagekit-backend/libpk_backend_freebsd.so'
20:10:03    PackageKit          trying to open database '/var/lib/PackageKit/transactions.db'
20:10:03    PackageKit          job count is now at 0
20:10:03    PackageKit          PkEngine: acquired name: org.freedesktop.PackageKit
20:10:03    PackageKit          failed to connect to logind: no such service
20:10:03    PackageKit          CreateTransaction method called
20:10:03    PackageKit          job count now 1
20:10:03    PackageKit          trying to open database '/var/lib/PackageKit/transactions.db'
20:10:03    PackageKit          job count is now at 0
20:10:03    PackageKit          transaction now new
20:10:03    PackageKit          setting sender to :1.47
20:10:03    PackageKit          adding transaction 0x3fba96461540
20:10:03    PackageKit          sending object path: '/1_cabbcbba'
20:10:03    PackageKit          notify::connected
20:10:03    PackageKit          SetHints method called: supports-plural-signals=true
20:10:03    PackageKit          Client has set supports-plural-signals=true
20:10:03    PackageKit          GetUpdates method called
20:10:03    PackageKit          transaction now ready
20:10:03    PackageKit          changing transaction to exclusive mode
20:10:03    PackageKit          1 transactions in list, 1 committed but not finished
20:10:03    PackageKit          transaction now running
20:10:03    PackageKit          SetHints method called: supports-plural-signals=true
20:10:03    PackageKit          Client has set supports-plural-signals=true
20:10:03    PackageKit          install uid now 1001
20:10:03    PackageKit          install cmdline now PackageKit: get-updates
20:10:03    PackageKit          setting role for /1_cabbcbba to get-updates
20:10:06    PackageKit          emit package normal, protobuf;29.6,1;amd64;FreeBSD-ports, Data interchange format library
20:10:06    PackageKit          emit package normal, perl5;5.42.1;amd64;FreeBSD-ports, Practical Extraction and Report Language
20:10:06    PackageKit          emit package normal, py311-markdown;3.10.2;*;FreeBSD-ports, Python implementation of Markdown
20:10:06    PackageKit          emit package normal, py311-cryptography;46.0.5,1;amd64;FreeBSD-ports, Cryptographic recipes and primitives for Python developers
20:10:06    PackageKit          emit package normal, taglib;2.2;amd64;FreeBSD-ports, Library for manipulating ID3 tags and Ogg comments
20:10:06    PackageKit          emit package normal, pciids;20260214;*;FreeBSD-ports, Database of all known IDs used in PCI devices
20:10:06    PackageKit          emit package normal, vlc;3.0.22_2,4;amd64;FreeBSD-ports, Qt based multimedia player and streaming server
20:10:06    PackageKit          emit package normal, openjph;0.26.3;amd64;FreeBSD-ports, Open-source implementation of JPEG2000 Part-15
20:10:06    PackageKit          emit package normal, android-tools;31.0.3p2.0_45;amd64;FreeBSD-ports, Android debugging tools
20:10:06    PackageKit          emit package normal, libssh;0.11.4;amd64;FreeBSD-ports, Library implementing the SSH2 protocol
20:10:06    PackageKit          emit package normal, firefox;148.0.2,2;amd64;FreeBSD-ports, Web browser based on the browser portion of Mozilla
20:10:06    PackageKit          emit package normal, libaec;1.1.5;amd64;FreeBSD-ports, Adaptive entropy coding library
20:10:06    PackageKit          backend was running for 2385 ms
20:10:06    PackageKit          emitting finished 'success', 2385
20:10:06    PackageKit          transaction now finished
20:10:06    PackageKit          1 transactions in list, 0 committed but not finished
20:10:09    PackageKit          engine idle zero as 1 transactions in progress
20:10:09    PackageKit          idle is 0
and Discover works as expected (only for updates, obviously).

That said I wanted to ask: am I missing something or is this really a bug worth to report?

Thank you in advance.
 
Back
Top