[OpenIndiana-discuss] Package dependencies

Alan Coopersmith alan.coopersmith at oracle.com
Tue Jan 18 19:18:59 UTC 2011


On 01/18/11 07:22 AM, Reginald Beardsley wrote:
> I noticed mention in the stable discussion that there was an issue w/ package dependencies.  However, I've not found a way to search the list archive for past discussion.  
> 
> Can someone get me oriented?  What do you need?  I'm assuming that ldd(1) will provide an 80% solution after a bit of processing.  My intent is to write a script that will automatically rebuild the dependency tree.
> 
> Library dependencies are easy to identify and document, but text file & executable dependencies are harder.  How significant are those?  It's easy to find the targets, but harder to find the references. 

The dependencies are already found - the IPS program pkgdepend is used to find
such dependencies already - the problem is it includes all the ones it finds,
so when a package like the core python package includes modules that depend on
the tcl/tk libraries, that dependency is registered and it brings in that whole
dependency tree.   The solution is to define package boundaries with such
dependency issues in mind - putting the tcl/tk bindings in an optional python
package, for instance, instead of the core.   Admittedly, when python was first
added to the system, it was done by the gnome team to fulfill gnome
dependencies, so having it depend on the X11 libraries made perfect sense.
Years later, when python underlies such core technologies as the pkg system,
hindsight provides a different view of those decisions.

BTW, as someone who wrote exactly such a script in the days before pkgdepend
existed, elfdump -d is a better source of info than ldd, as it shows you what
that binary exactly depends on, without resolving dependencies recursively.

-- 
	-Alan Coopersmith-        alan.coopersmith at oracle.com
	 Oracle Solaris Platform Engineering: X Window System




More information about the OpenIndiana-discuss mailing list