Always show download size if -w/--downloadonly was provided
The prompt can be rather confusing otherwise when all files have already been downloaded, but there is not a single total size listed. Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
bcc6a5d72d
commit
6f3a657f66
2 changed files with 3 additions and 3 deletions
|
@ -960,7 +960,7 @@ int pacman_sync(alpm_list_t *targets)
|
||||||
}
|
}
|
||||||
|
|
||||||
alpm_list_t *targs = alpm_list_strdup(targets);
|
alpm_list_t *targs = alpm_list_strdup(targets);
|
||||||
if(!(config->flags & ALPM_TRANS_FLAG_DOWNLOADONLY) && !config->print) {
|
if(!config->op_s_downloadonly && !config->print) {
|
||||||
/* check for newer versions of packages to be upgraded first */
|
/* check for newer versions of packages to be upgraded first */
|
||||||
alpm_list_t *packages = syncfirst();
|
alpm_list_t *packages = syncfirst();
|
||||||
if(packages) {
|
if(packages) {
|
||||||
|
|
|
@ -875,11 +875,11 @@ static void _display_targets(alpm_list_t *targets)
|
||||||
}
|
}
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
if(dlsize > 0) {
|
if(dlsize > 0 || config->op_s_downloadonly) {
|
||||||
size = humanize_size(dlsize, 'M', &label);
|
size = humanize_size(dlsize, 'M', &label);
|
||||||
printf(_("Total Download Size: %.2f %s\n"), size, label);
|
printf(_("Total Download Size: %.2f %s\n"), size, label);
|
||||||
}
|
}
|
||||||
if(!(config->flags & ALPM_TRANS_FLAG_DOWNLOADONLY)) {
|
if(!config->op_s_downloadonly) {
|
||||||
if(isize > 0) {
|
if(isize > 0) {
|
||||||
size = humanize_size(isize, 'M', &label);
|
size = humanize_size(isize, 'M', &label);
|
||||||
printf(_("Total Installed Size: %.2f %s\n"), size, label);
|
printf(_("Total Installed Size: %.2f %s\n"), size, label);
|
||||||
|
|
Loading…
Add table
Reference in a new issue