Radish alpha
H
HardenedBSD Package Manager
Radicle
Git (anonymous pull)
Log in to clone via SSH
Do not continue packaging if the sha256 sum has failed
Baptiste Daroussin committed 14 years ago
commit a04402fb2c2bb6202101ea9545cd6aa5d16a7f02
parent 07e6a5b127c069d80e0ae58402db29007805f5e6
1 file changed +2 -1
modified libpkg/pkg_create.c
@@ -38,7 +38,8 @@ pkg_create_from_dir(struct pkg *pkg, const char *root, struct packing *pkg_archi
			strlcpy(fpath, pkg_file_get(file, PKG_FILE_PATH), sizeof(fpath));

		if ((pkg_file_get(file, PKG_FILE_SUM) == NULL || pkg_file_get(file, PKG_FILE_SUM)[0] == '\0') && lstat(fpath, &st) == 0 && !S_ISLNK(st.st_mode)) {
-
			sha256_file(fpath, sha256);
+
			if (sha256_file(fpath, sha256) != EPKG_OK)
+
				return (EPKG_FATAL);
			strlcpy(file->sum, sha256, sizeof(file->sum));
		}