From owner-freebsd-ports@FreeBSD.ORG Sat May 9 18:52:57 2009 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B5201065674 for ; Sat, 9 May 2009 18:52:57 +0000 (UTC) (envelope-from kamikaze@bsdforen.de) Received: from mail.bsdforen.de (bsdforen.de [212.204.60.79]) by mx1.freebsd.org (Postfix) with ESMTP id 131C68FC25 for ; Sat, 9 May 2009 18:52:56 +0000 (UTC) (envelope-from kamikaze@bsdforen.de) Received: from mobileKamikaze.norad (unknown [88.130.192.63]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bsdforen.de (Postfix) with ESMTP id 40BCF8A01A7; Sat, 9 May 2009 20:52:54 +0200 (CEST) Message-ID: <4A05D105.1060401@bsdforen.de> Date: Sat, 09 May 2009 20:52:53 +0200 From: Dominic Fandrey User-Agent: Thunderbird 2.0.0.21 (X11/20090408) MIME-Version: 1.0 To: "Alexey V. Degtyarev" References: <49FACED3.2070009@bsdforen.de> <89135507@bb.ipt.ru> <20090504113919.GC93445@hs-4.renatasystems.org> In-Reply-To: <20090504113919.GC93445@hs-4.renatasystems.org> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Boris Samorodov , freebsd-ports@freebsd.org Subject: Re: binary package maintenance tool X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 May 2009 18:52:59 -0000 Alexey V. Degtyarev wrote: >>> The port sysutils/bsdadminscripts has just been updated to >>> version 6.0, which features pkg_upgrade, a binary only >>> package maintenance tool. >>> It makes no use of the ports tree, so unlike other build >>> oriented tools, you do not need a copy of the ports tree >>> to keep your packages up to date. >>> It only requires an INDEX file from pointyhead or your >>> personal Tinderbox. >> Great! T've done some tests at my home machine and I really >> like this tool. I was deaming for it for a long time. And >> it works much faster than "portupgrade -PP". > > pkg_upgrade works very good for me too, except one thing: > > Assume package pkg-1.1 installed on the system and is going to upgrade. > The pkg-1.2 version of package requires a little bit more packages that > required by pkg-1.1: + a new one package newpkg-1.1 for example. After > pkg_upgrade upgrades package `pkg', there is no newpkg-1.1 installed on > the system and there is a error occured while updating. Here is the > illustration with some names screened: > > $ export PACKAGESITE=http://some.path.to/packages/ > $ pkg_upgrade -na > Update to (nice/pkg) > $ pkg_upgrade -a > /usr/ports/packages/All/pkg-1.2.tbz 100% of 3537 B 5464 kBps > ===> Update to > (nice/pkg) > pkg_add: could not find package newpkg-1.1 (proceeding anyway) > pkg_add: can't open dependency file '/var/db/pkg/newpkg-1.1/+REQUIRED_BY'! > dependency registration is incomplete > => Update to > (nice/pkg) succeeded > $ pkg_info -Ex newpkg > $ pkg_info -Ex pkg > pkg-1.2 > > I think that pkg_upgrade should respect a new package's dependency list > and pre-fetch all the new dependencies before pkg_add. > > This means that the missing dependency is not listed in the index and hence not available for download or the index file provided by pointyhead is simply broken. Because pkg_upgrade does in deed download all dependencies (that are also listed in the index) and does not install a single package until all required packages have been downloaded. At least it did that in many, many tests I have performed.