On 11/26/11 00:00, Danek Duvall wrote:
Shawn Walker wrote:
Ideally, what would happen is that contents -r manifest retrieval
would never be done into /var/pkg. That's arguably a separate bug,
so I would be ok with not fixing the contents case as part of this
one.
We do this already in the case that a user can't write to /var/pkg
due to permissions so that unprivileged users can use 'info',
'list', etc.
It would, however, be very nice to cache these requests. Since we know
from the catalog what a manifest's sha-1 hash should be, we could simply
store them by hash, something we've talked about doing before, anyway.
This way, if the manifest changes, it doesn't matter, as the hash will be
different.
Stretching even further, that would allow us to have a shared directory for
unprivileged users to cache manifests. You'd have to read the files to be
sure they actually hash to what they say they do, and you'd have to be
careful about symlinks and such, but it could be a useful little feature if
written properly.
Yes, it would be good to fix the client to be able to retrieve and store
manifests from/to more than just /var/pkg as that would also enable
'update -nv', etc. to work as an unprivileged user. (It does not
currently.)
My issue with caching them on a more permanent basis has been that
nothing knows to clean them up so you just end up with an ever-growing
pile of manifest files.
I'm uncertain where we could store them in a more user-visible place
(that probably isn't /var/pkg?) without creating a silent cleanup
problem. Suggestions welcome.
-Shawn
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss