On 08/27/10 01:37 PM, Brock Pytlik wrote:
On 08/26/10 10:19 PM, Shawn Walker wrote:
On 08/26/10 09:27 PM, Tim Foster wrote:
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?
Yes, somebody should have changed that.
As for a list of consumers; that changes all the time, so a search and
replace in the gate is really the only way to handle this.
I've mentioned this before, but I wonder whether it's time to retire the
version number for the api. While I think it had a purpose at one point,
I wonder now whether it's reached the point where the overhead in
maintaining it outweighs the benefit.
No, in fact, I'd say it will become more important in the near future as
more external consumers start using the API.
-Shawn
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss