1 diff --git a/pkgfetch.c b/pkgfetch.c
2 index 049eb0e..b2cffbd 100644
5 @@ -105,11 +105,6 @@ void packages_fetch_summary(struct pm_ctx *pmctx, const tn_array *pkgs,
6 msgn(1, _("_ (%s to download)."), buf);
11 - snprintf_size(buf, sizeof(buf), bytesused, 1, 1);
12 - msg(1, _("After unpacking %s will be used."), buf);
17 diff --git a/poldek_ts.c b/poldek_ts.c
18 index a0dd436..a670379 100644
21 @@ -834,9 +834,10 @@ void poldek__ts_update_summary(struct poldek_ts *ts,
22 void poldek__ts_display_summary(struct poldek_ts *ts)
24 int ninst = 0, ndep = 0, nrm = 0, npkgs = 0, parseable = 0;
25 + long int sinsts = 0, sdeps = 0, srems = 0, sdiff = 0;
26 tn_array *ipkgs, *idepkgs, *rmpkgs, *pkgs;
27 char ms[1024], *to, *prefix;
31 ipkgs = n_hash_get(ts->ts_summary, "I");
32 idepkgs = n_hash_get(ts->ts_summary, "D");
33 @@ -846,16 +847,34 @@ void poldek__ts_display_summary(struct poldek_ts *ts)
34 ndep = idepkgs ? n_array_size(idepkgs) : 0;
35 nrm = rmpkgs ? n_array_size(rmpkgs) : 0;
37 - to = _("to install");
40 - npkgs = ninst + ndep;
42 - if (ts->type == POLDEK_TS_UNINSTALL) {
44 + for (i=0; i < ninst; i++) {
45 + struct pkg *pkg = n_array_nth(ipkgs, i);
46 + sinsts += pkg->size;
49 + for (i=0; i < ndep; i++) {
50 + struct pkg *pkg = n_array_nth(idepkgs, i);
54 + for (i=0; i < nrm; i++) {
55 + struct pkg *pkg = n_array_nth(rmpkgs, i);
59 + if (ts->type != POLDEK_TS_UNINSTALL) {
60 + to = _("to install");
63 + npkgs = ninst + ndep;
64 + sdiff = sinsts + sdeps - srems;
70 + sdiff = - srems - sdeps;
74 @@ -896,6 +915,16 @@ void poldek__ts_display_summary(struct poldek_ts *ts)
76 packages_display_summary(1, "R", rmpkgs, parseable);
81 + snprintf_size(size, sizeof(size), labs(sdiff), 1, 1);
84 + msgn(1, _("This operation will use %s of disk space."), size);
86 + msgn(1, _("This operation will free %s of disk space."), size);
90 tn_array *poldek_ts_get_summary(const struct poldek_ts *ts, const char *mark)