From owner-freebsd-current@FreeBSD.ORG Sun Apr 22 22:39:40 2007 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0412616A400 for ; Sun, 22 Apr 2007 22:39:40 +0000 (UTC) (envelope-from nate@root.org) Received: from root.org (root.org [67.118.192.226]) by mx1.freebsd.org (Postfix) with ESMTP id C94E013C448 for ; Sun, 22 Apr 2007 22:39:39 +0000 (UTC) (envelope-from nate@root.org) Received: (qmail 25561 invoked from network); 22 Apr 2007 22:39:41 -0000 Received: from ppp-71-139-34-102.dsl.snfc21.pacbell.net (HELO ?10.0.0.235?) (nate-mail@71.139.34.102) by root.org with ESMTPA; 22 Apr 2007 22:39:41 -0000 Message-ID: <462BE425.2030401@root.org> Date: Sun, 22 Apr 2007 15:39:33 -0700 From: Nate Lawson User-Agent: Thunderbird 1.5.0.7 (X11/20061027) MIME-Version: 1.0 To: ports@freebsd.org X-Enigmail-Version: 0.94.1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: current Subject: pkg_add cache for use with -K flag X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2007 22:39:40 -0000 I have been thinking about adding some simple behavior to deal with pkg_add of failed or repeated packages. Currently with pkg_add -r, all packages (including dependencies) are re-fetched if there is any failure. With the -K flag though, the dependent packages should already be present on the local filesystem and can thus be used instead of the remote versions. The patch would be enabled if the PKGDIR environmental variable is present. When adding a package, it would first check PKGDIR for the dependencies and install from local copies if present. I think the main package itself would still need to be re-fetched since -r doesn't specify a version and there is no way to tell if the .tgz in PKGDIR is the most recent. Has anyone thought along these lines before? -- Nate