/** * pk_backend_install_packages: */ void pk_backend_install_packages (PkBackend *backend, gboolean only_trusted, gchar **package_ids) { gchar *package_ids_temp; /* check network state */ if (!pk_backend_is_online (backend)) { pk_backend_error_code (backend, PK_ERROR_ENUM_NO_NETWORK, "Cannot install when offline"); pk_backend_finished (backend); return; } /* send the complete list as stdin */ package_ids_temp = pk_package_ids_to_string (package_ids); pk_backend_spawn_helper (spawn, BACKEND_FILE, "install-packages", pk_backend_bool_to_string (only_trusted), package_ids_temp, NULL); g_free (package_ids_temp); }
/** * pk_backend_update_packages: */ void pk_backend_update_packages (PkBackend *backend, PkBackendJob *job, PkBitfield transaction_flags, gchar **package_ids) { gchar *package_ids_temp; gchar *transaction_flags_temp; /* check network state */ if (!pk_backend_is_online (backend)) { pk_backend_job_error_code (job, PK_ERROR_ENUM_NO_NETWORK, "Cannot install when offline"); pk_backend_job_finished (job); return; } /* send the complete list as stdin */ package_ids_temp = pk_package_ids_to_string (package_ids); transaction_flags_temp = pk_transaction_flag_bitfield_to_string (transaction_flags); pk_backend_spawn_helper (spawn, job, BACKEND_FILE, "update-packages", transaction_flags_temp, package_ids_temp, NULL); g_free (package_ids_temp); g_free (transaction_flags_temp); }
/** * pk_backend_install_packages: */ void pk_backend_install_packages (PkBackend *backend, PkBackendJob *job, PkBitfield transaction_flags, gchar **package_ids) { gchar *package_ids_temp; gchar *transaction_flags_temp; /* * TODO: portage manage to install when offline * but maybe packagekit implementation will make this forbidden * (because of download funcion dir) * If needed, add something that will check for network _NOW_ (see yum) */ /* send the complete list as stdin */ package_ids_temp = pk_package_ids_to_string (package_ids); transaction_flags_temp = pk_transaction_flag_bitfield_to_string (transaction_flags); pk_backend_spawn_helper (spawn, job, BACKEND_FILE, "install-packages", transaction_flags_temp, package_ids_temp, NULL); g_free(transaction_flags_temp); g_free (package_ids_temp); }
/** * pk_backend_remove_packages: */ void pk_backend_remove_packages (PkBackend *backend, PkBackendJob *job, PkBitfield transaction_flags, gchar **package_ids, gboolean allow_deps, gboolean autoremove) { gchar *package_ids_temp; gchar *transaction_flags_temp; package_ids_temp = pk_package_ids_to_string (package_ids); transaction_flags_temp = pk_transaction_flag_bitfield_to_string (transaction_flags); pk_backend_spawn_helper (priv->spawn, job, "yumBackend.py", "remove-packages", transaction_flags_temp, package_ids_temp, pk_backend_bool_to_string (allow_deps), pk_backend_bool_to_string (autoremove), NULL); g_free (package_ids_temp); g_free (transaction_flags_temp); }
/** * pk_backend_get_categories: */ void pk_backend_get_categories (PkBackend *backend, PkBackendJob *job) { pk_backend_spawn_helper (priv->spawn, job, "yumBackend.py", "get-categories", NULL); }
/** * pk_backend_refresh_cache: */ void pk_backend_refresh_cache (PkBackend *backend, PkBackendJob *job, gboolean force) { pk_backend_spawn_helper (priv->spawn, job, "yumBackend.py", "refresh-cache", pk_backend_bool_to_string (force), NULL); }
/** * pk_backend_refresh_cache: */ void pk_backend_refresh_cache (PkBackend *backend, PkBackendJob *job, gboolean force) { pk_backend_spawn_helper (spawn, job, BACKEND_FILE, "refresh-cache", pk_backend_bool_to_string (force), NULL); }
/** * pk_backend_get_distro_upgrades: */ void pk_backend_get_distro_upgrades (PkBackend *backend, PkBackendJob *job) { pk_backend_spawn_helper (priv->spawn, job, "yumBackend.py", "get-distro-upgrades", NULL); }
/** * pk_backend_update_system: */ void pk_backend_update_system (PkBackend *backend, gboolean only_trusted) { pk_backend_spawn_helper (spawn, BACKEND_FILE, "update-system", pk_backend_bool_to_string (only_trusted), NULL); }
/** * pk_backend_repo_set_data: */ void pk_backend_repo_set_data (PkBackend *backend, const gchar *rid, const gchar *parameter, const gchar *value) { pk_backend_spawn_helper (spawn, BACKEND_FILE, "repo-set-data", rid, parameter, value, NULL); }
/** * pk_backend_get_categories: */ void pk_backend_get_categories (PkBackend *backend, PkBackendJob *job) { pk_backend_spawn_helper (spawn, job, BACKEND_FILE, "get-categories", NULL); }
/** * pk_backend_get_categories: */ static void backend_get_categories (PkBackend *backend) { pk_backend_spawn_helper (spawn, BACKEND_FILE, "get-categories", NULL); }
/** * pk_backend_simulate_repair_system: */ void pk_backend_simulate_repair_system (PkBackend *backend) { pk_backend_spawn_helper (spawn, job, BACKEND_FILE, "simulate-repair-system", NULL); }
/** * pk_backend_repair_system: */ void pk_backend_repair_system (PkBackend *backend, PkBackendJob *job, PkBitfield transaction_flags) { pk_backend_spawn_helper (spawn, job, BACKEND_FILE, "repair-system", pk_backend_bool_to_string (only_trusted), NULL); }
/** * backend_get_distro_upgrades: */ void pk_backend_get_distro_upgrades (PkBackend *backend, PkBackendJob *job) { pk_backend_spawn_helper (spawn, job, BACKEND_FILE, "get-distro-upgrades", NULL); }
/** * pk_backend_repo_enable: */ static void backend_repo_enable (PkBackend *backend, const gchar *rid, gboolean enabled) { pk_backend_spawn_helper (spawn, BACKEND_FILE, "repo-enable", rid, pk_backend_bool_to_string (enabled), NULL); }
/** * backend_get_distro_upgrades: */ static void backend_get_distro_upgrades (PkBackend *backend) { pk_backend_spawn_helper (spawn, BACKEND_FILE, "get-distro-upgrades", NULL); }