From b354c9305faad7ffd25dbebb638f83893965a414 Mon Sep 17 00:00:00 2001 From: zlice Date: Wed, 4 May 2022 10:19:29 -0400 Subject: [PATCH] xbps-install: download-only misleading information and explanation. close or see #341 --- bin/xbps-install/xbps-install.1 | 8 ++++---- lib/transaction_prepare.c | 6 ++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/bin/xbps-install/xbps-install.1 b/bin/xbps-install/xbps-install.1 index 95695756d..6b715be65 100644 --- a/bin/xbps-install/xbps-install.1 +++ b/bin/xbps-install/xbps-install.1 @@ -99,10 +99,10 @@ If the first character is not '/' then it's a relative path of .It Fl d , Fl -debug Enables extra debugging shown to stderr. .It Fl D , Fl -download-only -Only download packages to the cache, do not do any other installation steps. -This may be useful for doing system upgrades while offline, or automatically -downloading updates while leaving you with the option of still manually running -the update. +Only download packages and dependencies to the cache, do not do any other +installation steps. This may be useful for doing system upgrades while offline, or +automatically downloading updates while leaving you with the option of still +manually running the update. .It Fl f , Fl -force Force installation (downgrade if package version in repos is less than installed version), or reinstallation (if package version in repos is the same) to the target diff --git a/lib/transaction_prepare.c b/lib/transaction_prepare.c index b6ff1a9d1..243660e61 100644 --- a/lib/transaction_prepare.c +++ b/lib/transaction_prepare.c @@ -88,9 +88,11 @@ compute_transaction_stats(struct xbps_handle *xhp) if (ttype == XBPS_TRANS_REMOVE) { rm_pkgcnt++; - } else if (ttype == XBPS_TRANS_CONFIGURE) { + } else if (!(xhp->flags & XBPS_FLAG_DOWNLOAD_ONLY) && + ttype == XBPS_TRANS_CONFIGURE) { cf_pkgcnt++; - } else if (ttype == XBPS_TRANS_INSTALL || ttype == XBPS_TRANS_REINSTALL) { + } else if (!(xhp->flags & XBPS_FLAG_DOWNLOAD_ONLY) && + (ttype == XBPS_TRANS_INSTALL || ttype == XBPS_TRANS_REINSTALL)) { inst_pkgcnt++; } else if (ttype == XBPS_TRANS_UPDATE) { up_pkgcnt++;