Comment 1 for bug 1852004

Revision history for this message
Trent Lloyd (lathiat) wrote :

The only usage of apt_pkg in ceph-mon appears to be from charms.ceph:

lib/charms_ceph/utils.py
708: import apt_pkg as apt

It's being used for a simple call to apt.upstream_version to get the upstream version number.

Based on the following commit message:
https://github.com/juju/charm-helpers/commit/d2ea1b8d8c2fb5bc80b8ff2f7f81c82a02bd611b

the apt_pkg interface is not stable across releases, hence charm-helpers has implemented it's own version and triggers this deprecation warning because the charm may have expected apt_pkg.init() to have been called by charmhelpers which it would no longer do although currently it still makes the call as it would lead to a segfault if not.

So actual impact is low but the log message is annoying and the there is an upstream_version method implemented in charmhelpers so we should be able to simply switch to that.