Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Add the machinery to record the shlibs provided by a package
Matthew Seaman committed 13 years ago
commit 08da5dfb1448af375b63bffad6d543b942b408b6
parent 24ad463
1 file changed +10 -2
modified libpkg/pkg_elf.c
@@ -1,6 +1,6 @@
/*-
 * Copyright (c) 2011-2012 Baptiste Daroussin <bapt@FreeBSD.org>
-
 * Copyright (c) 2012 Matthew Seaman <matthew@FreeBSD.org>
+
 * Copyright (c) 2012-2013 Matthew Seaman <matthew@FreeBSD.org>
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without
@@ -364,9 +364,17 @@ analyse_elf(struct pkg *pkg, const char *fpath,
			goto cleanup;
		}

-
		if (dyn->d_tag == DT_SONAME)
+
		if (dyn->d_tag == DT_SONAME) {
			is_shlib = true;

+
			/* The file being scanned is a shared library
+
			   *provided* by the package. Record this if
+
			   appropriate */
+

+
			if (shlibs)
+
				pkg_addshlib_provided(pkg, basename(fpath));
+
		}
+

		if (dyn->d_tag != DT_RPATH && dyn->d_tag != DT_RUNPATH)
			continue;