diff options
author | Dan McGee <dan@archlinux.org> | 2011-04-22 02:51:51 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-04-23 00:08:33 +0200 |
commit | 8b34aa50b9111b5c7e26b9841ad6f0cc5c38887f (patch) | |
tree | 9e12f25e221e2163a7b26cb484a30a6688f91335 /src/pacman/package.h | |
parent | 9579879b1bb1a033e846b750769215b7b4066073 (diff) | |
download | pacman-8b34aa50b9111b5c7e26b9841ad6f0cc5c38887f.tar.gz pacman-8b34aa50b9111b5c7e26b9841ad6f0cc5c38887f.tar.xz |
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 <dan@archlinux.org>
Diffstat (limited to 'src/pacman/package.h')
-rw-r--r-- | src/pacman/package.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/pacman/package.h b/src/pacman/package.h index 26333c5a..7a5e5853 100644 --- a/src/pacman/package.h +++ b/src/pacman/package.h @@ -22,8 +22,14 @@ #include <alpm.h> -void dump_pkg_full(pmpkg_t *pkg, int level); -void dump_pkg_sync(pmpkg_t *pkg, const char *treename, int level); +/* TODO it would be nice if we didn't duplicate a backend type */ +enum pkg_from { + PKG_FROM_FILE = 1, + PKG_FROM_LOCALDB, + PKG_FROM_SYNCDB +}; + +void dump_pkg_full(pmpkg_t *pkg, enum pkg_from from, int extra); void dump_pkg_backups(pmpkg_t *pkg); void dump_pkg_files(pmpkg_t *pkg, int quiet); |