On Sun, Dec 19, 2010 at 12:40:56PM +0100, Stefan Sperling wrote: > $ sudo pkg_add -i py-matplotlib > Can't install py-matplotlib-0.98.5.2p5 because of libraries > |library tcl84.1.1 not found > | not found anywhere > |library tk84.1.1 not found > | not found anywhere
For what it's worth, I'm writing code to prevent pkg_create from creating such packages in the first place, which would make these errors way more obvious. The way it's gonna work is by reusing the Dependencies code to build the dependency tree and populate it with sharedlibs, with some variations: - not having some @depend around is not an error, if a RUN_DEPENDS is not there yet, libraries shouldn't come from it. - @wantlib should only come from installed packages, especiall not old .libs. - if there are depends with the same BASE_PKGPATH, then we also look in WRKINST, on the assumption that other subpackages will provide the libraries. This ought to catch all cases ! The final code is not ready yet. "Reuse" means some surgery in Dependencies to put a lot of the Solver code in a BaseSolver class, that will be used both by pkg_add (which looks in lots of places) and by pkg_create (which uses only a small portion of the code). This is also work that's going to pave the way for better lib-depends-check, hopefully... As usual, the rationale is: if we have one single piece of code that does dependencies all around, then it can't get out of synch with itself, and so the semantics for dependencies become totally non-bogus. (todo later: actually create PkgPath objects, since I now have at least two places that handle BASE_PKGPATH and other stuff, to wit, this code in pkg_create and dpb... and this would allow somewhat nicer and more fullproof @pkgpath annotations...)