spell_ok $SPELL && local OLD_SPELL_VERSION="$(installed_version $SPELL)" || return 0

if [ "${VERSION:0:3}" != "${OLD_SPELL_VERSION:0:3}" ]; then
  message "This is a possibly incompatible update of $SPELL..."
  message "Figuring out what spells need to be recast, this may take a while."
  for each in $(show_up_depends $SPELL 1); do
    if gaze install-spell $each | xargs readelf -d 2> /dev/null | 
       grep -q -e libldap -e liblber; then
         up_trigger $each cast_self
    fi
  done
fi &&

if spell_ok curl && is_depends_enabled curl $SPELL; then
  up_trigger curl cast_self
fi
