pacman: list all unknown targets on removal operation

On a removal operation, pacman currently reports an error for the
package that is not found in the database and then exists.  Adjust
so that all unknown packages are reported.

Before:
> pacman -R foo bar
error: 'foo': target not found

After:
> pacman -R foo bar
error: 'foo': target not found
error: 'bar': target not found

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Allan McRae 2011-12-10 20:08:24 +10:00 committed by Dan McGee
parent 781af8f91b
commit 62fa0c7d8d
1 changed files with 4 additions and 1 deletions

View File

@ -104,10 +104,13 @@ int pacman_remove(alpm_list_t *targets)
}
if(remove_target(targ) == -1) {
retval = 1;
goto cleanup;
}
}
if(retval == 1) {
goto cleanup;
}
/* Step 2: prepare the transaction based on its type, targets and flags */
if(alpm_trans_prepare(config->handle, &data) == -1) {
alpm_errno_t err = alpm_errno(config->handle);