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.

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.

Here's what I think should be happening:

  * pkgplan evaluation should trigger verification of manifests for new
    packages; never an installed package

  * manifests shouldn't be permanently cached unless a package is
    actually installed; that's why manifests are automatically removed
    when a package is uninstalled

  * 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

-Shawn
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to