Date: Mon, 01 Aug 2011 03:02:01 -0700 From: Doug Barton <dougb@FreeBSD.org> To: Michel Talon <talon@lpthe.jussieu.fr> Cc: freebsd-ports@FreeBSD.org Subject: Re: UPDATING 20110730 Message-ID: <4E367999.8000906@FreeBSD.org> In-Reply-To: <20110801085135.GA45113@lpthe.jussieu.fr> References: <20110801085135.GA45113@lpthe.jussieu.fr>
next in thread | previous in thread | raw e-mail | index | archive | help
On 08/01/2011 01:51, Michel Talon wrote: > Doug wrote: >> 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 > http://www.lpthe.jussieu.fr/~talon/check_pkg.py > proceeding globally as you describe above. It would not make a big > difference to completely fix the +CONTENTS. FYI, what portmaster is doing is fixing the pkgdep lines in +CONTENTS, and updating +REQUIRED_BY as needed. > 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. 2 problems, obviously portmaster is doing more work, and it's not using the INDEX file by default. Without using INDEX with 600 ports installed portmaster --check-depends takes less than a minute. Using INDEX actually takes about 1:20, but that's because the way that portmaster accesses the INDEX file isn't really optimized for hundreds of reads by the same process. > 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 > http://www.lpthe.jussieu.fr/~talon/pkgupgrade > and takes someting like 1-2mn on the same machine. Either of which takes more time. :) > 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. Just to be clear, what portmaster does after installing a port is to take care of +CONTENTS and +REQUIRED_BY only for the relevant files. --check-depends does everything. > Of course the complexity > is also increased, perhaps shell scripting is not the good tool to do that A lot of people say that, but I'll stack it up against just about any interpreted language. Some of my routines are actually faster than the equivalents in pkg_info (which is why I use them). Doug -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E367999.8000906>