[gnome-software] Drop ifdefs for PackageKit < 1.0.0
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Drop ifdefs for PackageKit < 1.0.0
- Date: Sun, 24 May 2015 15:35:53 +0000 (UTC)
commit 4735878c7140e152261e8cf4f3780f7403c6c108
Author: Kalev Lember <kalevlember gmail com>
Date: Sun May 24 15:32:07 2015 +0200
Drop ifdefs for PackageKit < 1.0.0
We already have a hard dep on PackageKit 1.0.0; no need to keep those
ifdefs around for any longer.
src/plugins/gs-plugin-packagekit-refine.c | 6 ------
src/plugins/gs-plugin-packagekit-refresh.c | 9 ---------
src/plugins/gs-plugin-packagekit.c | 6 ------
3 files changed, 0 insertions(+), 21 deletions(-)
---
diff --git a/src/plugins/gs-plugin-packagekit-refine.c b/src/plugins/gs-plugin-packagekit-refine.c
index fedfe2f..e979aba 100644
--- a/src/plugins/gs-plugin-packagekit-refine.c
+++ b/src/plugins/gs-plugin-packagekit-refine.c
@@ -208,11 +208,9 @@ gs_plugin_packagekit_resolve_packages_app (GsPlugin *plugin,
gs_app_set_name (app,
GS_APP_QUALITY_LOWEST,
pk_package_get_name (package));
-#if PK_CHECK_VERSION(0,9,1)
gs_app_set_summary (app,
GS_APP_QUALITY_LOWEST,
pk_package_get_summary (package));
-#endif
}
}
}
@@ -478,11 +476,9 @@ gs_plugin_packagekit_refine_details_app (GsPlugin *plugin,
gs_app_set_description (app,
GS_APP_QUALITY_LOWEST,
desc);
-#if PK_CHECK_VERSION(0,9,1)
gs_app_set_summary (app,
GS_APP_QUALITY_LOWEST,
pk_details_get_summary (details));
-#endif
break;
}
}
@@ -618,11 +614,9 @@ gs_plugin_packagekit_get_source_list (GsPlugin *plugin,
array = pk_results_get_repo_detail_array (results);
for (i = 0; i < array->len; i++) {
rd = g_ptr_array_index (array, i);
-#if PK_CHECK_VERSION(0,9,1)
g_hash_table_insert (plugin->priv->sources,
g_strdup (pk_repo_detail_get_id (rd)),
g_strdup (pk_repo_detail_get_description (rd)));
-#endif
}
return TRUE;
}
diff --git a/src/plugins/gs-plugin-packagekit-refresh.c b/src/plugins/gs-plugin-packagekit-refresh.c
index 1a746e2..88877af 100644
--- a/src/plugins/gs-plugin-packagekit-refresh.c
+++ b/src/plugins/gs-plugin-packagekit-refresh.c
@@ -251,18 +251,11 @@ gs_plugin_filename_to_app (GsPlugin *plugin,
/* get details */
files = g_strsplit (filename, "\t", -1);
pk_client_set_cache_age (PK_CLIENT (plugin->priv->task), G_MAXUINT);
-#if PK_CHECK_VERSION(0,9,1)
results = pk_client_get_details_local (PK_CLIENT (plugin->priv->task),
files,
cancellable,
gs_plugin_packagekit_progress_cb, plugin,
error);
-#else
- g_set_error_literal (error,
- GS_PLUGIN_ERROR,
- GS_PLUGIN_ERROR_FAILED,
- "GetDetailsLocal() not supported");
-#endif
if (results == NULL)
return FALSE;
@@ -293,12 +286,10 @@ gs_plugin_filename_to_app (GsPlugin *plugin,
gs_app_set_management_plugin (app, "PackageKit");
gs_app_set_kind (app, GS_APP_KIND_PACKAGE);
gs_app_set_state (app, AS_APP_STATE_AVAILABLE_LOCAL);
-#if PK_CHECK_VERSION(0,9,1)
if (pk_details_get_summary (item))
gs_app_set_name (app, GS_APP_QUALITY_LOWEST,
pk_details_get_summary (item));
else
-#endif
gs_app_set_name (app, GS_APP_QUALITY_LOWEST, split[PK_PACKAGE_ID_NAME]);
gs_app_set_version (app, split[PK_PACKAGE_ID_VERSION]);
gs_app_set_metadata (app, "PackageKit::local-filename", filename);
diff --git a/src/plugins/gs-plugin-packagekit.c b/src/plugins/gs-plugin-packagekit.c
index fe21ba3..e0f0e95 100644
--- a/src/plugins/gs-plugin-packagekit.c
+++ b/src/plugins/gs-plugin-packagekit.c
@@ -222,7 +222,6 @@ gs_plugin_add_sources (GsPlugin *plugin,
return FALSE;
hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
array = pk_results_get_repo_detail_array (results);
-#if PK_CHECK_VERSION(0,9,1)
for (i = 0; i < array->len; i++) {
_cleanup_object_unref_ GsApp *app = NULL;
rd = g_ptr_array_index (array, i);
@@ -242,7 +241,6 @@ gs_plugin_add_sources (GsPlugin *plugin,
g_strdup (id),
(gpointer) app);
}
-#endif
/* get every application on the system and add it as a related package
* if it matches */
@@ -464,7 +462,6 @@ gs_plugin_app_source_remove (GsPlugin *plugin,
GCancellable *cancellable,
GError **error)
{
-#if PK_CHECK_VERSION(0,9,1)
_cleanup_error_free_ GError *error_local = NULL;
_cleanup_object_unref_ PkResults *results = NULL;
@@ -485,9 +482,6 @@ gs_plugin_app_source_remove (GsPlugin *plugin,
cancellable, error);
}
return TRUE;
-#else
- return gs_plugin_app_source_disable (plugin, app, cancellable, error);
-#endif
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]