Your message dated Tue, 19 Nov 2019 15:49:42 +0000
with message-id <e1ix5l8-000hbh...@fasolo.debian.org>
and subject line Bug#944993: fixed in gnome-shell-extension-show-ip 8-5
has caused the Debian Bug report #944993,
regarding gnome-shell-extension-show-ip: primary-interface patch broke loading 
the extension
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
944993: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=944993
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: gnome-shell-extension-show-ip
Version: 8-4
Severity: serious
Tags: patch

The primary-interface patch I proposed had a serious issue:

JS ERROR: Extension show...@sgaraud.github.com: ReferenceError: device is not 
defined

I've fixed the issue upstream and in the attached patch.

-- System Information:
Debian Release: bullseye/sid
  APT prefers testing-debug
  APT policy: (900, 'testing-debug'), (900, 'testing'), (800, 
'unstable-debug'), (800, 'unstable'), (790, 'buildd-unstable'), (700, 
'experimental-debug'), (700, 'experimental'), (690, 'buildd-experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.3.0-2-amd64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_FIRMWARE_WORKAROUND, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8), LANGUAGE=en_AU:en 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages gnome-shell-extension-show-ip depends on:
ii  gnome-shell  3.34.1+git20191024-1

gnome-shell-extension-show-ip recommends no packages.

gnome-shell-extension-show-ip suggests no packages.

-- no debconf information

-- 
bye,
pabs

https://wiki.debian.org/PaulWise
From 626ff48b7e29cf4178a2f439b85340e7b1e25774 Mon Sep 17 00:00:00 2001
From: Paul Wise <pa...@bonedaddy.net>
Date: Thu, 2 Mar 2017 18:07:14 +0800
Subject: [PATCH] Show the primary IP address when no interface was chosen

Makes it easier to see all IP addresses at a glance.

Uses NM to get which interface(s) are in the default route.
---
 README.md    |  1 +
 extension.js | 53 +++++++++++++++++++++++++++++++++++++++++-----------
 2 files changed, 43 insertions(+), 11 deletions(-)

diff --git a/README.md b/README.md
index 0fafb7a..eec47e3 100644
--- a/README.md
+++ b/README.md
@@ -83,6 +83,7 @@ issues](https://github.com/sgaraud/gnome-extension-show-ip/issues).
 ### License
 
 Copyright (C) 2015 Sylvain Garaud
+Copyright 2017 Paul Wise
 
     This program is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
diff --git a/extension.js b/extension.js
index d9a7940..5dc7d9a 100644
--- a/extension.js
+++ b/extension.js
@@ -3,6 +3,7 @@
  * https://github.com/sgaraud/gnome-extension-show-ip
  * 
  * Copyright (C) 2015 Sylvain Garaud
+ * Copyright 2017 Paul Wise
  *
  * This file is part of Show-IP GNOME extension.
  * Show IP GNOME extension is free software: you can redistribute it and/or modify
@@ -170,17 +171,30 @@ const IpMenuBase = new Lang.Class({
             }
         });
 
