git: c1bec0f41c77 - main - ports-mgmt/packagekit: Fix crashing when libpkg asks about ABI mismatch

From: Gleb Popov <arrowd_at_FreeBSD.org>
Date: Fri, 27 Feb 2026 17:26:43 UTC
The branch main has been updated by arrowd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c1bec0f41c77fc68cf22eb48d5529f0254b2c9ea

commit c1bec0f41c77fc68cf22eb48d5529f0254b2c9ea
Author:     Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2026-02-27 17:18:52 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2026-02-27 17:26:24 +0000

    ports-mgmt/packagekit: Fix crashing when libpkg asks about ABI mismatch
---
 ports-mgmt/packagekit/Makefile                              |  1 +
 .../files/patch-backends_freebsd_PackageDatabase.hpp        | 13 +++++++++++++
 2 files changed, 14 insertions(+)

diff --git a/ports-mgmt/packagekit/Makefile b/ports-mgmt/packagekit/Makefile
index cb555bdb7b91..aabd62d8dd41 100644
--- a/ports-mgmt/packagekit/Makefile
+++ b/ports-mgmt/packagekit/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	PackageKit
 PORTVERSION=	1.3.4
+PORTREVISION=	1
 CATEGORIES=	ports-mgmt sysutils
 MASTER_SITES=	https://www.freedesktop.org/software/PackageKit/releases/
 
diff --git a/ports-mgmt/packagekit/files/patch-backends_freebsd_PackageDatabase.hpp b/ports-mgmt/packagekit/files/patch-backends_freebsd_PackageDatabase.hpp
new file mode 100644
index 000000000000..477ee6b1cccb
--- /dev/null
+++ b/ports-mgmt/packagekit/files/patch-backends_freebsd_PackageDatabase.hpp
@@ -0,0 +1,13 @@
+--- 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);
+     }
+ 
+     struct cleanup_cb