new file mode 100644
@@ -0,0 +1,34 @@
+From 390841ea7870408826fbddacf50f07a70778a22b Mon Sep 17 00:00:00 2001
+From: Adam Duskett <adam.duskett@amarulasolutions.com>
+Date: Thu, 30 Jul 2026 12:48:24 +0200
+Subject: [PATCH] critically fail if post-install fails
+
+Starting with commit b5fe8a926aeb80e3ce84787e7624685326a2f412,
+DNF5 respects the callback of RPM and no longer fails unless
+RPM reports a failure.
+
+RPM does not report post install failures as critical. However,
+Yocto does expect DNF to fail on post-install failures.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
+---
+ lib/rpmscript.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/rpmscript.cc b/lib/rpmscript.cc
+index 97bd8da62..a354d944c 100644
+--- a/lib/rpmscript.cc
++++ b/lib/rpmscript.cc
+@@ -60,7 +60,7 @@ static const struct scriptInfo_s scriptInfo[] = {
+ RPMSCRIPT_FLAG_CRITICAL, },
+ { RPMSCRIPT_POSTIN, "post", 0,
+ RPMTAG_POSTIN, RPMTAG_POSTINPROG, RPMTAG_POSTINFLAGS,
+- 0, },
++ RPMSCRIPT_FLAG_CRITICAL, },
+ { RPMSCRIPT_POSTUN, "postun", 0,
+ RPMTAG_POSTUN, RPMTAG_POSTUNPROG, RPMTAG_POSTUNFLAGS,
+ 0, },
+--
+2.55.0
+
@@ -40,6 +40,7 @@ SRC_URI = "git://github.com/rpm-software-management/rpm;protocol=https;branch=rp
file://0001-tools-elfdeps.cc-Remove-format-module.patch \
file://0001-macros.in-Set-_pkgverify_level-to-digest-as-RCPM-4.2.patch \
file://0003-Do-not-install-the-pkgconfig-dependency-generator.patch \
+ file://0017-critically-fail-if-post-install-fails.patch \
"
PE = "1"
Starting with commit b5fe8a926aeb80e3ce84787e7624685326a2f412, DNF5 respects the callbacks of RPM and no longer fails unless RPM reports a failure. RPM does not report post install failures as critical. However, Yocto does expect DNF to fail on post-install failures. Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com> --- ...ritically-fail-if-post-install-fails.patch | 34 +++++++++++++++++++ meta/recipes-devtools/rpm/rpm_6.0.2.bb | 1 + 2 files changed, 35 insertions(+) create mode 100644 meta/recipes-devtools/rpm/files/0017-critically-fail-if-post-install-fails.patch