Accepting request 1046214 from Printing
- Update to 3.22.10 * drop no-systray-failure-message.patch (fixed upstream) * adapt Use-lsb_release-fallback-code-if-import-distro-fails.patch (code moved to different source file upstream) OBS-URL: https://build.opensuse.org/request/show/1046214 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/hplip?expand=0&rev=147
This commit is contained in:
commit
6cb7d1ca2b
@ -1,6 +1,6 @@
|
|||||||
From 5ff90c0210be6b9b48f5cc269d2450e85a958ec0 Mon Sep 17 00:00:00 2001
|
From ba542439639453148ea804fc4e396534cd99abb9 Mon Sep 17 00:00:00 2001
|
||||||
From: Martin Wilck <mwilck@suse.com>
|
From: Martin Wilck <mwilck@suse.com>
|
||||||
Date: Mon, 16 Mar 2020 14:33:35 +0100
|
Date: Mon, 2 Jan 2023 15:33:07 +0100
|
||||||
Subject: [PATCH] Use lsb_release fallback code if "import distro" fails
|
Subject: [PATCH] Use lsb_release fallback code if "import distro" fails
|
||||||
|
|
||||||
With python 3.8, the standard python "platform" module doesn't
|
With python 3.8, the standard python "platform" module doesn't
|
||||||
@ -10,26 +10,32 @@ module by default. Catch the resulting exception, and use the
|
|||||||
already existing fallback code to determine the distribution
|
already existing fallback code to determine the distribution
|
||||||
using lsb_release.
|
using lsb_release.
|
||||||
---
|
---
|
||||||
base/password.py | 8 ++++++--
|
base/utils.py | 12 ++++++++----
|
||||||
installer/core_install.py | 10 +++++++---
|
1 file changed, 8 insertions(+), 4 deletions(-)
|
||||||
2 files changed, 13 insertions(+), 5 deletions(-)
|
|
||||||
|
diff --git a/base/utils.py b/base/utils.py
|
||||||
|
index 94d5c8c..458ddd8 100644
|
||||||
|
--- a/base/utils.py
|
||||||
|
+++ b/base/utils.py
|
||||||
|
@@ -2519,10 +2519,14 @@ def get_distro_name(passwordObj = None):
|
||||||
|
name = platform.dist()[0].lower()
|
||||||
|
ver = platform.dist()[1]
|
||||||
|
except AttributeError:
|
||||||
|
- import distro
|
||||||
|
- name = distro.linux_distribution()[0].lower()
|
||||||
|
- ver = distro.linux_distribution()[1]
|
||||||
|
- distro_release_name = distro.distro_release_attr('name')
|
||||||
|
+ try:
|
||||||
|
+ import distro
|
||||||
|
+ name = distro.linux_distribution()[0].lower()
|
||||||
|
+ ver = distro.linux_distribution()[1]
|
||||||
|
+ distro_release_name = distro.distro_release_attr('name')
|
||||||
|
+ except (ImportError, AttributeError):
|
||||||
|
+ # Use fallback code below
|
||||||
|
+ pass
|
||||||
|
if not name:
|
||||||
|
found = False
|
||||||
|
log.debug("Not able to detect distro")
|
||||||
|
--
|
||||||
|
2.39.0
|
||||||
|
|
||||||
Index: hplip-3.22.4/installer/core_install.py
|
|
||||||
===================================================================
|
|
||||||
--- hplip-3.22.4.orig/installer/core_install.py
|
|
||||||
+++ hplip-3.22.4/installer/core_install.py
|
|
||||||
@@ -651,6 +651,14 @@ class CoreInstall(object):
|
|
||||||
name = distro.linux_distribution()[0].lower()
|
|
||||||
ver = distro.linux_distribution()[1]
|
|
||||||
distro_release_name = distro.distro_release_attr('name')
|
|
||||||
+ try:
|
|
||||||
+ import distro
|
|
||||||
+ name = distro.linux_distribution()[0].lower()
|
|
||||||
+ ver = distro.linux_distribution()[1]
|
|
||||||
+ distro_release_name = distro.distro_release_attr('name')
|
|
||||||
+ except (ImportError, AttributeError):
|
|
||||||
+ # Use fallback code below
|
|
||||||
+ pass
|
|
||||||
if not name:
|
|
||||||
found = False
|
|
||||||
log.debug("Not able to detect distro")
|
|
||||||
|
3
hplip-3.22.10.tar.gz
Normal file
3
hplip-3.22.10.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:533c3f2f6b53e4163ded4fd81d1f11ae6162a0f6451bd5e62a8382d0c1366624
|
||||||
|
size 29333247
|
6
hplip-3.22.10.tar.gz.asc
Normal file
6
hplip-3.22.10.tar.gz.asc
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
-----BEGIN PGP SIGNATURE-----
|
||||||
|
|
||||||
|
iF0EABECAB0WIQRKui9m29WpWJSRDgZz13DNpZBHuQUCY1qE5wAKCRBz13DNpZBH
|
||||||
|
udspAJ4ySBCmJKGZ/YlOKRo2Z6N0vGniYACfQ9mtdi2GC12Tt1HQRYol+xu6QIw=
|
||||||
|
=XQRp
|
||||||
|
-----END PGP SIGNATURE-----
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:27ed0d492febb0b47c656234820d3ce573b24ff5b62e3bf4b2c47f82868d6bb4
|
|
||||||
size 29331408
|
|
@ -1,6 +0,0 @@
|
|||||||
-----BEGIN PGP SIGNATURE-----
|
|
||||||
|
|
||||||
iF0EABECAB0WIQRKui9m29WpWJSRDgZz13DNpZBHuQUCYrP0iwAKCRBz13DNpZBH
|
|
||||||
uZa8AKDokQhhws3KiMK8hdTZknEmOJty3QCeJfjh9fm7MAbG6IDtKyd+1ju+pvA=
|
|
||||||
=qtZb
|
|
||||||
-----END PGP SIGNATURE-----
|
|
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jan 2 14:08:12 UTC 2023 - Martin Wilck <mwilck@suse.com>
|
||||||
|
|
||||||
|
- Update to 3.22.10
|
||||||
|
* drop no-systray-failure-message.patch (fixed upstream)
|
||||||
|
* adapt Use-lsb_release-fallback-code-if-import-distro-fails.patch
|
||||||
|
(code moved to different source file upstream)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Nov 21 16:13:36 UTC 2022 - Dominique Leuenberger <dimstar@opensuse.org>
|
Mon Nov 21 16:13:36 UTC 2022 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package hplip
|
# spec file for package hplip
|
||||||
#
|
#
|
||||||
# Copyright (c) 2022 SUSE LLC
|
# Copyright (c) 2023 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -24,7 +24,7 @@
|
|||||||
%define pyexe %{_bindir}/python3
|
%define pyexe %{_bindir}/python3
|
||||||
%global use_qt5 1
|
%global use_qt5 1
|
||||||
Name: hplip
|
Name: hplip
|
||||||
Version: 3.22.6
|
Version: 3.22.10
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: HP's Printing, Scanning, and Faxing Software
|
Summary: HP's Printing, Scanning, and Faxing Software
|
||||||
License: BSD-3-Clause AND GPL-2.0-or-later AND MIT
|
License: BSD-3-Clause AND GPL-2.0-or-later AND MIT
|
||||||
@ -62,8 +62,6 @@ Patch107: hplip-udev-rules-in-usr.patch
|
|||||||
# Patch108 add_missing_includes_and_define_GNU_SOURCE.patch adds missing '#include <...>'
|
# Patch108 add_missing_includes_and_define_GNU_SOURCE.patch adds missing '#include <...>'
|
||||||
# and missing '#define _GNU_SOURCE' see https://bugs.launchpad.net/hplip/+bug/1456590
|
# and missing '#define _GNU_SOURCE' see https://bugs.launchpad.net/hplip/+bug/1456590
|
||||||
Patch108: add_missing_includes_and_define_GNU_SOURCE.patch
|
Patch108: add_missing_includes_and_define_GNU_SOURCE.patch
|
||||||
# PATCH-FIX-SUSE: GNOME no longer provides a system tray, so don't warn the user that we can't find it
|
|
||||||
Patch109: no-systray-failure-message.patch
|
|
||||||
Patch110: hpijs-avoid-segfault-in-DJGenericVIP-DJGenericVIP.patch
|
Patch110: hpijs-avoid-segfault-in-DJGenericVIP-DJGenericVIP.patch
|
||||||
Patch112: ui5-systemtray-wait-only-10s-for-system-tray.patch
|
Patch112: ui5-systemtray-wait-only-10s-for-system-tray.patch
|
||||||
# Python3 port: cleanup patches
|
# Python3 port: cleanup patches
|
||||||
@ -319,7 +317,6 @@ This sub-package is only required by developers.
|
|||||||
# Patch108 add_missing_includes_and_define_GNU_SOURCE.patch adds missing '#include <...>'
|
# Patch108 add_missing_includes_and_define_GNU_SOURCE.patch adds missing '#include <...>'
|
||||||
# and missing '#define _GNU_SOURCE' see https://bugs.launchpad.net/hplip/+bug/1456590
|
# and missing '#define _GNU_SOURCE' see https://bugs.launchpad.net/hplip/+bug/1456590
|
||||||
%patch108 -p1 -b .add_missing_includes_and_define_GNU_SOURCE.orig
|
%patch108 -p1 -b .add_missing_includes_and_define_GNU_SOURCE.orig
|
||||||
%patch109 -p1 -b .systemtray.py.orig
|
|
||||||
%patch110 -p1 -b .boo1094141
|
%patch110 -p1 -b .boo1094141
|
||||||
%patch112 -p1
|
%patch112 -p1
|
||||||
%patch300 -p1 -b .pcardext-python3
|
%patch300 -p1 -b .pcardext-python3
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
diff -urp hplip-3.17.9.orig/ui5/systemtray.py hplip-3.17.9/ui5/systemtray.py
|
|
||||||
--- hplip-3.17.9.orig/ui5/systemtray.py 2017-09-19 02:29:18.000000000 -0500
|
|
||||||
+++ hplip-3.17.9/ui5/systemtray.py 2017-10-12 15:39:43.456026353 -0500
|
|
||||||
@@ -848,12 +848,7 @@ def run(read_pipe):
|
|
||||||
i += 1
|
|
||||||
|
|
||||||
if not QSystemTrayIcon.isSystemTrayAvailable():
|
|
||||||
- FailureUI(None,
|
|
||||||
- QApplication.translate("SystemTray",
|
|
||||||
- "<b>No system tray detected on this system.</b><p>Unable to start, exiting.</p>",
|
|
||||||
- None),
|
|
||||||
- QApplication.translate("SystemTray", "HPLIP Status Service",
|
|
||||||
- None))
|
|
||||||
+ exit(0)
|
|
||||||
else:
|
|
||||||
notifier = QSocketNotifier(read_pipe, QSocketNotifier.Read)
|
|
||||||
# QObject.notifier.activated[int].connect(app.notifierActivated)
|
|
Loading…
Reference in New Issue
Block a user