[packages/GConf2] - python3 patch from Debian
hawk
hawk at pld-linux.org
Sun Jul 23 15:04:11 CEST 2023
commit a0582b5de8ee13fb804a640859cfde171075a59e
Author: Marcin Krol <hawk at tld-linux.org>
Date: Sun Jul 23 14:16:00 2023 +0200
- python3 patch from Debian
GConf2.spec | 6 +++---
python3.patch | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 59 insertions(+), 3 deletions(-)
---
diff --git a/GConf2.spec b/GConf2.spec
index 08db914..3aba1d8 100644
--- a/GConf2.spec
+++ b/GConf2.spec
@@ -11,7 +11,7 @@ Summary(pt_BR.UTF-8): Sistema de Configuração do GNOME 2
Summary(ru.UTF-8): Система конфигурации GNOME 2
Name: GConf2
Version: 3.2.6
-Release: 7
+Release: 8
License: LGPL v2+
Group: X11/Applications
Source0: http://ftp.gnome.org/pub/GNOME/sources/GConf/3.2/GConf-%{version}.tar.xz
@@ -19,6 +19,7 @@ Source0: http://ftp.gnome.org/pub/GNOME/sources/GConf/3.2/GConf-%{version}.tar.x
Patch0: %{name}-NO_MAJOR_VERSION.patch
Patch1: %{name}-reload.patch
Patch2: workaround-crash.patch
+Patch3: python3.patch
URL: https://projects-old.gnome.org/gconf/
BuildRequires: ORBit2-devel >= 1:2.14.9
BuildRequires: autoconf >= 2.60
@@ -174,8 +175,7 @@ automatycznie skonfigurowane do używania tych adresów.
%patch0 -p1
%patch1 -p1
%patch2 -p1
-
-%{__sed} -i -e '1s,/usr/bin/env python,%{__python},' gsettings/gsettings-schema-convert
+%patch3 -p1
%build
%{?with_apidocs:%{__gtkdocize}}
diff --git a/python3.patch b/python3.patch
new file mode 100644
index 0000000..49afea8
--- /dev/null
+++ b/python3.patch
@@ -0,0 +1,56 @@
+diff -ur GConf-3.2.6.orig/gsettings/gsettings-schema-convert GConf-3.2.6/gsettings/gsettings-schema-convert
+--- GConf-3.2.6.orig/gsettings/gsettings-schema-convert 2012-04-10 01:58:44.000000000 +0200
++++ GConf-3.2.6/gsettings/gsettings-schema-convert 2023-07-23 13:55:53.263588352 +0200
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+ # vim: set ts=4 sw=4 et: coding=UTF-8
+ #
+ # Copyright (c) 2010, Novell, Inc.
+@@ -603,7 +603,7 @@
+ for line in lines:
+ current_line_nb += 1
+ self.parse_line(line)
+- except GSettingsSchemaConvertException, e:
++ except GSettingsSchemaConvertException as e:
+ raise GSettingsSchemaConvertException('%s:%s: %s' % (os.path.basename(self.file), current_line_nb, e))
+
+ return self.root
+@@ -1095,7 +1095,7 @@
+ try:
+ parser = GConfSchemaParser(argfile, options.gettext_domain, options.schema_id, options.keep_underscores)
+ schema_root = parser.parse()
+- except SyntaxError, e:
++ except SyntaxError as e:
+ raise GSettingsSchemaConvertException('\'%s\' does not look like a valid gconf schema file: %s' % (argfile, e))
+ else:
+ # autodetect if file is XML or not
+@@ -1104,7 +1104,7 @@
+ schema_root = parser.parse()
+ if not options.simple and not options.xml:
+ options.simple = True
+- except SyntaxError, e:
++ except SyntaxError as e:
+ parser = SimpleSchemaParser(argfile)
+ schema_root = parser.parse()
+ if not options.simple and not options.xml:
+@@ -1124,16 +1124,16 @@
+ sys.stdout.write(output)
+ else:
+ try:
+- fout = open(options.output, 'w')
++ fout = open(options.output, 'wb')
+ fout.write(output)
+ fout.close()
+- except GSettingsSchemaConvertException, e:
++ except GSettingsSchemaConvertException as e:
+ fout.close()
+ if os.path.exists(options.output):
+ os.unlink(options.output)
+ raise e
+
+- except GSettingsSchemaConvertException, e:
++ except GSettingsSchemaConvertException as e:
+ print >> sys.stderr, '%s' % e
+ return 1
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/GConf2.git/commitdiff/a0582b5de8ee13fb804a640859cfde171075a59e
More information about the pld-cvs-commit
mailing list