#!/bin/sh

ver_old=$2

if [ "$(apk version -t "$ver_old" '0.11.2-r1')" = '<' ]; then
   # .egg-info was changed from a file to a directory, so we have to remove it
   # see https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/10856
   rm -f /usr/lib/python3.10/site-packages/python_uinput-*.egg-info >/dev/null 2>&1
fi

exit 0
