Skip to content

Commit

Permalink
postinst: support python importing from uaclient on old releases
Browse files Browse the repository at this point in the history
  • Loading branch information
orndorffgrant committed Aug 11, 2023
1 parent 18c6bfa commit 81f47bf
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions debian/ubuntu-advantage-tools.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,17 @@ case "$1" in
rename_gpg_keys
fi

if dpkg --compare-versions "$PREVIOUS_PKG_VER" lt "30~"; then
if [ "$VERSION_ID" = "16.04" ] \
|| [ "$VERSION_ID" = "18.04" ] \
|| [ "$VERSION_ID" = "20.04" ] \
|| [ "$VERSION_ID" = "22.04" ] \
|| [ "$VERSION_ID" = "23.04" ] \
|| [ "$VERSION_ID" = "23.10" ]; then
ln -s ubuntupro /usr/lib/python3/dist-packages/uaclient
fi
fi

if grep -q "^ua_config:" /etc/ubuntu-advantage/uaclient.conf; then
echo "Warning: uaclient.conf contains old ua_config field." >&2
echo " Please do the following:" >&2
Expand Down

0 comments on commit 81f47bf

Please sign in to comment.