[gnome-software] Never fall back to package descriptions of no AppStream metadata



commit e4d9e60cf485a1cd4bbfcf5990c3e99dbe06c3f4
Author: Richard Hughes <richard hughsie com>
Date:   Wed Jan 20 13:37:15 2016 +0000

    Never fall back to package descriptions of no AppStream metadata

 src/gs-plugin.h                           |    1 -
 src/plugins/gs-plugin-appstream.c         |    6 ------
 src/plugins/gs-plugin-packagekit-refine.c |   23 -----------------------
 3 files changed, 0 insertions(+), 30 deletions(-)
---
diff --git a/src/gs-plugin.h b/src/gs-plugin.h
index 126211d..b37fb7f 100644
--- a/src/gs-plugin.h
+++ b/src/gs-plugin.h
@@ -65,7 +65,6 @@ struct GsPlugin {
        gdouble                  priority;      /* largest number gets run first */
        const gchar             **deps;         /* allow-none */
        gboolean                 enabled;
-       gboolean                 use_pkg_descriptions;
        gchar                   *name;
        GsPluginPrivate         *priv;
        guint                    pixbuf_size;
diff --git a/src/plugins/gs-plugin-appstream.c b/src/plugins/gs-plugin-appstream.c
index d34e432..8660488 100644
--- a/src/plugins/gs-plugin-appstream.c
+++ b/src/plugins/gs-plugin-appstream.c
@@ -80,12 +80,6 @@ gs_plugin_initialize (GsPlugin *plugin)
        as_store_set_watch_flags (plugin->priv->store,
                                  AS_STORE_WATCH_FLAG_ADDED |
                                  AS_STORE_WATCH_FLAG_REMOVED);
-
-       /* AppInstall does not ever give us a long description */
-       if (gs_plugin_check_distro_id (plugin, "debian") ||
-           gs_plugin_check_distro_id (plugin, "ubuntu")) {
-               plugin->use_pkg_descriptions = TRUE;
-       }
 }
 
 /**
diff --git a/src/plugins/gs-plugin-packagekit-refine.c b/src/plugins/gs-plugin-packagekit-refine.c
index 142a296..f68cbc3 100644
--- a/src/plugins/gs-plugin-packagekit-refine.c
+++ b/src/plugins/gs-plugin-packagekit-refine.c
@@ -432,19 +432,6 @@ gs_plugin_packagekit_refine_updatedetails (GsPlugin *plugin,
 }
 
 /**
- * gs_pk_format_desc:
- */
-static gchar *
-gs_pk_format_desc (const gchar *text)
-{
-       GString *str;
-       str = g_string_new (text);
-       gs_string_replace (str, "\n", " ");
-       gs_string_replace (str, ".  ", ".\n\n");
-       return g_string_free (str, FALSE);
-}
-
-/**
  * gs_pk_compare_ids:
  *
  * Do not compare the repo. Some backends do not append the origin.
@@ -508,13 +495,6 @@ gs_plugin_packagekit_refine_details_app (GsPlugin *plugin,
                                                pk_details_get_url (details));
                        }
                        size += pk_details_get_size (details);
-                       desc = gs_pk_format_desc (pk_details_get_description (details));
-                       gs_app_set_description (app,
-                                               GS_APP_QUALITY_LOWEST,
-                                               desc);
-                       gs_app_set_summary (app,
-                                           GS_APP_QUALITY_LOWEST,
-                                           pk_details_get_summary (details));
                        break;
                }
        }
@@ -659,9 +639,6 @@ gs_plugin_refine_app_needs_details (GsPlugin *plugin, GsPluginRefineFlags flags,
        if ((flags & GS_PLUGIN_REFINE_FLAGS_REQUIRE_SIZE) > 0 &&
            gs_app_get_size (app) == GS_APP_SIZE_UNKNOWN)
                return TRUE;
-       if ((flags & GS_PLUGIN_REFINE_FLAGS_REQUIRE_DESCRIPTION) > 0 &&
-           gs_app_get_description (app) == NULL && plugin->use_pkg_descriptions)
-               return TRUE;
        return FALSE;
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]