Chosing the python interpreter should be based on the package version, not the machine series

Bug #1956303 reported by Laurent Sesquès
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
landscape-client-charm
New
Undecided
Unassigned

Bug Description

On a xenial host with a backported landscape-client from bionic, the hooks fail to execute because:

```
[...]
interpreter="/usr/bin/python"

if [ `lsb_release -rs` \> "18.00" ]; then
    # landscape-client has py3 libs from bionic forward
    interpreter="/usr/bin/python3"
fi
[...]
```

Instead, we should check the package version:
```
[...]
interpreter="/usr/bin/python"

if [ `dpkg -s landscape-client | awk '/^Version: / {print $2}'` \> "18.00" ]; then
    # landscape-client has py3 libs from bionic forward
    interpreter="/usr/bin/python3"
fi
[...]
```

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.