Time to abandon recursive pulling of dependencies?

Stephen Montgomery-Smith stephen at math.missouri.edu
Mon May 14 02:10:06 UTC 2007


Stephen Montgomery-Smith wrote:
> I have looked into making the registration and package-building process 
> even faster.  It seems to me that the easiest way would be to redesign 
> the package database so that it also includes a 
> package-name/+DEPENDENCIES file, which would be a kind of reverse of 
> package-name/+REQUIRED_BY.  This could be used instead of "make 
> package-depends" in creating PKG_ARGS in bsd.port.mk.  Creating 
> +DEPENDENCIES would be very easy - you "cat" together the files of the 
> immediate dependencies ${RUN_LIB_DEPENDS} and do a "uniq" to the final 
> result.
> 
> Stephen


OK, I am going to retract this suggestion.  The real reason, I think, 
that make package-depends is so slow is that invoking make is so slow. 
Try adding these lines to /usr/ports/Mk/bsd.port.mk:


yyy:
	@for dir in ${_LIB_RUN_DEPENDS:C,[^:]*:([^:]*):?.*,\1,}; do \
		(cd $$dir; ${MAKE} xxx); \
	done

xxx:
	@${ECHO_CMD} ${PKGNAME}


Then cd to /usr/ports/x11/gnome2 and type

make yyy

All it is supposed to do is list the names of the immediate 
dependencies.  Even this is dead dog slow!!!  And the problem is, there 
simply is no other way to find out the name of the package except by 
invoking make in the directory.  So even if all the +DEPENDENCIES are in 
/var/db/pkg-name, even to find pkg-name is going to take a long, long time.

Basically I think we are stuck on making "make package-depends" go any 
faster.

However I do think that the modifications I made to pkg_create go a very 
significant way to solving the problem of registration taking so very long.

Stephen


More information about the freebsd-ports mailing list