rpm/erasebadreturn.diff

17 lines
540 B
Diff
Raw Normal View History

Do not call rpmtsRun with an empty transaction list, it returns -1
which messes up the numFailed counter. [#43267]
Index: lib/rpminstall.c
===================================================================
--- lib/rpminstall.c.orig
+++ lib/rpminstall.c
@@ -844,7 +844,7 @@ int rpmErase(rpmts ts, struct rpmInstall
}
#endif
- if (!stopUninstall) {
+ if (numPackages && !stopUninstall) {
(void) rpmtsSetFlags(ts, (rpmtsFlags(ts) | RPMTRANS_FLAG_REVERSE));
/* Drop added/available package indices and dependency sets. */