summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVedant Sule <sulevedant@gmail.com>2025-09-19 21:29:05 +0100
committerSam James <sam@gentoo.org>2025-10-05 04:16:41 +0100
commite7f75a0e3ca3a8c60763df1b679f1a4e220a67ef (patch)
treec5df75a7ce0cb42914d70fe1d0965ebbb421f85f
parent82c18599ef6eb9fffb5cdb8280958859fd9a6975 (diff)
downloadgentoo-e7f75a0e3ca3a8c60763df1b679f1a4e220a67ef.tar.gz
gentoo-e7f75a0e3ca3a8c60763df1b679f1a4e220a67ef.tar.bz2
gentoo-e7f75a0e3ca3a8c60763df1b679f1a4e220a67ef.zip
app-admin/syslog-summary: Change 'string.' calls
An update in Python removed a bunch of functions from the string module, including the 'atoi', 'split', and 'rstrip' functions, which syslog-summary uses, causing it to throw an error. The added patch changes these function calls to the appropriate format which should prevent these errors, and removes the 'string' library from the imports. Closes: https://bugs.gentoo.org/962893 Signed-off-by: Vedant Sule <sulevedant@gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/43796 Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--app-admin/syslog-summary/files/syslog-summary-1.14-fix-string-functions.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/app-admin/syslog-summary/files/syslog-summary-1.14-fix-string-functions.patch b/app-admin/syslog-summary/files/syslog-summary-1.14-fix-string-functions.patch
new file mode 100644
index 000000000000..b83a7a724a45
--- /dev/null
+++ b/app-admin/syslog-summary/files/syslog-summary-1.14-fix-string-functions.patch
@@ -0,0 +1,33 @@
+diff --git a/syslog-summary b/syslog-summary
+index df1d5b4..a4f5aaf 100755
+--- a/syslog-summary
++++ b/syslog-summary
+@@ -39,7 +39,7 @@ from __future__ import print_function
+
+ version = "1.14"
+
+-import sys, re, getopt, string
++import sys, re, getopt
+ from gzip import open as gzopen
+ from hashlib import sha1
+ from optparse import OptionParser
+@@ -97,8 +97,8 @@ def read_states(filename):
+ io_error(e, filename, False)
+ return states
+ for line in f:
+- fields = string.split(line)
+- states[fields[0]] = (string.atoi(fields[1]), fields[2])
++ fields = line.split()
++ states[fields[0]] = (fields[1].atoi(), fields[2])
+ f.close()
+ return states
+
+@@ -125,7 +125,7 @@ def split_date(line):
+ m = pat.match(line)
+ if m:
+ return line[:m.end()], line[m.end():]
+- print("line has bad date", "<" + string.rstrip(line) + ">")
++ print("line has bad date", "<" + line.rstrip() + ">")
+ return None, line
+
+ def is_gzipped(filename):