From owner-freebsd-questions@FreeBSD.ORG Tue Dec 2 18:41:50 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 705B1106564A; Tue, 2 Dec 2008 18:41:50 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from mail.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id 38F718FC12; Tue, 2 Dec 2008 18:41:50 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from localhost (mail.rachie.is-a-geek.net [192.168.2.101]) by mail.rachie.is-a-geek.net (Postfix) with ESMTP id 56924AFC1C6; Tue, 2 Dec 2008 09:41:49 -0900 (AKST) From: Mel To: freebsd-questions@freebsd.org Date: Tue, 2 Dec 2008 19:41:47 +0100 User-Agent: KMail/1.9.7 References: <200812021722.54517.fbsd.questions@rachie.is-a-geek.net> <82180575@bb.ipt.ru> In-Reply-To: <82180575@bb.ipt.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812021941.47714.fbsd.questions@rachie.is-a-geek.net> Cc: Boris Samorodov , Beech Rintoul , Javier Vasquez , andrew clarke Subject: Re: [freebsd-questions] Looking @ upgrades mechanisms... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2008 18:41:50 -0000 On Tuesday 02 December 2008 19:03:44 Boris Samorodov wrote: > Mel writes: > > On Tuesday 02 December 2008 17:13:58 andrew clarke wrote: > >> On Tue 2008-12-02 09:28:44 UTC+0100, Mel > > > > (fbsd.questions@rachie.is-a-geek.net) wrote: > >> > Portupgrade -PP is detrimental for bandwidth. It's not really > >> > portupgrade's fault (well, partially, it shouldn't offer the feature), > >> > because it will quite often download Latest/foo.tbz, unpack it > >> > entirely and then say "oops, I downloaded this useless package which > >> > is older or equal to what you have installed". > >> > >> Yes, this happens. -PP is not ideal for regular updates but it's > >> still useful for when you have a new FreeBSD install with no packages > >> installed, and want to get up and running quickly, grabbing the most > >> recent binaries of all your favourite ports instead of building them > >> all from source. > > > > That's infinitely slower than pkg_add -r . > > Don't use "portupgrade -NPP ". ;-) > But "portupgrade -PP " really *upgrades* packages. Don't assume that the @pkgdep lines in a given package on the FreeBSD servers will always point to an existing package. If it doesn't, watch what happens: Latest/foo.tbz based on s/@name (.*)-[^-]+$/$1/ extract foo.tbz entirely, rather then just +CONTENTS which is the first file in the tar archive find out that foo = foo-older-then-installed and discard the package I've solved this myself with an index format like this: # bzcat /var/pkg/7-stable/All/INDEX.bz2 |tail -1 archivers/zip:zip-3.0.tbz:72f4fcc337c74240eaa8ae989a452835231fe7ff32c7469094e3a5fe411d7430:181194 $origin:$pkgname.tbz:$sha256:$size High level view: Compare btree of /var/db/pkg with btree of indexfile, download and upgrade. Saves bogus downloads and doesn't need a portstree. Cons: buildserver needs to periodically create the index, index needs to be downloaded. -- Mel Problem with today's modular software: they start with the modules and never get to the software part.