Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Use new checksum when parsing ports
Baptiste Daroussin committed 10 years ago
commit 24c20f65e7b54f2f9224f5e112cc2f81ff1fe1c1
parent 33cdf86
1 file changed +6 -8
modified libpkg/pkg_ports.c
@@ -357,19 +357,17 @@ meta_file(struct plist *p, char *line, struct file_attr *a, bool is_config)
			regular = !check_for_hardlink(p->hardlinks, &st);
		else
			regular = true;
-
	} else if (S_ISLNK(st.st_mode)) {
-
		buf = pkg_checksum_symlink(testpath, p->stage,
-
		    PKG_HASH_TYPE_SHA256_HEX);
-
		if (buf == NULL) {
-
			free_file_attr(a);
-
			return (EPKG_FATAL);
-
		}
+
	} else if (S_ISLNK(st.st_mode))
		regular = false;
+

+
	buf = pkg_checksum_generate_file(testpath, PKG_HASH_TYPE_SHA256_HEX);
+
	if (buf == NULL) {
+
		free_file_attr(a);
+
		return (EPKG_FATAL);
	}

	if (regular) {
		p->flatsize += st.st_size;
-
		buf = pkg_checksum_file(testpath, PKG_HASH_TYPE_SHA256_HEX);
		if (is_config) {
			size_t sz;
			char *content;