Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 06 Mar 2011 21:18:10 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        freebsd-stable@freebsd.org
Subject:   Re: Question about packages installed via `pkg_add -r`
Message-ID:  <4D73FA12.4000104@infracaninophile.co.uk>
In-Reply-To: <4d734567.15evysQIxrkK6d6O%perryh@pluto.rain.com>
References:  <20110305150436.GA2175@fbsd.t60.cpu>	<20110305154817.GQ30336@core.byshenk.net> <4D72A069.90104@FreeBSD.org>	<20110306010015.GC4160@fbsd.t60.cpu>	<AANLkTi=_K=q3O3jZZLeDjj9AsckWzu9Sz-Ju7kxhknn9@mail.gmail.com> <4d734567.15evysQIxrkK6d6O%perryh@pluto.rain.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D73FA12.4000104>