Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Make pkg check -d aware of provides/requires (both regular and libs)
Baptiste Daroussin committed 10 years ago
commit da7a48c89393748593cc403c6b10a42c05560b08
parent 8d70ddc
1 file changed +20 -0
modified src/check.c
@@ -63,6 +63,8 @@ static int
check_deps(struct pkgdb *db, struct pkg *p, struct deps_head *dh, bool noinstall, struct sbuf *out)
{
	struct pkg_dep *dep = NULL;
+
	struct pkg_shlib *shlib = NULL;
+
	struct pkg_provide *provide = NULL;
	int nbpkgs = 0;

	assert(db != NULL);
@@ -81,6 +83,24 @@ check_deps(struct pkgdb *db, struct pkg *p, struct deps_head *dh, bool noinstall
		}
	}

+
	/* checking libraries required */
+
	while (pkg_shlibs_required(p, &shlib) == EPKG_OK) {
+
		if (quiet)
+
			pkg_sbuf_printf(out, "%n\t%Bn\n", p, shlib);
+
		else
+
			pkg_sbuf_printf(out, "%n has require a missing libraries: %Bn\n",
+
			    p, shlib);
+
	}
+

+
	/* checking requires */
+
	while (pkg_requires(p, &provide) == EPKG_OK) {
+
		if (quiet)
+
			pkg_sbuf_printf(out, "%n\tYn\n", p, provide);
+
		else
+
			pkg_sbuf_printf(out, "%n has a missing requirement: %Yn\n",
+
			    p, provide);
+
	}
+

	return (nbpkgs);
}