Print "there is nothing to do" with NOOP transactions

The "local database is up to date" message has been replaced with "there
is nothing to do" message. This used with "empty" -S, -R, -U operations too.
(Examples: pacman -S ignored_pkg, pacman -Ru needed_pkg.)

See FS#17859.

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Nagy Gabor 2010-01-19 21:35:13 +01:00 committed by Dan McGee
parent 0eadc99240
commit 27bc2f7eb8
3 changed files with 3 additions and 1 deletions

View File

@ -118,6 +118,7 @@ int pacman_remove(alpm_list_t *targets)
/* Step 3: actually perform the removal */
alpm_list_t *pkglist = alpm_trans_get_remove();
if(pkglist == NULL) {
printf(_(" there is nothing to do\n"));
goto cleanup; /* we are done */
}
/* print targets and ask user confirmation */

View File

@ -663,7 +663,7 @@ static int sync_trans(alpm_list_t *targets)
packages = alpm_trans_get_add();
if(packages == NULL) {
/* nothing to do: just exit without complaining */
printf(_(" local database is up to date\n"));
printf(_(" there is nothing to do\n"));
goto cleanup;
}

View File

@ -132,6 +132,7 @@ int pacman_upgrade(alpm_list_t *targets)
/* print targets and ask user confirmation */
alpm_list_t *packages = alpm_trans_get_add();
if(packages == NULL) { /* we are done */
printf(_(" there is nothing to do\n"));
trans_release();
return(retval);
}