Where do user files go these days?

Matthew Seaman m.seaman at infracaninophile.co.uk
Sun Nov 9 17:54:08 UTC 2014


On 09/11/2014 15:30, Mike Clarke wrote:
> I also have /var/cache/pkg outside the BE. I don't now if this could 
> lead to problems but my reasoning is that it's convenient to have the 
> latest cache available if I switch to an earlier BE and need to 
> upgrade any packages. I think that should be OK providing both BE's 
> use the same major level of the OS but I wonder if I'll have problems 
> if I switch from 10.x into a 9.x BE?

Keeping /var/cache/pkg outside the B.E. is an idea worth considering,
but probably doesn't really save enough download time or disk space
usage to really make the extra effort worth while in most cases.  It is
only useful while you're doing minor version upgrades -- as soon as you
get to a major upgrade, then you need to wipe the cache and repopulate
with new packages for the new major version.  (Well, you don't actually
need to wipe the cache, as pkg(8) is smart enough not to get confused by
the presence of packages for a different OS version.  But you will need
to download all new packages.)

It also can be pretty useful to keep older versions of package tarballs
around in the cache -- sometimes a package update can go horribly wrong,
and a useful way to fix things is to forcibly revert to an older version
by 'pkg add'ing the tarball of the older version from the cache.
(Although recent versions of pkg(8) are much more resistant to this sort
of problem, and needing this sort of fallback should become unnecessary
ultimately.)

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.

PGP: http://www.infracaninophile.co.uk/pgpkey
JID: matthew at infracaninophile.co.uk

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 971 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20141109/b35a38ab/attachment.sig>


More information about the freebsd-questions mailing list