[pacman-dev] [PATCH] 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
On 10/12/11 20:10, Allan McRae wrote:
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
---
BTW, I would like something similar for -S operations too: # pacman -S foo bar error: target not found: foo However, I can not see how to do that (without passing some value around to lots of functions) while avoiding the potential group selection dialog if we did something like: # pacman -S foo base bar Any pointers would be appreciated. Allan
On Sat, Dec 10, 2011 at 5:12 AM, Allan McRae
On 10/12/11 20:10, Allan McRae wrote:
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
--- BTW, I would like something similar for -S operations too:
# pacman -S foo bar error: target not found: foo
However, I can not see how to do that (without passing some value around to lots of functions) while avoiding the potential group selection dialog if we did something like:
# pacman -S foo base bar
Any pointers would be appreciated.
-U would be nice too; might be similar to your -S case mentioned above. $ sudo ./src/pacman/pacman -U foo bar baz Password: loading packages... error: 'foo': could not find or read package I'll take a quick look at this to see what I can come up with. -Dan
If an early target fails, we stopped processing the rest of the list. We
should continue all the way through and show relevant errors for each
target if possible, and error out only at the end.
We do process all targets to check for URLs first and will error out if
some could not be processed; we then do a second loop and try to load
each target specified on the command line.
This mirrors a patch by Allan to do the same for removal operations.
Signed-off-by: Dan McGee
If someone specifies a bogus line such as
pacman -S baz adsf/boo base-devel
we are better off trying to process all targets and showing all relevant
errors before exiting. This is easier in -U and -R operations where we
aren't dealing with groups, but here we attempt to skip group selection
once we know a target has errored to avoid cluttering the output and
hiding the real problem.
Signed-off-by: Dan McGee
participants (3)
-
Allan McRae
-
Dan McGee
-
Dan McGee