34 lines
1.1 KiB
Diff
34 lines
1.1 KiB
Diff
From 80de70d0cfc50aaa55f95d43a6ffcdfe8c363e18 Mon Sep 17 00:00:00 2001
|
|
From: Juan RP <xtraeme@gmail.com>
|
|
Date: Thu, 4 Apr 2013 10:40:32 +0200
|
|
Subject: [PATCH 1/2] lib/transaction_dictionary.c: get installed_size obj from
|
|
pkg metadata correctly.
|
|
|
|
This lead to incorrect sizes or no size when computing freed/installed size
|
|
in the transaction dictionary.
|
|
---
|
|
lib/transaction_dictionary.c | 7 ++++++-
|
|
1 file changed, 6 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/lib/transaction_dictionary.c b/lib/transaction_dictionary.c
|
|
index 6897c57..9aa5e72 100644
|
|
--- lib/transaction_dictionary.c
|
|
+++ lib/transaction_dictionary.c
|
|
@@ -97,7 +97,12 @@ compute_transaction_stats(struct xbps_handle *xhp)
|
|
*/
|
|
if ((strcmp(tract, "remove") == 0) ||
|
|
(strcmp(tract, "update") == 0)) {
|
|
- pkg_metad = xbps_pkgdb_get_pkg_metadata(xhp, pkgver);
|
|
+ char *pkgname;
|
|
+
|
|
+ pkgname = xbps_pkg_name(pkgver);
|
|
+ assert(pkgname);
|
|
+ pkg_metad = xbps_pkgdb_get_pkg_metadata(xhp, pkgname);
|
|
+ free(pkgname);
|
|
if (pkg_metad == NULL)
|
|
continue;
|
|
prop_dictionary_get_uint64(pkg_metad,
|
|
--
|
|
1.8.2
|
|
|