From owner-freebsd-pkg@FreeBSD.ORG Wed May 14 16:21:22 2014 Return-Path: Delivered-To: freebsd-pkg@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1B42FB0E for ; Wed, 14 May 2014 16:21:22 +0000 (UTC) Received: from kithrup.com (Kithrup.COM [64.142.31.202]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F21892FBC for ; Wed, 14 May 2014 16:21:21 +0000 (UTC) Received: from kithrup.com (localhost [127.0.0.1]) by kithrup.com (8.14.4/8.14.4) with ESMTP id s4EGCKug000645 for ; Wed, 14 May 2014 09:12:20 -0700 (PDT) (envelope-from sef@kithrup.com) Received: (from sef@localhost) by kithrup.com (8.14.4/8.14.4/Submit) id s4EGCKwU000644; Wed, 14 May 2014 09:12:20 -0700 (PDT) (envelope-from sef) Date: Wed, 14 May 2014 09:12:20 -0700 (PDT) From: Sean Eric Fagan Message-Id: <201405141612.s4EGCKwU000644@kithrup.com> To: freebsd-pkg@freebsd.org Subject: Re: Delta packages X-BeenThere: freebsd-pkg@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Binary package management and package tools discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2014 16:21:22 -0000 Matthew Seaman wrote: >full-fledged delta package we'd probably be thinking in terms of >generating some sort of diff between old and new manifests. I've already got a tool to do that. (What it actually does is copy all the bits I can from the new manifest, and copy all the new or modified files and directories from the new one, and generate a list of rm/rmdir's for the deleted files and directories. The intent is that, afterwards, it should look just as if you'd installed the new version. As an example, however: the txz file for python27 had the new version at 4.4mbytes; the delta file just about half that.) > * upgrade package foo-1.0.0 to foo-1.0.1 > * automatically produces delta/foo-1.0.1-1.0.0.txz > * should there be problems with foo-1.0.1 can then rollback by > applying the delta package. Hah. I hadn't thought about making the reverse, but the code doesn't care, doesn't it? >> Second question: Any objections to it in principal? > >On the contrary. This would make a really great addition. Please do >send patches / pull requests. I'd hoped for some assistance with it, as the pkg code is pretty ... large :). As I said, I've got something to create the delta files, so I guess I'll start looking at modifying the package code. The things I know it needs to do are: * The manifest needs a key/value indicating what the old version is. * It needs to extract the files, replacing any that are modified (and updating their checksum/owner/group/mode as necessary). * Then it needs to update the package version with the new version. (If I can't get the pkg code to do it, I can do all of that manually with a large hammer. I'd prefer not to, obviously.)