Radish alpha
H
HardenedBSD Package Manager
Radicle
Git (anonymous pull)
Log in to clone via SSH
Improve the jobs summary list of what has to be fetched
Matthew Seaman committed 13 years ago
commit 005bf7fe2a99034c201a8e86ab13472d96f50392
parent 8f9fc43b9e97c84c2d4469757d20d8fa4adecc7c
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;
		}
	}