xbps-install(1): added -D, --download-only.

Added `-D, --download-only` flag to allow downloading
packages to the cache without attempting to install them.

Contributed by Toyam Cox via #9

Adapted to master by yours truly.

Close #9
This commit is contained in:
Juan RP
2019-06-21 15:57:25 +02:00
parent 4f717dc597
commit fe943eb7d2
5 changed files with 29 additions and 5 deletions

View File

@ -255,6 +255,10 @@ xbps_transaction_commit(struct xbps_handle *xhp)
"%s\n", strerror(rv));
goto out;
}
if (xhp->flags & XBPS_FLAG_DOWNLOAD_ONLY) {
goto out;
}
/*
* Collect files in the transaction and find some issues
* like multiple packages installing the same file.
@ -265,6 +269,7 @@ xbps_transaction_commit(struct xbps_handle *xhp)
"%s\n", strerror(rv));
goto out;
}
/*
* Install, update, configure or remove packages as specified
* in the transaction dictionary.