From 8b34aa50b9111b5c7e26b9841ad6f0cc5c38887f Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 21 Apr 2011 19:51:51 -0500 Subject: Make dump_pkg_full a little less insane The various "level" values were a bit crazy to decipher, and we were doing some very interesting comparisons in certain places. Break it out into two parameters instead so we can seperate the type from the extra information display, and do things accordingly. Nothing changes with the display of any of the five types we currently show: -Si, -Sii, -Qi, -Qii, -Qip. Something to note- we should expose the PKG_FROM enum type somehow, this patch leaves the door open to do that quite easily. Signed-off-by: Dan McGee --- src/pacman/query.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/pacman/query.c') diff --git a/src/pacman/query.c b/src/pacman/query.c index a3546bad..eaf3b9e0 100644 --- a/src/pacman/query.c +++ b/src/pacman/query.c @@ -450,10 +450,9 @@ static int display(pmpkg_t *pkg) if(config->op_q_info) { if(config->op_q_isfile) { - /* omit info that isn't applicable for a file package */ - dump_pkg_full(pkg, 0); + dump_pkg_full(pkg, PKG_FROM_FILE, 0); } else { - dump_pkg_full(pkg, config->op_q_info); + dump_pkg_full(pkg, PKG_FROM_LOCALDB, config->op_q_info > 1); } } if(config->op_q_list) { -- cgit v1.2.3