[gnome-software] rpm-ostree: Drop unused debug
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] rpm-ostree: Drop unused debug
- Date: Wed, 24 Jan 2018 21:53:29 +0000 (UTC)
commit 7eabfac5075338a98042366bd61339f443870531
Author: Kalev Lember <klember redhat com>
Date: Wed Jan 24 22:49:11 2018 +0100
rpm-ostree: Drop unused debug
plugins/rpm-ostree/gs-plugin-rpm-ostree.c | 70 -------------------------------
1 file changed, 70 deletions(-)
---
diff --git a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
index 615d23b8..cb3d3d4f 100644
--- a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
+++ b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
@@ -302,74 +302,6 @@ out:
return success;
}
-static gint
-pkg_diff_variant_compare (gconstpointer a,
- gconstpointer b,
- gpointer unused)
-{
- const char *pkg_name_a = NULL;
- const char *pkg_name_b = NULL;
-
- g_variant_get_child ((GVariant *) a, 0, "&s", &pkg_name_a);
- g_variant_get_child ((GVariant *) b, 0, "&s", &pkg_name_b);
-
- return g_strcmp0 (pkg_name_a, pkg_name_b);
-}
-
-static void
-pkg_diff_variant_print (GVariant *variant)
-{
- g_autoptr(GVariant) details = NULL;
- const char *old_name, *old_evr, *old_arch;
- const char *new_name, *new_evr, *new_arch;
- gboolean have_old = FALSE;
- gboolean have_new = FALSE;
-
- details = g_variant_get_child_value (variant, 2);
- g_return_if_fail (details != NULL);
-
- have_old = g_variant_lookup (details,
- "PreviousPackage", "(&s&s&s)",
- &old_name, &old_evr, &old_arch);
-
- have_new = g_variant_lookup (details,
- "NewPackage", "(&s&s&s)",
- &new_name, &new_evr, &new_arch);
-
- if (have_old && have_new) {
- g_print ("!%s-%s-%s\n", old_name, old_evr, old_arch);
- g_print ("=%s-%s-%s\n", new_name, new_evr, new_arch);
- } else if (have_old) {
- g_print ("-%s-%s-%s\n", old_name, old_evr, old_arch);
- } else if (have_new) {
- g_print ("+%s-%s-%s\n", new_name, new_evr, new_arch);
- }
-}
-
-static void
-rpmostree_print_package_diffs (GVariant *variant)
-{
- GQueue queue = G_QUEUE_INIT;
- GVariantIter iter;
- GVariant *child;
-
- /* GVariant format should be a(sua{sv}) */
-
- g_return_if_fail (variant != NULL);
-
- g_variant_iter_init (&iter, variant);
-
- /* Queue takes ownership of the child variant. */
- while ((child = g_variant_iter_next_value (&iter)) != NULL)
- g_queue_insert_sorted (&queue, child, pkg_diff_variant_compare, NULL);
-
- while (!g_queue_is_empty (&queue)) {
- child = g_queue_pop_head (&queue);
- pkg_diff_variant_print (child);
- g_variant_unref (child);
- }
-}
-
static GsApp *
make_app (GVariant *variant)
{
@@ -487,8 +419,6 @@ gs_plugin_add_updates (GsPlugin *plugin,
if (g_variant_n_children (result) == 0)
return TRUE;
- rpmostree_print_package_diffs (result);
-
/* GVariant format should be a(sua{sv}) */
g_variant_iter_init (&iter, result);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]