Accepting request 686203 from home:alarrosa:branches:GNOME:Factory

- Add patch submitted upstream to handle an UNKNOWN NM connectivity
  the same as a NONE value. This partly fixes boo#1103678
  (packagekit reports the network as available on a computer
  without network connectivity which makes plasma-pk-update start
  an update check which obviously fails).
  * 0001-Handle-an-UNKNOWN-NetworkManager-connectivity-as-NONE.patch

OBS-URL: https://build.opensuse.org/request/show/686203
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/glib2?expand=0&rev=383
This commit is contained in:
2019-03-19 10:07:07 +00:00
committed by Git OBS Bridge
parent e7d304f214
commit 8d5394939e
3 changed files with 49 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
From 2932a58cd5e968d3f398f00ae9f78688c826606e Mon Sep 17 00:00:00 2001
From: Antonio Larrosa <alarrosa@suse.com>
Date: Tue, 12 Mar 2019 18:35:10 +0100
Subject: [PATCH] Handle an UNKNOWN NetworkManager connectivity as NONE
nm_conn_to_g_conn already handles UNKNOWN like NONE (returning
G_NETWORK_CONNECTIVITY_LOCAL in both cases). So in sync_properties
we should also set new_connectivity to G_NETWORK_CONNECTIVITY_LOCAL
for both NM_CONNECTIVITY_UNKNOWN and NM_CONNECTIVITY_NONE.
This has the added benefit that when NetworkManager returns the network
connectivity is UNKNOWN, we set network_available to FALSE as it should
be. Previously, there were cases in a laptop with no network access,
that g_network_monitor_get_network_available returned true, which was
wrong and is also fixed with this commit.
---
gio/gnetworkmonitornm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gio/gnetworkmonitornm.c b/gio/gnetworkmonitornm.c
index 5bc8c925a..4e2a35e8a 100644
--- a/gio/gnetworkmonitornm.c
+++ b/gio/gnetworkmonitornm.c
@@ -167,7 +167,8 @@ sync_properties (GNetworkMonitorNM *nm,
nm_connectivity = g_variant_get_uint32 (v);
g_variant_unref (v);
- if (nm_connectivity == NM_CONNECTIVITY_NONE)
+ if (nm_connectivity == NM_CONNECTIVITY_UNKNOWN ||
+ nm_connectivity == NM_CONNECTIVITY_NONE)
{
new_network_available = FALSE;
new_network_metered = FALSE;
--
2.21.0

View File

@@ -1,3 +1,13 @@
-------------------------------------------------------------------
Tue Mar 5 16:03:29 UTC 2019 - Antonio Larrosa <alarrosa@suse.com>
- Add patch submitted upstream to handle an UNKNOWN NM connectivity
the same as a NONE value. This partly fixes boo#1103678
(packagekit reports the network as available on a computer
without network connectivity which makes plasma-pk-update start
an update check which obviously fails).
* 0001-Handle-an-UNKNOWN-NetworkManager-connectivity-as-NONE.patch
-------------------------------------------------------------------
Mon Mar 4 21:28:16 UTC 2019 - Bjørn Lie <bjorn.lie@gmail.com>

View File

@@ -47,6 +47,8 @@ Patch2: glib2-suppress-schema-deprecated-path-warning.patch
Patch3: glib2-dbus-socket-path.patch
# PATCH-FIX-OPENSUSE glib2-gdbus-codegen-version.patch olaf@aepfle.de -- Remove version string from files generated by gdbus-codegen
Patch4: glib2-gdbus-codegen-version.patch
# PATCH-FIX-UPSTREAM 0001-Handle-an-UNKNOWN-NetworkManager-connectivity-as-NONE.patch boo#1103678 alarrosa@suse.com -- Fix check for network availability when NM reports it as unknown
Patch5: 0001-Handle-an-UNKNOWN-NetworkManager-connectivity-as-NONE.patch
BuildRequires: docbook-xsl-stylesheets
BuildRequires: fdupes
BuildRequires: gamin-devel
@@ -254,6 +256,7 @@ translation-update-upstream
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
cp -a %{SOURCE1} %{SOURCE2} %{SOURCE5} .
cp -a %{SOURCE4} gnome_defaults.conf
# replace /usr/bin/env shebangs