Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
pkg-delete: do not leave modified files behind
Franco Fichtner committed 9 years ago
commit 70b46b1f161c1cd7a93e24cd986ea3d5fe56cd52
parent 7957c5b
1 file changed +0 -17
modified libpkg/pkg_delete.c
@@ -302,23 +302,6 @@ pkg_delete_file(struct pkg *pkg, struct pkg_file *file, unsigned force)
	while (len > 0 && prefix_rel[len - 1] == '/')
		len--;

-
	/* Regular files and links */
-
	/* check checksum */
-
	if (!force && file->sum != NULL) {
-
		ret = pkg_checksum_validate_fileat(pkg->rootfd, path, file->sum);
-
		if (ret == ENOENT) {
-
			pkg_emit_file_missing(pkg, file);
-
			return;
-
		}
-
		if (ret != 0) {
-
			pkg_emit_error("%s%s%s different from original "
-
			    "checksum, not removing", pkg->rootpath,
-
			    pkg->rootpath[strlen(pkg->rootpath) - 1] == '/' ? "" : "/",
-
			    path);
-
			return;
-
		}
-
	}
-

#ifdef HAVE_CHFLAGS
	if (fstatat(pkg->rootfd, path, &st, AT_SYMLINK_NOFOLLOW) != -1) {
		if (st.st_flags & NOCHANGESFLAGS) {