From 018ff33bcc559cfd53375123f2373cf9c567e601 Mon Sep 17 00:00:00 2001 From: liyuan Date: Tue, 7 Nov 2023 08:07:57 +0800 Subject: [PATCH] backport Fix writing of advanced settings --- 0008-Fix-writing-of-advanced-settings.patch | 28 +++++++++++++++++++++ system-config-printer.spec | 6 ++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 0008-Fix-writing-of-advanced-settings.patch diff --git a/0008-Fix-writing-of-advanced-settings.patch b/0008-Fix-writing-of-advanced-settings.patch new file mode 100644 index 0000000..cbf8e99 --- /dev/null +++ b/0008-Fix-writing-of-advanced-settings.patch @@ -0,0 +1,28 @@ +From 48acbc87a83a3d1f34f3b2383d42fcf02f7568bd Mon Sep 17 00:00:00 2001 +From: Tomas Korbar +Date: Mon, 14 Jan 2019 16:07:25 +0100 +Subject: [PATCH] Fix writing of advanced settings + +After reading from stream we must return again to line 0 if we +want to read file again +--- + serversettings.py | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/serversettings.py b/serversettings.py +index c98b08b1..72423057 100644 +--- a/serversettings.py ++++ b/serversettings.py +@@ -440,6 +440,9 @@ class ServerSettings(GtkGUI): + has_browsepoll = True + break + ++ # Return to the start of file ++ f.seek(0) ++ + for line in f: + line = line.decode('UTF-8') + l = line.lower ().strip () +-- +2.33.0 + diff --git a/system-config-printer.spec b/system-config-printer.spec index 6244b63..a67f50a 100644 --- a/system-config-printer.spec +++ b/system-config-printer.spec @@ -3,7 +3,7 @@ Name: system-config-printer Summary: a graphical tool for CUPS administration Version: 1.5.11 -Release: 21 +Release: 22 License: GPLv2+ URL: https://github.com/zdohnal/system-config-printer Source0: https://github.com/zdohnal/system-config-printer/archive/%{version}.tar.gz @@ -15,6 +15,7 @@ Patch0004: 0004-Fix-typo-in-debugprint-call.patch Patch0005: 0005-Fix-TypeError-raised-by-debugprint-call.patch Patch0006: 0006-Fix-bad-use-of-NamedTemporaryFile.patch Patch0007: 0007-Fix-bad-call-of-cups-connection-getFile.patch +Patch0008: 0008-Fix-writing-of-advanced-settings.patch BuildRequires: libusb1-devel gcc gettext-devel systemd xmlto systemd-devel python3-devel BuildRequires: intltool cups-devel >= 1.2 desktop-file-utils >= 0.2.92 pkgconfig(glib-2.0) @@ -90,6 +91,9 @@ rm -rf /var/cache/foomatic/foomatic.pickle exit 0 %changelog +* Tue Dec 12 2023 liyuanyuan - 1.5.11-22 +- Fix writing of advanced settings + * Fri Nov 24 2023 liyuanyuan - 1.5.11-21 - Fix bad call of cups connection getFile -- Gitee