diff --git a/0001-magnatune-Do-not-check-for-network-connectivity.patch b/0001-magnatune-Do-not-check-for-network-connectivity.patch new file mode 100644 index 0000000..5280733 --- /dev/null +++ b/0001-magnatune-Do-not-check-for-network-connectivity.patch @@ -0,0 +1,67 @@ +From cb432d7e87c661240baf3cba712811f60278678a Mon Sep 17 00:00:00 2001 +From: Victor Toso +Date: Wed, 5 Jun 2013 00:34:02 -0300 +Subject: [PATCH] magnatune: Do not check for network connectivity + +It fixex huge delay resolving dns. + +g_network_monitor_can_reach() is sync and takes up to 30 seconds to +resolve dns with some users. + +Link: https://bugzilla.gnome.org/show_bug.cgi?id=701336 +--- + src/magnatune/grl-magnatune.c | 24 ------------------------ + 1 file changed, 24 deletions(-) + +diff --git a/src/magnatune/grl-magnatune.c b/src/magnatune/grl-magnatune.c +index 3c82d32..bfbcca8 100644 +--- a/src/magnatune/grl-magnatune.c ++++ b/src/magnatune/grl-magnatune.c +@@ -183,8 +183,6 @@ static void grl_magnatune_source_search(GrlSource *source, + static void grl_magnatune_source_browse(GrlSource *source, + GrlSourceBrowseSpec *bs); + +-static gboolean magnatune_has_network_conn(void); +- + static void magnatune_get_db_async(OperationSpec *os); + + /* ================== Magnatune Plugin ================= */ +@@ -201,9 +199,6 @@ grl_magnatune_plugin_init(GrlRegistry *registry, + GRL_DEBUG("magnatune_plugin_init"); + + source = grl_magnatune_source_new(); +- if (source->priv->db == NULL && magnatune_has_network_conn() == FALSE) +- return FALSE; +- + grl_registry_register_source(registry, + plugin, + GRL_SOURCE(source), +@@ -326,25 +321,6 @@ grl_magnatune_source_finalize(GObject *object) + + /* ======================= Utilities ==================== */ + +-static gboolean +-magnatune_has_network_conn(void) +-{ +- gboolean ret = FALSE; +- GNetworkMonitor *nm = NULL; +- GSocketConnectable *addr = NULL; +- GError *err = NULL; +- +- nm = g_network_monitor_get_default(); +- addr = g_network_address_new("www.magnatune.com", 80); +- +- ret = g_network_monitor_can_reach(nm, addr, NULL, &err); +- if (ret == FALSE) +- GRL_WARNING("Plugin can't reach magnatune.com - '%s'", err->message); +- +- g_object_unref(addr); +- return ret; +-} +- + static void + magnatune_get_crc_done(GObject *source_object, + GAsyncResult *res, +-- +1.8.2.1 + diff --git a/grilo-plugins.spec b/grilo-plugins.spec index 736e345..337026f 100644 --- a/grilo-plugins.spec +++ b/grilo-plugins.spec @@ -3,13 +3,15 @@ Name: grilo-plugins Version: 0.2.8 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Plugins for the Grilo framework Group: Applications/Multimedia License: LGPLv2+ Url: https://live.gnome.org/Grilo Source0: http://ftp.gnome.org/pub/GNOME/sources/grilo-plugins/%{release_version}/grilo-plugins-%{version}.tar.xz +# https://bugzilla.redhat.com/show_bug.cgi?id=969123 +Patch0: 0001-magnatune-Do-not-check-for-network-connectivity.patch BuildRequires: grilo-devel >= 0.2.6 BuildRequires: glib2-devel >= 2.26.0 @@ -52,6 +54,7 @@ This package contains plugins to get information from theses sources: %prep %setup -q +%patch0 -p1 -b .dns_lookup %build @@ -98,6 +101,9 @@ rm -f $RPM_BUILD_ROOT%{_bindir}/* %{_libdir}/grilo-%{release_version}/*.xml %changelog +* Thu Jun 06 2013 Kalev Lember - 0.2.8-2 +- Backport a patch to avoid DNS delays at plugin init (#969123) + * Sat May 25 2013 Kalev Lember - 0.2.8-1 - Update to 0.2.8