Hello community,

here is the log from the commit of package blueberry for openSUSE:Factory 
checked in at 2017-12-31 01:13:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/blueberry (Old)
 and      /work/SRC/openSUSE:Factory/.blueberry.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "blueberry"

Sun Dec 31 01:13:18 2017 rev:25 rq:559720 version:1.1.20

Changes:
--------
--- /work/SRC/openSUSE:Factory/blueberry/blueberry.changes      2017-11-27 
22:16:19.943161810 +0100
+++ /work/SRC/openSUSE:Factory/.blueberry.new/blueberry.changes 2017-12-31 
01:13:21.406352266 +0100
@@ -1,0 +2,8 @@
+Sun Dec 24 10:19:44 UTC 2017 - sor.ale...@meowr.ru
+
+- Update to version 1.1.20:
+  * Use a regex instead of the more brittle split implementation
+    (gh#linuxmint/blueberry#45).
+  * Switch to Python3.
+
+-------------------------------------------------------------------

Old:
----
  blueberry-1.1.19.tar.gz

New:
----
  blueberry-1.1.20.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ blueberry.spec ++++++
--- /var/tmp/diff_new_pack.djVlF3/_old  2017-12-31 01:13:22.022146816 +0100
+++ /var/tmp/diff_new_pack.djVlF3/_new  2017-12-31 01:13:22.026145481 +0100
@@ -18,7 +18,7 @@
 
 %define __requires_exclude typelib\\((St)\\)
 Name:           blueberry
-Version:        1.1.19
+Version:        1.1.20
 Release:        0
 Summary:        A configuration tool for Bluetooth
 License:        GPL-3.0+
@@ -29,22 +29,24 @@
 BuildRequires:  fdupes
 BuildRequires:  gobject-introspection-devel
 BuildRequires:  hicolor-icon-theme
-BuildRequires:  python
+BuildRequires:  python3
 Requires:       bluez-tools
-Requires:       dbus-1-python
 Requires:       gnome-bluetooth >= 3.14
-Requires:       python-gobject
-Requires:       python-setproctitle
+Requires:       python3-gobject
+Requires:       python3-setproctitle
 Requires:       rfkill
 Requires:       wmctrl
 Recommends:     %{name}-lang
 BuildArch:      noarch
 %glib2_gsettings_schema_requires
-%if 0%{?suse_version} <= 1320
+%if 0%{?suse_version} > 1320
+Requires:       python3-dbus-python
+%else
 BuildRequires:  update-desktop-files
+Requires:       dbus-1-python3
 %endif
 %if 0%{?suse_version} > 1320 || 0%{?sle_version} >= 120200
-Requires:       python-gobject-Gdk
+Requires:       python3-gobject-Gdk
 %endif
 
 %description

++++++ blueberry-1.1.19.tar.gz -> blueberry-1.1.20.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/blueberry-1.1.19/debian/changelog 
new/blueberry-1.1.20/debian/changelog
--- old/blueberry-1.1.19/debian/changelog       2017-11-24 12:03:08.000000000 
+0100
+++ new/blueberry-1.1.20/debian/changelog       2017-12-18 13:26:20.000000000 
+0100
@@ -1,3 +1,13 @@
+blueberry (1.1.20) sylvia; urgency=medium
+
+  [ Jeremy Fleischman ]
+  * Use a regex instead of the more brittle split implementation. This fixes 
#45.
+
+  [ Clement Lefebvre ]
+  * Fix python shebangs
+
+ -- Clement Lefebvre <r...@linuxmint.com>  Mon, 18 Dec 2017 12:25:48 +0000
+
 blueberry (1.1.19) sylvia; urgency=medium
 
   [ Michael Webster ]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/blueberry-1.1.19/usr/bin/blueberry 
new/blueberry-1.1.20/usr/bin/blueberry
--- old/blueberry-1.1.19/usr/bin/blueberry      2017-11-24 12:03:08.000000000 
+0100
+++ new/blueberry-1.1.20/usr/bin/blueberry      2017-12-18 13:26:20.000000000 
+0100
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import os
 os.system("/usr/lib/blueberry/blueberry.py")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/blueberry-1.1.19/usr/bin/blueberry-tray 
new/blueberry-1.1.20/usr/bin/blueberry-tray
--- old/blueberry-1.1.19/usr/bin/blueberry-tray 2017-11-24 12:03:08.000000000 
+0100
+++ new/blueberry-1.1.20/usr/bin/blueberry-tray 2017-12-18 13:26:20.000000000 
+0100
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import os
 os.system("/usr/lib/blueberry/blueberry-tray.py")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/blueberry-1.1.19/usr/lib/blueberry/rfkillMagic.py 
new/blueberry-1.1.20/usr/lib/blueberry/rfkillMagic.py
--- old/blueberry-1.1.19/usr/lib/blueberry/rfkillMagic.py       2017-11-24 
12:03:08.000000000 +0100
+++ new/blueberry-1.1.20/usr/lib/blueberry/rfkillMagic.py       2017-12-18 
13:26:20.000000000 +0100
@@ -2,6 +2,7 @@
 import thread
 import subprocess
 import os
+import re
 from gi.repository import GObject
 
 RFKILL_CHK = ["/usr/sbin/rfkill", "list", "bluetooth"]
@@ -10,15 +11,6 @@
 
 RFKILL_EVENT_MONITOR = ["/usr/lib/blueberry/safechild", "/usr/sbin/rfkill", 
"event"]
 
-# index of .split() from rfkill event output where lines are:
-#     1426095957.906704: idx 0 type 1 op 0 soft 0 hard 0
-#     1426095957.906769: idx 1 type 2 op 0 soft 1 hard 0
-#     1426096013.465033: idx 1 type 2 op 2 soft 0 hard 0
-
-EVENT_INDEX_DEVICE = 2
-EVENT_INDEX_SOFT_BLOCK = 8
-EVENT_INDEX_HARD_BLOCK = 10
-
 class Interface:
     def __init__(self, output_callback, debug):
         self.enable_debugging = debug
@@ -86,14 +78,32 @@
     def update_state(self, line):
         self.debug("update_state line: %s" % line)
 
-        elements = line.split()
+        '''
+        Assume the output of:
+
+        > /usr/bin/rfkill event
+
+        looks like:
+
+        1426095957.906704: idx 0 type 1 op 0 soft 0 hard 0
+        1426095957.906769: idx 1 type 2 op 0 soft 1 hard 0
+        1426096013.465033: idx 1 type 2 op 2 soft 0 hard 0
+
+        or:
+
+        2017-12-08 11:54:16,972291-0800: idx 0 type 2 op 0 soft 0 hard 0
+        2017-12-08 11:54:16,972431-0800: idx 1 type 1 op 0 soft 0 hard 0
+        2017-12-08 11:54:16,972474-0800: idx 4 type 2 op 0 soft 0 hard 0
+        '''
+
+        match = re.search(r'idx (?P<idx>\d+) type (?P<type>\d+) op (?P<op>\d+) 
soft (?P<soft>\d+) hard (?P<hard>\d+)', line)
 
-        if len(elements) < EVENT_INDEX_HARD_BLOCK:
+        if not match:
             return
 
-        if int(elements[EVENT_INDEX_DEVICE]) == self.adapter_index:
-            self.soft_block = int(elements[EVENT_INDEX_SOFT_BLOCK]) == 1
-            self.hard_block = int(elements[EVENT_INDEX_HARD_BLOCK]) == 1
+        if int(match.group('idx')) == self.adapter_index:
+            self.soft_block = int(match.group('soft')) == 1
+            self.hard_block = int(match.group('hard')) == 1
 
         self.update_ui()
 


Reply via email to