talon at lpthe.jussieu.fr
Mon Aug 1 08:51:39 UTC 2011
> Unfortunately the only way to improve on this would be to not do the
> checks on a port-by-port basis, and do them all together at the end.
> While that sounds appealing, it would dramatically increase the code
> complexity, and also dramatically increase the chances of leaving the
> pkg files in an inconsistent state if the process gets interrupted. I
> don't like either one of those options.
In here i have a program which checks the +REQUIRED_BY files and
fixes the origins in +CONTENTS
proceeding globally as you describe above. It would not make a big
difference to completely fix the +CONTENTS.
On an old machine with around +1000 ports installed it takes of the
order of 10-30 seconds to run. Of course this is very fast because it
uses the information in the INDEX file. If one accepts to download the
INDEX (like portupgrade does) this is no problem. If one wants to rebuild
the index from the ports, it takes time, but one can build a partial
index for the installed ports (and dependencies). This is done in
and takes someting like 1-2mn on the same machine.
So there are ways to speed up the bookeeping done by programs like
portupgrade, portmaster, but, as you are saying, doing this job between
*each* port upgrade is far more time consuming. Of course the complexity
is also increased, perhaps shell scripting is not the good tool to do that
i don't know. Moreover i am not convinced that continually forking tons
of programs can be very fast, and it would be nice to be able to exploit
parallelism on modern multiproc machines.
More information about the freebsd-ports