Hi there,

I've got a code review here that adds a configuration cache to the system-repository, resulting in faster, more dependable startup. (particularly important on boot, or in the face of slow or unreachable package repositories)

I spent a while trying to get the right approach to determine when to rebuild the cache. It's easy when the latest pkg(5) bits are running on an image - we delete the cache in the same place we cause a system-repository refresh on publisher-change.

It's harder when an older version of pkg(1) has manipulated an image behind the scenes, giving us a stale cache[1]. Anyway, there's a webrev at:

https://cr.opensolaris.org/action/browse/pkg/timf/sysrepo-config-cache/sysrepo-config-cache-webrev

Comments would be most welcome,

        cheers,
                        tim


[1] When loading, pkg.sysrepo(1M) validates the format of the cache file, and ensures that all publishers and URIs configured in the image are indeed represented in the cache, which I believe is sufficient - though that does allow that the cache may contain more URIs than the image has configured: necessary, because the only way to determine whether server-side redirects are still in place is to verify them :-(

I had looked at using the timestamp of the cache file vs. <ImageInterface>.last_modified, but changes to that aren't limited to simple publisher configuration changes unfortunately.
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to