Skip to content

Commit 4e4e9b2

Browse files
committed
lib: simplify is installed check to avoid allocations in check_revdeps
1 parent dd17692 commit 4e4e9b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/transaction_check_revdeps.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <stdbool.h>
2929
#include <errno.h>
3030

31+
#include "xbps.h"
3132
#include "xbps_api_impl.h"
3233

3334
/*
@@ -136,9 +137,8 @@ xbps_transaction_check_revdeps(struct xbps_handle *xhp, xbps_array_t pkgs)
136137
* if pkg in transaction is not installed,
137138
* pass to next one.
138139
*/
139-
if (xbps_pkg_is_installed(xhp, pkgname) == 0) {
140+
if (ttype == XBPS_TRANS_INSTALL)
140141
continue;
141-
}
142142
/*
143143
* If pkg is installed but does not have revdeps,
144144
* pass to next one.

0 commit comments

Comments
 (0)