index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Allan McRae <allan@archlinux.org> | 2012-02-18 16:31:37 +1000 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-03-08 17:58:04 -0600 |
commit | 5c404268d965d9ca012e4819ac0c2f289a4c768c (patch) | |
tree | ec83d7e1d7c88886fc4cf8438ba42ccb9627c8e2 /src | |
parent | bc311a24ce536fbf30cc2356a62b08a6c0938ea9 (diff) |
-rw-r--r-- | src/pacman/package.c | 26 |
diff --git a/src/pacman/package.c b/src/pacman/package.c index 54c035c3..6e4901d1 100644 --- a/src/pacman/package.c +++ b/src/pacman/package.c @@ -77,6 +77,7 @@ static void optdeplist_display(const char *title, void dump_pkg_full(alpm_pkg_t *pkg, int extra) { const char *reason; + alpm_list_t *validation = NULL; time_t bdate, idate; char bdatestr[50] = "", idatestr[50] = ""; const char *label; @@ -108,6 +109,27 @@ void dump_pkg_full(alpm_pkg_t *pkg, int extra) break; } + if(from == PKG_FROM_LOCALDB) { + alpm_pkgvalidation_t v = alpm_pkg_get_validation(pkg); + if(v) { + if(v & ALPM_PKG_VALIDATION_NONE) { + validation = alpm_list_add(validation, _("None")); + } else { + if(v & ALPM_PKG_VALIDATION_MD5SUM) { + validation = alpm_list_add(validation, _("MD5 Sum")); + } + if(v & ALPM_PKG_VALIDATION_SHA256SUM) { + validation = alpm_list_add(validation, _("SHA256 Sum")); + } + if(v & ALPM_PKG_VALIDATION_SIGNATURE) { + validation = alpm_list_add(validation, _("Signature")); + } + } + } else { + validation = alpm_list_add(validation, _("Unknown")); + } + } + if(extra || from == PKG_FROM_LOCALDB) { /* compute this here so we don't get a pause in the middle of output */ requiredby = alpm_pkg_compute_requiredby(pkg); @@ -173,6 +195,9 @@ void dump_pkg_full(alpm_pkg_t *pkg, int extra) } alpm_siglist_cleanup(&siglist); } + if(from == PKG_FROM_LOCALDB) { + list_display(_("Validated By :"), validation); + } string_display(_("Description :"), alpm_pkg_get_desc(pkg)); /* Print additional package info if info flag passed more than once */ @@ -184,6 +209,7 @@ void dump_pkg_full(alpm_pkg_t *pkg, int extra) printf("\n"); FREELIST(requiredby); + alpm_list_free(validation); } static const char *get_backup_file_status(const char *root, |