Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Do not skip file extraction if local and remote files are the same
Baptiste Daroussin committed 11 years ago
commit 965bffaec58ee928f391b6b8fee2b913e7fee0bb
parent 92ed875
1 file changed +0 -12
modified libpkg/pkg_add.c
@@ -174,18 +174,6 @@ do_extract(struct archive *a, struct archive_entry *ae, const char *location,
		strlcpy(rpath, pathname, sizeof(rpath));

		if (lstat(rpath, &st) != -1) {
-
			/* check is the old version is the same as the new version */
-
			if (S_ISREG(st.st_mode) && st.st_size == archive_entry_size(ae)) {
-
				char localsum[SHA256_DIGEST_LENGTH * 2 + 1];
-
				if (sha256_file(rpath, localsum) == EPKG_OK) {
-
					HASH_FIND_STR(pkg->files, path, rf);
-
					if (strcmp(localsum, rf->sum) == 0) {
-
						pkg_debug(2, "Do not extract identical file");
-
						pkg_emit_progress_tick(cur_file++, nfiles);
-
						continue;
-
					}
-
				}
-
			}
			/*
			 * We have an existing file on the path, so handle it
			 */