Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Feb 2007 19:22:09 +0100
From:      Michel Talon <talon@lpthe.jussieu.fr>
To:        freebsd-hackers@freebsd.org
Subject:   Re: pkg_upgrade (was Re: pkg_add does not backtrack, does it?)
Message-ID:  <20070209182209.GA24307@lpthe.jussieu.fr>

next in thread | raw e-mail | index | archive | help
youshi10 wrote :

> > Personally, I think that's cool, but it does means it won't go into
> > the base system. Portupgrade would probably be in the base system if
> > it were written in a language in the base system.
> >
> > 	<mike
> > --
> > Mike Meyer <mwm@mired.org>
> > http://www.mired.org/consulting.html
> > Independent Network/Unix/Perforce consultant, email for more
> > information.
> 
> Would perl be close enough to count, or would it have to be C/C++?

I think that such a tool, once debugged, and if people find it
convenient, should be written in C++. The reason is that such a tool
naturally uses a lot of dictionaries and similar data structures which 
are in the STL. So i think the translation from python to C++ would not
be too terrible. I hope to do it later on if it is valuable.

For the moment being i have fixed some little problems i had with
save_pkg.py and i have finally found a bug which was such that far too
many ports were compiled. The bug was in function to_have() which was
completely incorrect.

With this correction, this is the sort of result i get on my machine:
niobe% ./pkgupgrade 
There are now 621 packages installed.

Here i have shunted first phase for debugging.

Second phase, downloads and backups.
Total time spent in backups:  00 minutes 22 seconds.
Total time spent in downloads:  08 minutes 17 seconds.
Writing upgrade shell script.
Will remove 391 old packages.
Will install 465 new binary packages.
Will compile 11 ports.
All tasks completed.
******************************************************************
Total time:  09 minutes 12 seconds.

So only 11 ports have to be compiled! Of course it retreived a lot more
packages, which explains the longer download time.

I have replaced the corrected save_pkg.py on my website, and will
replace pkgupgrade tomorrow after a further check.


-- 

Michel TALON




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070209182209.GA24307>