mirror of
https://github.com/moparisthebest/pacman
synced 2025-02-28 09:21:53 -05:00
Fix display of -Qip output when a package file is given
Too many fields were being shown on -Qip output, and sizes were not always correct (-Qi and -Qip output on the same package did not agree). Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
a0c908dd0d
commit
5e12d3dec9
@ -385,6 +385,10 @@ int _alpm_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
|
||||
}
|
||||
_alpm_strtrim(tmp);
|
||||
info->size = atol(tmp);
|
||||
/* also store this value to isize if isize is unset */
|
||||
if(info->isize == 0) {
|
||||
info->isize = atol(tmp);
|
||||
}
|
||||
} else if(!strcmp(line, "%ISIZE%")) {
|
||||
/* ISIZE (installed size) tag only appears in sync repositories,
|
||||
* not the local one. */
|
||||
|
@ -86,7 +86,8 @@ void dump_pkg_full(pmpkg_t *pkg, int level)
|
||||
}
|
||||
list_display(_("Conflicts With :"), alpm_pkg_get_conflicts(pkg));
|
||||
list_display(_("Replaces :"), alpm_pkg_get_replaces(pkg));
|
||||
printf(_("Installed Size : %6.2f K\n"), (float)alpm_pkg_get_size(pkg) / 1024.0);
|
||||
printf(_("Installed Size : %6.2f K\n"),
|
||||
(float)alpm_pkg_get_isize(pkg) / 1024.0);
|
||||
printf(_("Packager : %s\n"), (char *)alpm_pkg_get_packager(pkg));
|
||||
printf(_("Architecture : %s\n"), (char *)alpm_pkg_get_arch(pkg));
|
||||
printf(_("Build Date : %s\n"), bdatestr);
|
||||
|
@ -280,7 +280,12 @@ static int filter(pmpkg_t *pkg)
|
||||
static void display(pmpkg_t *pkg)
|
||||
{
|
||||
if(config->op_q_info) {
|
||||
dump_pkg_full(pkg, config->op_q_info);
|
||||
if(config->op_q_isfile) {
|
||||
/* omit info that isn't applicable for a file package */
|
||||
dump_pkg_full(pkg, 0);
|
||||
} else {
|
||||
dump_pkg_full(pkg, config->op_q_info);
|
||||
}
|
||||
}
|
||||
if(config->op_q_list) {
|
||||
dump_pkg_files(pkg);
|
||||
|
Loading…
x
Reference in New Issue
Block a user