Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Stop warning about the library name format this will be allowed very soon in the ports tree
Baptiste Daroussin committed 12 years ago
commit c1fc835f2d9a267ea00186246ea2086c1ef69a60
parent 5486f0f
1 file changed +0 -52
modified libpkg/pkg_elf.c
@@ -167,50 +167,6 @@ test_depends(void *actdata, struct pkg *pkg, const char *fpath,
	return (EPKG_OK);
}

-
static void
-
warn_about_name_format(struct pkg *pkg, const char *fpath, const char *shlib)
-
{
-
	bool		wrong = false;
-
	unsigned	len;
-

-
	/* Shlib names in NEEDED records in the Dynamic section of an
-
           ELF object are expected to look like libfoo.so.N where the
-
           ABI version N is an integer or libfoo.so without ABI
-
           version at all.  Well, actually, this should probably only
-
           apply to shlibs which are publicly available.  shlibs for
-
           the private use of some package can have whatever naming
-
           convention they want.  So this is a bit too strict. */
-

-
	len = strlen(shlib);
-
	if (len < 9)		/* libx.so.0 */
-
		wrong = true;
-

-
	if (!wrong && strncmp(shlib, "lib", 3) != 0)
-
		wrong = true;
-

-
	if (!wrong) {
-
		const char *s;
-

-
		s = shlib + len;
-
		if (strncmp(s - 3, ".so", 3) != 0) {
-
			while (s > shlib + 3 && isdigit(*(s-1)))
-
				s--;
-
			if (strncmp(s - 4, ".so.", 4) != 0)
-
				wrong = true;
-
		}
-
	}
-

-
	if (wrong) {
-
		const char	*name;
-
		const char	*version;
-

-
		pkg_get(pkg, PKG_NAME, &name, PKG_VERSION, &version);
-

-
		warnx("(%s-%s) %s links with incorrectly named "
-
		      "shared library %s", name, version, fpath, shlib);
-
	}
-
}
-

static int
analyse_elf(struct pkg *pkg, const char *fpath,
	int (action)(void *, struct pkg *, const char *, const char *, bool),
@@ -380,14 +336,6 @@ analyse_elf(struct pkg *pkg, const char *fpath,

		shlib = elf_strptr(e, sh_link, dyn->d_un.d_val);

-
		/* When running in DEVELOPER_MODE check that shlib
-
		   names conform to the correct pattern.  Only issue a
-
		   warning on mismatch -- shlibs may belong to a
-
		   different package. */
-

-
		if (developer)
-
			warn_about_name_format(pkg, fpath, shlib);
-

		action(actdata, pkg, fpath, shlib, is_shlib);
	}