Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Revert stripping shlib versions from e127d91d4.
Bryan Drewery committed 11 years ago
commit c94ac3b59ce1c8535c72583a247d1b937c80eaf3
parent 4be4eac
2 files changed +3 -25
modified libpkg/pkg.c
@@ -1108,28 +1108,6 @@ pkg_addoption_description(struct pkg *pkg, const char *key,
	return (EPKG_OK);
}

-
static void
-
pkg_handle_sostr(const char *name, struct sbuf **sb)
-
{
-
	const char *sopos;
-

-
	/* Cut off everything after .so */
-
	sopos = strstr(name, ".so");
-
	if (sopos != NULL) {
-
		sopos += sizeof(".so") - 1;
-
		if (*sopos == '.') {
-
			int len = sopos - name;
-

-
			*sb = sbuf_new_auto();
-
			sbuf_bcat(*sb, name, len);
-
		}
-
		else
-
			sbuf_set(sb, name);
-
	}
-
	else
-
		sbuf_set(sb, name);
-
}
-

int
pkg_addshlib_required(struct pkg *pkg, const char *name)
{
@@ -1141,7 +1119,7 @@ pkg_addshlib_required(struct pkg *pkg, const char *name)
	assert(name != NULL && name[0] != '\0');

	pkg_shlib_new(&s);
-
	pkg_handle_sostr(name, &s->name);
+
	sbuf_set(&s->name, name);

	HASH_FIND_STR(pkg->shlibs_required, pkg_shlib_name(s), f);
	/* silently ignore duplicates in case of shlibs */
@@ -1171,7 +1149,7 @@ pkg_addshlib_provided(struct pkg *pkg, const char *name)
	assert(name != NULL && name[0] != '\0');

	pkg_shlib_new(&s);
-
	pkg_handle_sostr(name, &s->name);
+
	sbuf_set(&s->name, name);
	HASH_FIND_STR(pkg->shlibs_provided, pkg_shlib_name(s), f);
	/* silently ignore duplicates in case of shlibs */
	if (f != NULL) {
modified libpkg/pkg_solve.c
@@ -370,7 +370,7 @@ pkg_solve_add_require_rule(struct pkg_solve_problem *problem,
	HASH_FIND_STR(problem->j->universe->provides, pkg_shlib_name(shlib), prhead);
	if (prhead != NULL) {
		/* Require rule !A | P1 | P2 | P3 ... */
-
		rule = pkg_solve_rule_new(pkg_shlib_name(shlib));
+
		rule = pkg_solve_rule_new("require");
		if (rule == NULL)
			return (EPKG_FATAL);
		/* !A */