static gboolean alpm_pkg_is_ignorepkg (pmpkg_t *pkg) { const alpm_list_t *ignorepkgs, *ignoregrps, *i; g_return_val_if_fail (pkg != NULL, TRUE); ignorepkgs = alpm_option_get_ignorepkgs (); if (alpm_list_find_str (ignorepkgs, alpm_pkg_get_name (pkg)) != NULL) { return TRUE; } ignoregrps = alpm_option_get_ignoregrps (); for (i = alpm_pkg_get_groups (pkg); i != NULL; i = i->next) { if (alpm_list_find_str (ignoregrps, i->data) != NULL) { return TRUE; } } return FALSE; }
/** * pacman_manager_get_ignore_packages: * @manager: A #PacmanManager. * * Gets a list of packages that will never be upgraded. * * Returns: A list of package names. Do not free. */ const PacmanList *pacman_manager_get_ignore_packages (PacmanManager *manager) { g_return_val_if_fail (manager != NULL, NULL); return alpm_option_get_ignorepkgs (); }