Radish alpha
H
HardenedBSD Package Manager
Radicle
Git (anonymous pull)
Log in to clone via SSH
Add description to compat
Baptiste Daroussin committed 15 years ago
commit 9471b3521b2f2dd32323f8f8c8f55e78cdcb08ce
parent 17283afa36cba1ee754dba557c9327fa12a5350f
1 file changed +12 -0
modified libpkg/pkg_compat.c
@@ -270,6 +270,18 @@ pkg_compat_convert_installed(const char *pkg_dbdir, char *pkgname, char *manifes
		free(buffer);
	}

+
	/* adding description */
+
	tmp = strrchr(filepath, '+');
+
	tmp[0] = '\0';
+
	strlcat(filepath, "+DESC", MAXPATHLEN);
+

+
	if ((buffer_len = file_to_buffer(filepath, &buffer)) == -1) {
+
		warn("Unable to read +DESC for %s", pkgname);
+
	} else {
+
		cJSON_AddStringToObject(rootpkg, "desc", buffer);
+
		free(buffer);
+
	}
+

	/* write the new manifest */
	cjson_output = cJSON_Print(rootpkg);
	fs = fopen(manifestpath, "w+");