Merge lp:~psivaa/utah/python-apt-installed-version-deprecation-fix into lp:utah

Proposed by Para Siva
Status: Merged
Merged at revision: 1027
Proposed branch: lp:~psivaa/utah/python-apt-installed-version-deprecation-fix
Merge into: lp:utah
Diff against target: 11 lines (+1/-1)
1 file modified
utah/provisioning/debs.py (+1/-1)
To merge this branch: bzr merge lp:~psivaa/utah/python-apt-installed-version-deprecation-fix
Reviewer Review Type Date Requested Status
Paul Larson Approve
Review via email: mp+194739@code.launchpad.net

Description of the change

python-apt has Package.installedVersion deprecated since 0.7.9 and it makes utah break in trusty. Tested the fix to be working with a precise installation as well.

To post a comment you must log in.
Revision history for this message
Paul Larson (pwlars) wrote :

+1

review: Approve
Revision history for this message
Andy Doan (doanac) wrote :

Is this fix backwards compatible or do we need to add some logic to try either style of "installed version"?

Revision history for this message
Paul Larson (pwlars) wrote :

He mentioned testing it on precise as well, so based on that I'm guessing
it should work for our needs.

On Mon, Nov 11, 2013 at 5:57 PM, Andy Doan <email address hidden>wrote:

> Is this fix backwards compatible or do we need to add some logic to try
> either style of "installed version"?
> --
>
> https://code.launchpad.net/~psivaa/utah/python-apt-installed-version-deprecation-fix/+merge/194739
> You are reviewing the proposed merge of
> lp:~psivaa/utah/python-apt-installed-version-deprecation-fix into lp:utah.
>

Revision history for this message
Para Siva (psivaa) wrote :

Yes, I tested the fix in a precise machine to return the same string as before. Also the deprecation occurred in 0.7.9 and the first precise image came with 0.8.3. So the fix will work with precise and later but the older version ('installedVersion') stops working some where after precise.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'utah/provisioning/debs.py'
2--- utah/provisioning/debs.py 2013-05-24 14:29:23 +0000
3+++ utah/provisioning/debs.py 2013-11-11 18:43:53 +0000
4@@ -25,7 +25,7 @@
5
6
7 def _utah_deb(deb):
8- utah_version = apt.cache.Cache()['utah'].installedVersion
9+ utah_version = apt.cache.Cache()['utah'].installed.version
10 if utah_version is None:
11 raise UTAHProvisioningException("UTAH package isn't installed")
12

Subscribers

People subscribed via source and target branches

to all changes: