[pacman-dev] [PATCH 3/6] --print-format displays size in bytes

Jakob Gruber jakob.gruber at gmail.com
Mon Feb 28 11:39:14 EST 2011


Printing the exact size seems to make more sense for scripting contexts.

Signed-off-by: Jakob Gruber <jakob.gruber at gmail.com>
---
 src/pacman/util.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/pacman/util.c b/src/pacman/util.c
index ba93963..23b95c9 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -676,7 +676,7 @@ void print_packages(const alpm_list_t *packages)
 		/* %s : size */
 		if(strstr(temp,"%s")) {
 			char *size;
-			pm_asprintf(&size, "%.2f", humanize_size(pkg_get_size(pkg), 'M', 0, NULL));
+			pm_asprintf(&size, "%u", pkg_get_size(pkg));
 			string = strreplace(temp, "%s", size);
 			free(size);
 			free(temp);
-- 
1.7.4.1



More information about the pacman-dev mailing list