From 6e6a9294a7e5327195a348bd59b6fe7966cef821 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 25 Jan 2020 13:44:46 +0100 Subject: [PATCH] xbps-install: fix for -D foo (anything else than xbps). --- lib/transaction_ops.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/transaction_ops.c b/lib/transaction_ops.c index cbdc9721..b284cf87 100644 --- a/lib/transaction_ops.c +++ b/lib/transaction_ops.c @@ -260,8 +260,7 @@ xbps_autoupdate(struct xbps_handle *xhp) if (rv == 0) { if (xhp->flags & XBPS_FLAG_DOWNLOAD_ONLY) { - xhp->flags |= XBPS_FLAG_FORCE_REMOVE_REVDEPS; - return 1; + return 0; } /* a new xbps version is available, check its revdeps */ rdeps = xbps_pkgdb_get_pkg_revdeps(xhp, "xbps"); @@ -382,6 +381,9 @@ xbps_transaction_update_pkg(struct xbps_handle *xhp, const char *pkg) } rdeps = xbps_pkgdb_get_pkg_revdeps(xhp, pkg); + if (xhp->flags & XBPS_FLAG_DOWNLOAD_ONLY) { + rdeps = NULL; + } for (unsigned int i = 0; i < xbps_array_count(rdeps); i++) { const char *curpkgver = NULL; char *curpkgn; @@ -423,6 +425,9 @@ xbps_transaction_install_pkg(struct xbps_handle *xhp, const char *pkg, } rdeps = xbps_pkgdb_get_pkg_revdeps(xhp, pkg); + if (xhp->flags & XBPS_FLAG_DOWNLOAD_ONLY) { + rdeps = NULL; + } for (unsigned int i = 0; i < xbps_array_count(rdeps); i++) { const char *curpkgver = NULL; char *curpkgn;