xbps: merge another bugfix from git master.

This commit is contained in:
Juan RP 2013-04-04 10:45:53 +02:00
parent d3b34f7651
commit fd9b8d4062
2 changed files with 34 additions and 1 deletions

View file

@ -0,0 +1,33 @@
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

View file

@ -1,7 +1,7 @@
# Template file for 'xbps'
pkgname=xbps
version=0.22
revision=3
revision=4
build_style=configure
configure_args="--prefix=/ --exec-prefix=/usr --sbindir=/usr/sbin
--enable-static --enable-debug --enable-tests"