Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package hplip for openSUSE:Factory checked 
in at 2021-01-15 19:44:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/hplip (Old)
 and      /work/SRC/openSUSE:Factory/.hplip.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "hplip"

Fri Jan 15 19:44:16 2021 rev:136 rq:862275 version:3.20.11

Changes:
--------
--- /work/SRC/openSUSE:Factory/hplip/hplip.changes      2020-12-09 
22:12:18.831121324 +0100
+++ /work/SRC/openSUSE:Factory/.hplip.new.28504/hplip.changes   2021-01-15 
19:44:34.833873808 +0100
@@ -1,0 +2,10 @@
+Fri Jan  8 20:52:43 UTC 2021 - Martin Wilck <mwi...@suse.com>
+
+- Update to 3.20.11 
+
+  * Upstream version update and bug fixes (no new printers)
+  * Fix crash in hp-doctor if python3-qt4 is not installed
+    (bsc#1180724)
+    Added patch: dcheck.py-fix-crash-in-Qt4-version-check.patch
+
+-------------------------------------------------------------------
@@ -4 +14 @@
-- Update to 3.20.9
+- Update to 3.20.9 (jsc#SLE-17024)

Old:
----
  hplip-3.20.9.tar.gz
  hplip-3.20.9.tar.gz.asc

New:
----
  dcheck.py-fix-crash-in-Qt4-version-check.patch
  hplip-3.20.11.tar.gz
  hplip-3.20.11.tar.gz.asc

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

Other differences:
------------------
++++++ hplip.spec ++++++
--- /var/tmp/diff_new_pack.4eV61i/_old  2021-01-15 19:44:35.689875211 +0100
+++ /var/tmp/diff_new_pack.4eV61i/_new  2021-01-15 19:44:35.693875218 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package hplip
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
 %define pyexe %{_bindir}/python3
 %global use_qt5 1
 Name:           hplip
-Version:        3.20.9
+Version:        3.20.11
 Release:        0
 Summary:        HP's Printing, Scanning, and Faxing Software
 License:        BSD-3-Clause AND GPL-2.0-or-later AND MIT
@@ -73,6 +73,8 @@
 Patch304:       hp-sendfax-avoid-crash-if-python-reportlab-is-missin.patch
 # bsc#1166623, hp-toolbox crashes without python3-distro module
 Patch305:       Use-lsb_release-fallback-code-if-import-distro-fails.patch
+# bsc#1180724
+Patch306:       dcheck.py-fix-crash-in-Qt4-version-check.patch
 # PATCH-FIX-SUSE: Remove references to the closed-source ImageProcessor
 Patch400:       hplip-remove-imageprocessor.diff
 # Let a function return NULL instead of nothing
@@ -312,6 +314,7 @@
 %patch303 -p1 -b .photocard_import
 %patch304 -p1
 %patch305 -p1
+%patch306 -p1
 %patch400 -p1
 %patch401 -p1
 %patch402 -p1

++++++ dcheck.py-fix-crash-in-Qt4-version-check.patch ++++++
>From 9a7ed59efcf645256f8a07f4fb71bf0f838e3838 Mon Sep 17 00:00:00 2001
From: Martin Wilck <mwi...@suse.com>
Date: Sat, 9 Jan 2021 01:21:08 +0100
Subject: [PATCH] dcheck.py: fix crash in Qt4 version check

On openSUSE, the "PyQt4" module may be available with no submodules.
I.e. "import PyQt4" succeeds, wheras "from PyQt4 import QtCore" fails.
We don't want to make hplip depend on python3-qt4, as all tools use Qt5.

This leads to the following python backtrace in hp-doctor:

Traceback (most recent call last):
  File "/usr/bin/hp-doctor", line 297, in <module>
    num_errors, num_warns = dep.validate(DEPENDENCY_RUN_AND_COMPILE_TIME, False)
  File "/usr/share/hplip/check.py", line 368, in validate
    self.core.dependencies[dep])
  File "/usr/share/hplip/check.py", line 210, in __update_deps_info
    installed_ver = self.core.version_func[deps_info[6]]()
  File "/usr/share/hplip/installer/dcheck.py", line 304, in get_pyQt4_version
    from PyQt4 import QtCore
ImportError: cannot import name 'QtCore'

Fix it.
---
 installer/dcheck.py | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/installer/dcheck.py b/installer/dcheck.py
index d684c10..6215b4b 100644
--- a/installer/dcheck.py
+++ b/installer/dcheck.py
@@ -300,8 +300,12 @@ def get_pyQt4_version():
     except ImportError:
         ver='-'
     else:
-        from PyQt4 import QtCore
-        ver = QtCore.PYQT_VERSION_STR
+        try:
+            from PyQt4 import QtCore
+        except ImportError:
+            pass
+        else:
+            ver = QtCore.PYQT_VERSION_STR
     return ver
 
 
@@ -314,8 +318,12 @@ def get_pyQt5_version():
     except ImportError:
         ver='-'
     else:
-        from PyQt5 import QtCore
-        ver = QtCore.PYQT_VERSION_STR
+        try:
+            from PyQt5 import QtCore
+        except ImportError:
+            pass
+        else:
+            ver = QtCore.PYQT_VERSION_STR
     return ver
 
 def get_reportlab_version():
-- 
2.29.2


++++++ hplip-3.20.9.tar.gz -> hplip-3.20.11.tar.gz ++++++
/work/SRC/openSUSE:Factory/hplip/hplip-3.20.9.tar.gz 
/work/SRC/openSUSE:Factory/.hplip.new.28504/hplip-3.20.11.tar.gz differ: char 
5, line 1

Reply via email to