Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Do no leak repository and relocated annotations into the packages
Baptiste Daroussin committed 12 years ago
commit ba6a245ccaa749809bfce66bf660c2cf39e6bb00
parent 0e7df44
1 file changed +5 -1
modified libpkg/pkg_manifest.c
@@ -962,9 +962,13 @@ emit_manifest(struct pkg *pkg, struct sbuf **out, short flags)
	}
	obj = ucl_object_insert_key(top, map, "options", 7, false);

-
	if (pkg->annotations != NULL)
+
	if (pkg->annotations != NULL) {
+
		/* Remove internal only annotations */
+
		ucl_object_delete_keyl(pkg->annotations, "repository", 10);
+
		ucl_object_delete_keyl(pkg->annotations, "relocated", 9);
		obj = ucl_object_insert_key(top,
		    ucl_object_ref(pkg->annotations), "annotations", 11, false);
+
	}

	if ((flags & PKG_MANIFEST_EMIT_COMPACT) == 0) {
		if ((flags & PKG_MANIFEST_EMIT_NOFILES) == 0) {