[kris@freebsd.org: cvs commit: ports/Mk bsd.port.mk]

Kris Kennaway kris at obsecurity.org
Sun Apr 20 14:58:33 PDT 2003


On Sun, Apr 20, 2003 at 07:02:09PM +0400, Sergey Matveychuk wrote:
> Kris Kennaway wrote:
> > The 'deinstall' improvement is particularly interesting.  It should
> > not be a huge amount of work to make a decent 'make upgrade' and 'make
> > recursive-upgrade' target that does a portupgrade-like sequence of
> > backup/deinstall/build/install on the current port (and its
> > dependencies).  I'd love it if someone felt like working on this!
> 
> I'v had this idea. And I'll plan to work for it within next week.
> 
> Has somebody comments or suggestion for it?

I gave it a try, but the recursive-upgrade target is not so easy.  I
wrote a modified ALL-DEPENDS-LIST that recurses into children and
sorts their dependencies in topological order, but it is very slow
(~10 minutes for gnome2).  Instead the way to do this would be to
parse the dependencies listed in INDEX, which is what portupgrade does
(like portupgrade, this would assume you have an up-to-date INDEX).

I came to the conclusion that this wouldn't really fit inside
bsd.port.mk, and it would be best to create a standalone pkg_upgrade
tool that mirrors portupgrade.  Writing it in sh might be possible,
but it would probably get very complicated.  As a first step I was
thinking about writing some C code that wrote INDEX into a binary DB
file, and which could read that into a tree structure in memory to
discover the dependency graphs.  I don't know when I'll get time to
work on this though.

Kris

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20030420/675a777b/attachment.bin


More information about the freebsd-ports mailing list