On 11/22/11 10:02, Shawn Walker wrote:
On 11/10/11 15:51, Brock Pytlik wrote:
On 10/11/11 21:42, Brock Pytlik wrote:
Webrev:
https://cr.opensolaris.org/action/browse/pkg/bpytlik/18012-v1
Bug:
18012 cached manifests persist for packages not currently installed
even when copy in repository changes
Thanks for taking a look,
Brock
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
Updated webrev:
https://cr.opensolaris.org/action/browse/pkg/bpytlik/18012-v2
src/modules/client/api.py:
lines 80-81: Please don't use range here; that's overkill for a
simple list of numbers. I don't think it's that bothersome to
maintain the list and it's far simpler to read.
...
General:
I do not believe this is the right approach. The manifest
verification should be invisible to API consumers -- we shouldn't
expose this sort of internal implementation detail to consumers.
Given that whether or not we should reverify a manifest when doing pkg
contents depends on whether -r is used, behavior I thought we as a team
had agreed on, it's unclear how you not expose verification through the api.
The current logic is also broken because it doesn't take into account
whether the manifest is for a package that's installed. If it is,
then it doesn't matter if the manifest is different than what the
server has now, it can't be replaced as that would invalidate the
already installed package.
Actually, it does take into account if the package is installed. See the
code in imageplan, among other places. It's just that the knowledge of
whether it's installed might be located differently than you'd prefer.
Here's what I think should be happening:
* pkgplan evaluation should trigger verification of manifests for new
packages; never an installed package
This happens with the code as provided. Please see the code in imageplan.
* manifests shouldn't be permanently cached unless a package is
actually installed; that's why manifests are automatically removed
when a package is uninstalled
So you want to change pkg contents -r so that it removes the manifest
after it shows it to the user?
* the function to verify the manifest shouldn't be stuffed into
has_manifest or get_manifest, or at the very least, should not be
exposed through pkg.client.api
Well that sounds like a very different bug than the one that was filed.
If that's the case, please repurpose 18012 (or close it and file a new
bug) and I'll remove myself as the assigned engineer.
Thanks,
Brock
-Shawn
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss