diff options
author | Dan McGee <dan@archlinux.org> | 2011-08-29 06:41:17 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-08-29 06:41:17 +0200 |
commit | 040083b97fab61c8afc16a1c49a8384d097c272a (patch) | |
tree | 97fb452adccf6f9f9d09356fdaae6115c878310b /src/pacman/package.c | |
parent | 3a458783a2617b7b22a756f95b5f66f3da79146f (diff) | |
download | pacman-040083b97fab61c8afc16a1c49a8384d097c272a.tar.gz pacman-040083b97fab61c8afc16a1c49a8384d097c272a.tar.xz |
Allow access to package origin data
Add new alpm_pkg_get_origin() method, use it in the front end now that
the enum constants are publicly available.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/pacman/package.c')
-rw-r--r-- | src/pacman/package.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/pacman/package.c b/src/pacman/package.c index f7065d54..5654944c 100644 --- a/src/pacman/package.c +++ b/src/pacman/package.c @@ -61,7 +61,7 @@ static void deplist_display(const char *title, * @param from the type of package we are dealing with * @param extra should we show extra information */ -void dump_pkg_full(alpm_pkg_t *pkg, alpm_pkgfrom_t from, int extra) +void dump_pkg_full(alpm_pkg_t *pkg, int extra) { const char *reason; time_t bdate, idate; @@ -69,10 +69,9 @@ void dump_pkg_full(alpm_pkg_t *pkg, alpm_pkgfrom_t from, int extra) const char *label; double size; alpm_list_t *requiredby = NULL; + alpm_pkgfrom_t from; - if(pkg == NULL) { - return; - } + from = alpm_pkg_get_origin(pkg); /* set variables here, do all output below */ bdate = alpm_pkg_get_builddate(pkg); |