# glib 2.66 removes .la files ...
if [[ -e "$INSTALL_ROOT/usr/lib/libgobject-2.0.la" ]]; then
  . $GRIMOIRE/la_remove_up_trigger.function
  la_remove_up_trigger 0
fi &&

# up_trigger everything on minor version updates
if spell_ok $SPELL; then
  local OLD_SPELL_VERSION="$(installed_version $SPELL)" &&

  if test "${VERSION%.?}" != "${OLD_SPELL_VERSION%.?}"; then
    message "${MESSAGE_COLOR}This is a possibly incompatible update of $SPELL..." &&
    message "Figuring out what spells need to be recast, this may take a while.${DEFAULT_COLOR}" &&

    local dependees="$(show_up_depends $SPELL 1)" &&

    for each in $dependees; do
      if gaze install $each | xargs readelf -d 2> /dev/null |
         grep -q "NEEDED.*\(libgio\|libglib\|libgmodule\|libgobject\|libgthread\)-2\.0\.so"; then
           up_trigger $each check_self
      fi
    done
  fi
fi
