Marc Espie wrote:
On Fri, Jan 01, 2010 at 01:29:48PM -0600, Chris Bennett wrote:
I want to keep a local PKG_CACHE to speed up updates. Without that,
when the same package is re-installed after dependency change, the
same package has to be downloaded again
Correct me if I'm wrong, but if I use:
pkg_add -s -ui -F update -F updatedepends or
pkg_add -n -ui -F update -F updatedepends
I can get a list of new packages to add to package cache and just
set PKG_PATH to that directory.
The man page did not make it clear if I should use -n or -s
Huh ?
-s Don't actually install packages, skip as many steps as needed
and report only the disk size changes that would happen. Simi-
lar to -n, except it also skips fetching full packages and stops
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
at getting the information it needs.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
how do you expect this to work with PKG_CACHE ?
Apart from this, pkg_add -n is currently very broken if used with -u. There
are some old assumptions made for -n that no longer hold with -u, and it can
get very confused when it sees packages that have the same name, but differing
internals.
So:
- it should work with -n
- it won't work with -s
- -n + -u is currently broken, it's on my list of things to fix.
I'm just looking for a list of the NEWER packages so that I can download
what is missing from an existing cache.
I wouldn't care at all at this step for getting more than a list of
names to download, download them, then skip the ftp part of the update
and just bang away at an already good set of packages freshly downloaded
in the cache.
I already do this for an identical machine (as far as packages) and am
manually updating another machine's cache from results of first update.
If pkg_add or some other existing tool can't do this step, then I will
come up with a script to do this anyway.
My available time to do useful stuff just went up quite a lot and for a
good while.
One question. Is the index.txt from PKG_PATH used? I have been adding
latest copy to pkg_cache, just in case.
Actually I may have just thought of something easier and rather obvious
as a much simpler solution from what I just asked.
I can just diff the correct fields of old and new index.txt and find all
the packages I need to add/delete from cache
I am assuming that index.txt is updated with every file change, right?
--
A human being should be able to change a diaper, plan an invasion,
butcher a hog, conn a ship, design a building, write a sonnet, balance
accounts, build a wall, set a bone, comfort the dying, take orders,
give orders, cooperate, act alone, solve equations, analyze a new
problem, pitch manure, program a computer, cook a tasty meal, fight
efficiently, die gallantly. Specialization is for insects.
-- Robert Heinlein