Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
If the package is an old format do md5 sums instead of sha256
Baptiste Daroussin committed 13 years ago
commit 088ead0860ac548cc59b6824792b154d5d5fc263
parent 193ccd4
2 files changed +8 -1
modified libpkg/pkg.h.in
@@ -177,6 +177,10 @@ typedef enum {
	 * The pkg refers to a localy installed package.
	 */
	PKG_INSTALLED = (1U << 2),
+
	/**
+
	 * The pkg refers to a local file old archive.
+
	 */
+
	PKG_OLD_FILE = (1U << 3),
} pkg_t;

/**
modified libpkg/pkg_ports.c
@@ -264,7 +264,10 @@ file(struct plist *p, char *line, struct file_attr *a)

		if (regular) {
			p->flatsize += st.st_size;
-
			sha256_file(testpath, sha256);
+
			if (pkg_type(p->pkg) == PKG_OLD_FILE)
+
				md5_file(testpath, sha256);
+
			else
+
				sha256_file(testpath, sha256);
			buf = sha256;
		}
		if (a != NULL)