Hi Shawn,

On Thu, 2010-08-26 at 14:54 -0700, Shawn Walker wrote:
> Yes.  Clients are supposed to supply the ImageInterface with the version 
> of the pkg.client.api *they* understand.  The logic is that if if a 
> client specifies a version that's no longer compatible with the current 
> API that a version exception will be raised to prevent a client from 
> failing somewhere during execution instead of at API init.

Just to follow up on this, I found out why the pkglint tests weren't
failing for cases where I was using my local API version number.

At the time of integration, engine.py was using version 40, but
src/client/api.py had:

---
CURRENT_API_VERSION = 43
.
.
.
                compatible_versions = set([40, CURRENT_API_VERSION])

                if version_id not in compatible_versions:
                        raise apx.VersionException(CURRENT_API_VERSION,
                            version_id)
---

which explains why the test suite wasn't failing.  If I'm understanding
things correctly, the check for compatible versions is incorrect here as
it isn't performing the checks described in doc/client_api_version.txt

Should you be updating that compatible_versions check in your change to
prevent removal of publishers with installed packages?

It might also be handy to have a list of API consumers documented in the
pkg gate somewhere so it's clear which files need to be updated
everytime there's an API version change.

        cheers,
                        tim




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

Reply via email to