From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 9 18:22:14 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 49BCD16A400 for ; Fri, 9 Feb 2007 18:22:14 +0000 (UTC) (envelope-from michel@lpthe.jussieu.fr) Received: from shiva.jussieu.fr (shiva.jussieu.fr [134.157.0.129]) by mx1.freebsd.org (Postfix) with ESMTP id A803B13C428 for ; Fri, 9 Feb 2007 18:22:13 +0000 (UTC) (envelope-from michel@lpthe.jussieu.fr) Received: from parthe.lpthe.jussieu.fr (parthe.lpthe.jussieu.fr [134.157.10.1]) by shiva.jussieu.fr (8.13.7/jtpda-5.4) with ESMTP id l19IMBLw038704 for ; Fri, 9 Feb 2007 19:22:11 +0100 (CET) X-Ids: 168 Received: by parthe.lpthe.jussieu.fr (Postfix, from userid 10096) id 02FFFCF097; Fri, 9 Feb 2007 19:21:48 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on parthe.lpthe.jussieu.fr X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=AWL,NO_DNS_FOR_FROM autolearn=no version=3.1.7 Received: from niobe.lpthe.jussieu.fr (niobe.lpthe.jussieu.fr [134.157.10.41]) by parthe.lpthe.jussieu.fr (Postfix) with ESMTP id 8094FBF599 for ; Fri, 9 Feb 2007 19:21:48 +0100 (CET) Received: by niobe.lpthe.jussieu.fr (Postfix, from userid 2005) id 48CB63C; Fri, 9 Feb 2007 19:22:09 +0100 (CET) Date: Fri, 9 Feb 2007 19:22:09 +0100 From: Michel Talon To: freebsd-hackers@freebsd.org Message-ID: <20070209182209.GA24307@lpthe.jussieu.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (shiva.jussieu.fr [134.157.0.168]); Fri, 09 Feb 2007 19:22:11 +0100 (CET) X-Virus-Scanned: ClamAV 0.88.5/2544/Fri Feb 9 09:44:48 2007 on shiva.jussieu.fr X-Virus-Status: Clean X-Miltered: at shiva.jussieu.fr with ID 45CCBBD3.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Mailman-Approved-At: Fri, 09 Feb 2007 21:47:02 +0000 Subject: Re: pkg_upgrade (was Re: pkg_add does not backtrack, does it?) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Feb 2007 18:22:14 -0000 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 Meyer > > 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