On Fri, Jan 01, 2010 at 07:22:19PM -0600, Chris Bennett wrote: > 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. Why are you using -n, then ? PKG_CACHE works perfectly fine if you update the first machine, then use the resulting cache on the second machine. The whole design of pkg_add revolves around the fact that you have to download the packages anyways, so it tries really hard to be as responsive as possible in installing stuff on the fly. It's been a few years now, but it is installing the package in its entirety, so even if you skip the PKG_CACHE part, it is possible to recreate the packages from an installed machine. > 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. Good luck in writing something that will be better than pkg_add in figuring out what changed. > One question. Is the index.txt from PKG_PATH used? I have been > adding latest copy to pkg_cache, just in case. Nope, it's not. on ftp, pkg_add is using nlist *.tgz to get its list of package names. And on http, it's using index.html. > > 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? I have no idea. Possibly. I don't ever use it. You will possibly retrieve more packages than you strictly need, since pkg_add looks inside packages, and doesn't retrieve them unless they have different signatures. Also, -n -u is on my list of things to fix eventually. I don't know if you've noticed how massively improved pkg_add is in -current compared to 4.6, and other improvements are still coming. t