+        this._getPrimaryDevices(this.client);
+        let selectedIp = '';
+        let primaryIp = '';
+        let firstIp = '';
         for (let device of this._devices) {
-            if (device.ifc == this.selectedDevice) {
-                if (Schema.get_boolean("menu")) {
-                    this.label.set_text(_("IP: %s").format(device.ip));
-                } else {
-                    this.label.set_text(device.ip);
-                }
-                break;
+            if (!selectedIp && device.ifc == this.selectedDevice) {
+                selectedIp = device.ip;
+            }
+            if (!primaryIp && device.primary) {
+                primaryIp = device.ip;
+            }
+            if (!firstIp) {
+                firstIp = device.ip;
             }
         }
-        if ('' == this.selectedDevice) {
+        let ip = selectedIp ? selectedIp : primaryIp ? primaryIp : firstIp;
+        if (ip) {
+            if (Schema.get_boolean("menu")) {
+                this.label.set_text(_("IP: %s").format(ip));
+            } else {
+                this.label.set_text(ip);
+            }
+            this.label.set_text(ip);
+        } else {
             this.label.set_text(NOT_CONNECTED);
         }
     },
@@ -207,6 +221,26 @@ const IpMenuBase = new Lang.Class({
         this._createPopupMenu();
     },
 
+    _getPrimaryDevices: function (nmc) {
+        let primary_conn = nmc.get_primary_connection();
+        let primary_devices = primary_conn.get_devices();
+        let primary_ifcs = [];
+        let i = 0;
+        if (primary_devices) {
+            for (let device of primary_devices) {
+                primary_ifcs[i++] = device.get_iface();
+            }
+        }
+        for (let device of this._devices) {
+            device.primary = false;
+            for (let ifc of primary_ifcs) {
+                if (device.ifc == ifc) {
+                    device.primary = true;
+                }
+            }
+        }
+    },
+
     _getNetworkDevices: function (nmc) {
         let _device;
         this.devices = nmc.get_devices();
@@ -290,9 +324,6 @@ const IpMenuBase = new Lang.Class({
                 } else {
                     device.ip = this._decodeIp4(ipadd);
                 }
-                if ('' == this.selectedDevice) {
-                    this.selectedDevice = device.ifc;
-                }
                 break;
             }
         }
-- 
2.24.0

Attachment: signature.asc
Description: This is a digitally signed message part


--- End Message ---
--- Begin Message ---
Source: gnome-shell-extension-show-ip
Source-Version: 8-5

We believe that the bug you reported is fixed in the latest version of
gnome-shell-extension-show-ip, which is due to be installed in the Debian FTP 
archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 944...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Kyle Robbertze <paddatrap...@debian.org> (supplier of updated 
gnome-shell-extension-show-ip package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Tue, 19 Nov 2019 17:17:14 +0200
Source: gnome-shell-extension-show-ip
Architecture: source
Version: 8-5
Distribution: unstable
Urgency: medium
Maintainer: Kyle Robbertze <paddatrap...@debian.org>
Changed-By: Kyle Robbertze <paddatrap...@debian.org>
Closes: 944993
Changes:
 gnome-shell-extension-show-ip (8-5) unstable; urgency=medium
 .
   * Fix loading with primary-interface patch (Closes: #944993)
Checksums-Sha1:
 df30fbb47c47d0fa32c19f355b1f8c74183688fb 2125 
gnome-shell-extension-show-ip_8-5.dsc
 351e671ad97f5e9942393a2669f554a227d7c0f1 5624 
gnome-shell-extension-show-ip_8-5.debian.tar.xz
 9f57aa4dc52748f6cbe568176c46e5fbfe45e91b 5687 
gnome-shell-extension-show-ip_8-5_amd64.buildinfo
Checksums-Sha256:
 5c8aea1932bbb3eb41235e23fcd8cfc1798ede5c740c9f2219408d538e44179c 2125 
gnome-shell-extension-show-ip_8-5.dsc
 7eaa653775acb1d493cba94a0623ecef6007e739e45399ede4db9c2d34e64202 5624 
gnome-shell-extension-show-ip_8-5.debian.tar.xz
 ca01faec0af245dac48eefddb004f2702990cb0d01b632e38f1fc54c77d421c4 5687 
gnome-shell-extension-show-ip_8-5_amd64.buildinfo
Files:
 73057f03121caf1c4bf58c7ccefef532 2125 gnome optional 
gnome-shell-extension-show-ip_8-5.dsc
 091bce7f9aa88ba5d8c5329d448341c3 5624 gnome optional 
gnome-shell-extension-show-ip_8-5.debian.tar.xz
 02c0b5eec7a2b0c2f33b88ad7df7ec42 5687 gnome optional 
gnome-shell-extension-show-ip_8-5_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJMBAEBCgA2FiEElqWPGCu4+bgcXyczhU8Hvggt8U8FAl3UCj4YHHBhZGRhdHJh
cHBlckBkZWJpYW4ub3JnAAoJEIVPB74ILfFPYrMQAMWCRw+kTB19TgvCDVh2cqY8
R3+GC2ofpa+BdmJW8oQD9FIeRJzx8kPwvEsF96I/bJ3mfjUML6v2DU30DxsFhkbm
49Dh9V4Irj6TOPZmn4C5Z/wKQieLOMTNWfdbqmdITGQa9gSLpb1GpE9+8nyIZoc0
jt3ggvAp1cicbzDRsAx7GHaq9wzjZeyw91Lw0FG59y5kdDIXgdllq0WGeIftZbQn
LZYOiKk4U8Oipu3jqU+yYpagAGvnRvD/uVcufwKu/allKz9jCtaitkYVJllr5XBc
LUEhJuTVcdME/KGiEG5ecF7UeMi/EOEylzPOh8w3pP9eAjKWLZXniYkk2v/gDiZa
EqKYwaQM0RKC77WEfvIJcvqia7fuGZFEkv3f594zCCE0CVH77FSCcndk1USx9qwC
odEpOwZ78KeqyKedPovB8/q82V0p700baFAXVYfTEZCXhCH+sF+d4fGMu2QkbJgu
tiQIoVhm/j82uV/H0VqiC0cjvq7LjwPw5y9qxSZzTF+nYbMtfB4o3C2ZooQgNmzG
EDnBENacfKEgcf5qywVaTqyNHuyQfosV9Ui+vOb0smrAjD87e6kLmZKRLWPmqNz8
PX48jhNucmLon0+aCB6gu+svekdJfUm9bpvz1arZn2B2b4vMyqfdSGtNQLf+6n9d
+C27am4afLbPritE3sFq
=eIyG
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to