refactor the code so that caching is setup in the repository that's
authorespie <espie@openbsd.org>
Sat, 16 Apr 2022 09:32:40 +0000 (09:32 +0000)
committerespie <espie@openbsd.org>
Sat, 16 Apr 2022 09:32:40 +0000 (09:32 +0000)
commit217f4ef4605f52e62791721e9ee567ad643530db
tree1b4742f1ea9fb47c74bbd7d59dd4c888afc28d66
parent01ac1ae112e9987b6f98348e21932c0ae0a0a9c3
refactor the code so that caching is setup in the repository that's
linked to quirks during do_quirks.

then add a pre-cache that does run locate once on the full list of things
we want to update/install (assuming "regular" pkgsets, that is, where the
names are the ones we want).

Then the actual fetching of caching info will look in that pre-cache before
resorting to locate itself (or going straight to the wire).

The code isn't active yet, the XXX comment in
OpenBSD/PackageRepository/Installed.pm
says it all.
usr.sbin/pkg_add/Makefile
usr.sbin/pkg_add/OpenBSD/PackageLocation.pm
usr.sbin/pkg_add/OpenBSD/PackageRepository/Cache.pm [new file with mode: 0644]
usr.sbin/pkg_add/OpenBSD/PackageRepository/Installed.pm
usr.sbin/pkg_add/OpenBSD/PkgAdd.pm