From owner-freebsd-stable@FreeBSD.ORG Sun Mar 6 21:18:30 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42635106566C for ; Sun, 6 Mar 2011 21:18:30 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3fd3:cd67:fafa:3d78]) by mx1.freebsd.org (Postfix) with ESMTP id 981758FC08 for ; Sun, 6 Mar 2011 21:18:29 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [81.187.76.163]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.4/8.14.4) with ESMTP id p26LIIov058404 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Sun, 6 Mar 2011 21:18:25 GMT (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: Sendmail DKIM Filter v2.8.3 smtp.infracaninophile.co.uk p26LIIov058404 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=infracaninophile.co.uk; s=201001-infracaninophile; t=1299446305; bh=mNmjI5zqbjGbX4BTDYcj/keHF5+nMsDc/RFWm+0tTMA=; h=Message-ID:Date:From:MIME-Version:To:Subject:References: In-Reply-To:Content-Type:Cc:Content-Type:Date:From:In-Reply-To: Message-ID:Mime-Version:References:To; z=Message-ID:=20<4D73FA12.4000104@infracaninophile.co.uk>|Date:=20S un,=2006=20Mar=202011=2021:18:10=20+0000|From:=20Matthew=20Seaman= 20|User-Agent:=20Mozilla/5.0=20(M acintosh=3B=20U=3B=20Intel=20Mac=20OS=20X=2010.6=3B=20en-US=3B=20r v:1.9.2.15)=20Gecko/20110303=20Thunderbird/3.1.9|MIME-Version:=201 .0|To:=20freebsd-stable@freebsd.org|Subject:=20Re:=20Question=20ab out=20packages=20installed=20via=20`pkg_add=20-r`|References:=20<2 0110305150436.GA2175@fbsd.t60.cpu>=09<20110305154817.GQ30336@core. byshenk.net>=20<4D72A069.90104@FreeBSD.org>=09<20110306010015.GC41 60@fbsd.t60.cpu>=09=20<4d734567.15evysQIxrkK6d6O%perryh@pluto.rain .com>|In-Reply-To:=20<4d734567.15evysQIxrkK6d6O%perryh@pluto.rain. com>|X-Enigmail-Version:=201.1.1|OpenPGP:=20id=3D60AE908C|Content- Type:=20multipart/signed=3B=20micalg=3Dpgp-sha1=3B=0D=0A=20protoco l=3D"application/pgp-signature"=3B=0D=0A=20boundary=3D"----------- -enig2F8384B59E94BDFE83DBACCF"; b=A+SDt+ZS55kWbwQSZ2j+vhvYjJND5ORjKUBGQr+1rzLkKZRytWZNMNT1lK7ZDB26M YaQ+CEv1vLMZGWMut8tb91xTreGXBOvxBKDu/n6Ss+GxljyW5KQ8hjvRNOgUlwYrzX 5YLL9HcRdFwI7pPFbFZ8RyS4uPEREnLPSulJizVw= Message-ID: <4D73FA12.4000104@infracaninophile.co.uk> Date: Sun, 06 Mar 2011 21:18:10 +0000 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: freebsd-stable@freebsd.org References: <20110305150436.GA2175@fbsd.t60.cpu> <20110305154817.GQ30336@core.byshenk.net> <4D72A069.90104@FreeBSD.org> <20110306010015.GC4160@fbsd.t60.cpu> <4d734567.15evysQIxrkK6d6O%perryh@pluto.rain.com> In-Reply-To: <4d734567.15evysQIxrkK6d6O%perryh@pluto.rain.com> X-Enigmail-Version: 1.1.1 OpenPGP: id=60AE908C Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig2F8384B59E94BDFE83DBACCF" X-Virus-Scanned: clamav-milter 0.97 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_FAIL autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on lucid-nonsense.infracaninophile.co.uk Subject: Re: Question about packages installed via `pkg_add -r` X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2011 21:18:30 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig2F8384B59E94BDFE83DBACCF Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 06/03/2011 08:27, perryh@pluto.rain.com wrote: > Last time I tried it, pkg_add -r -K did indeed save local copies of > the packages fetched from the remote repository, but a problem arose > when one later wanted to _use_ that local stash while falling back to > -r behavior for anything not found locally. Last I knew there was no > easy way to tell pkg_add to do that. Interestingly, portmaster(8) is good for doing that. These two lines in portmasterrc (or the equivalent command line options: --packages, --local-packagedir) make portmaster try to install a package from a local package repository first, then fall back to fetching packages from the net, and only then try building the port: PM_PACKAGES=3Dfirst LOCAL_PACKAGEDIR=3D/usr/ports/packages Which is what you want. Or perhaps 'PM_PACKAGES=3Donly' which only uses pkgs and doesn't build any ports. Personally I find these most useful combined with a third option: PM_PACKAGES_LOCAL=3Dpmp_local (Cmd line: --packages-local) which makes portmaster try to install pkgs from a local repository first, and failing that, build the port. Oh, and to save anyone needlessly re-downloading packages: if you've got the port / package already installed, then you can recreate the pkg tarball easily by: # pkg_create -b pkg-name Add a '-R' to that to create pkg tarballs for everything pkg-name depends on too. pkg-name will include the version number as shown in eg. 'pkg_info -Ia' output. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matthew@infracaninophile.co.uk Kent, CT11 9PW --------------enig2F8384B59E94BDFE83DBACCF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.16 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk1z+hoACgkQ8Mjk52CukIw9DwCfay+7nnFvtUYcYQxF6xM7Rmlz JAsAnAnZZnI9vo8k5PE3MSPJ5oDlPFKi =pvJV -----END PGP SIGNATURE----- --------------enig2F8384B59E94BDFE83DBACCF--