Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Improve the jobs summary list of what has to be fetched
Matthew Seaman committed 13 years ago
commit 005bf7fe2a99034c201a8e86ab13472d96f50392
parent 8f9fc43
1 file changed +7 -2
modified pkg/utils.c
@@ -629,9 +629,14 @@ print_jobs_summary(struct pkg_jobs *jobs, const char *msg, ...)
			dlsize += pkgsize;
			snprintf(path, MAXPATHLEN, "%s/%s", cachedir, pkgrepopath);
			if (stat(path, &st) != -1)
-
				dlsize -= st.st_size;
+
				oldsize = st.st_size;
+
			else
+
				oldsize = 0;
+
			dlsize -= oldsize;

-
			printf("\t%s-%s\n", name, version);
+
			humanize_number(size, sizeof(size), pkgsize, "B", HN_AUTOSCALE, 0);
+

+
			printf("\t%s-%s (%ld%% of %s)\n", name, newversion, (100 * oldsize)/pkgsize, size);
			break;
		}
	}