diff --git a/srcpkgs/xbps/patches/0003-lib-transaction_dictionary.c-get-installed_size-obj-.patch b/srcpkgs/xbps/patches/0003-lib-transaction_dictionary.c-get-installed_size-obj-.patch new file mode 100644 index 00000000000..7b5c09060f5 --- /dev/null +++ b/srcpkgs/xbps/patches/0003-lib-transaction_dictionary.c-get-installed_size-obj-.patch @@ -0,0 +1,33 @@ +From 80de70d0cfc50aaa55f95d43a6ffcdfe8c363e18 Mon Sep 17 00:00:00 2001 +From: Juan RP +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 + diff --git a/srcpkgs/xbps/template b/srcpkgs/xbps/template index a1dc33d9b9f..6dc9d72f503 100644 --- a/srcpkgs/xbps/template +++ b/srcpkgs/xbps/template @@ -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"