[pacman-dev] [patch] Fix -Qii support and output, some refactoring