the ifvarclass should be
 "pkg_mgr_$(pkg_mgr_index)_kept.!pkg_mgr_$(pkg_mgr_index)_validated.!pkg_mgr_$(pkg_mgr_index)_error";