xbps_transaction_prepare: fix stats for removals.

This commit is contained in:
Juan RP 2020-02-25 08:43:52 +01:00
parent 77c72f9c2c
commit 24bbfffba1
No known key found for this signature in database
GPG Key ID: AF19F6CB482F9368

View File

@ -106,8 +106,11 @@ compute_transaction_stats(struct xbps_handle *xhp)
continue; continue;
} }
/* installed_size from repo */ /* installed_size from repo */
xbps_dictionary_get_uint64(obj, "installed_size", &tsize); if (ttype != XBPS_TRANS_REMOVE && ttype != XBPS_TRANS_HOLD &&
instsize += tsize; ttype != XBPS_TRANS_CONFIGURE) {
xbps_dictionary_get_uint64(obj, "installed_size", &tsize);
instsize += tsize;
}
/* /*
* If removing or updating a package without preserve, * If removing or updating a package without preserve,
* get installed_size from pkgdb instead. * get installed_size from pkgdb instead.