diff options
-rw-r--r-- | meta-oe/recipes-graphics/openbox/files/0001-openbox-xdg-autostart-convert-to-python3.patch | 138 | ||||
-rw-r--r-- | meta-oe/recipes-graphics/openbox/openbox_3.6.1.bb | 3 |
2 files changed, 140 insertions, 1 deletions
diff --git a/meta-oe/recipes-graphics/openbox/files/0001-openbox-xdg-autostart-convert-to-python3.patch b/meta-oe/recipes-graphics/openbox/files/0001-openbox-xdg-autostart-convert-to-python3.patch new file mode 100644 index 0000000000..5ebeb01692 --- /dev/null +++ b/meta-oe/recipes-graphics/openbox/files/0001-openbox-xdg-autostart-convert-to-python3.patch | |||
@@ -0,0 +1,138 @@ | |||
1 | From b7de9cff2a9578dd92d191241c28437cd6bbb595 Mon Sep 17 00:00:00 2001 | ||
2 | From: Max Krummenacher <max.krummenacher@toradex.com> | ||
3 | Date: Sun, 2 Feb 2020 14:39:21 +0000 | ||
4 | Subject: [PATCH] openbox-xdg-autostart: convert to python3 | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> | ||
9 | --- | ||
10 | data/autostart/openbox-xdg-autostart | 72 ++++++++++++++-------------- | ||
11 | 1 file changed, 36 insertions(+), 36 deletions(-) | ||
12 | |||
13 | diff --git a/data/autostart/openbox-xdg-autostart b/data/autostart/openbox-xdg-autostart | ||
14 | index 04a17a1..52d763f 100755 | ||
15 | --- a/data/autostart/openbox-xdg-autostart | ||
16 | +++ b/data/autostart/openbox-xdg-autostart | ||
17 | @@ -1,4 +1,4 @@ | ||
18 | -#!/usr/bin/env python | ||
19 | +#!/usr/bin/env python3 | ||
20 | |||
21 | # openbox-xdg-autostart runs things based on the XDG autostart specification | ||
22 | # Copyright (C) 2008 Dana Jansens | ||
23 | @@ -28,9 +28,9 @@ try: | ||
24 | from xdg.DesktopEntry import DesktopEntry | ||
25 | from xdg.Exceptions import ParsingError | ||
26 | except ImportError: | ||
27 | |||
28 | - print >>sys.stderr, "ERROR:", ME, "requires PyXDG to be installed" | ||
29 | |||
30 | + print() | ||
31 | + print("ERROR:", ME, "requires PyXDG to be installed", file=sys.stderr) | ||
32 | + print() | ||
33 | sys.exit(1) | ||
34 | |||
35 | def main(argv=sys.argv): | ||
36 | @@ -51,7 +51,7 @@ def main(argv=sys.argv): | ||
37 | try: | ||
38 | autofile = AutostartFile(path) | ||
39 | except ParsingError: | ||
40 | - print "Invalid .desktop file: " + path | ||
41 | + print("Invalid .desktop file: " + path) | ||
42 | else: | ||
43 | if not autofile in files: | ||
44 | files.append(autofile) | ||
45 | @@ -99,9 +99,9 @@ class AutostartFile: | ||
46 | |||
47 | def _alert(self, str, info=False): | ||
48 | if info: | ||
49 | - print "\t ", str | ||
50 | + print("\t ", str) | ||
51 | else: | ||
52 | - print "\t*", str | ||
53 | + print("\t*", str) | ||
54 | |||
55 | def _showInEnvironment(self, envs, verbose=False): | ||
56 | default = not self.de.getOnlyShowIn() | ||
57 | @@ -146,14 +146,14 @@ class AutostartFile: | ||
58 | |||
59 | def display(self, envs): | ||
60 | if self._shouldRun(envs): | ||
61 | - print "[*] " + self.de.getName() | ||
62 | + print("[*] " + self.de.getName()) | ||
63 | else: | ||
64 | - print "[ ] " + self.de.getName() | ||
65 | + print("[ ] " + self.de.getName()) | ||
66 | self._alert("File: " + self.path, info=True) | ||
67 | if self.de.getExec(): | ||
68 | self._alert("Executes: " + self.de.getExec(), info=True) | ||
69 | self._shouldRun(envs, True) | ||
70 | |||
71 | + print() | ||
72 | |||
73 | def run(self, envs): | ||
74 | here = os.getcwd() | ||
75 | @@ -165,34 +165,34 @@ class AutostartFile: | ||
76 | os.chdir(here) | ||
77 | |||
78 | def show_help(): | ||
79 | - print "Usage:", ME, "[OPTION]... [ENVIRONMENT]..." | ||
80 | |||
81 | - print "This tool will run xdg autostart .desktop files" | ||
82 | |||
83 | - print "OPTIONS" | ||
84 | - print " --list Show a list of the files which would be run" | ||
85 | - print " Files which would be run are marked with an asterix" | ||
86 | - print " symbol [*]. For files which would not be run," | ||
87 | - print " information is given for why they are excluded" | ||
88 | - print " --help Show this help and exit" | ||
89 | - print " --version Show version and copyright information" | ||
90 | |||
91 | - print "ENVIRONMENT specifies a list of environments for which to run autostart" | ||
92 | - print "applications. If none are specified, only applications which do not " | ||
93 | - print "limit themselves to certain environments will be run." | ||
94 | |||
95 | - print "ENVIRONMENT can be one or more of:" | ||
96 | - print " GNOME Gnome Desktop" | ||
97 | - print " KDE KDE Desktop" | ||
98 | - print " ROX ROX Desktop" | ||
99 | - print " XFCE XFCE Desktop" | ||
100 | - print " Old Legacy systems" | ||
101 | |||
102 | + print("Usage:", ME, "[OPTION]... [ENVIRONMENT]...") | ||
103 | + print() | ||
104 | + print("This tool will run xdg autostart .desktop files") | ||
105 | + print() | ||
106 | + print("OPTIONS") | ||
107 | + print(" --list Show a list of the files which would be run") | ||
108 | + print(" Files which would be run are marked with an asterix") | ||
109 | + print(" symbol [*]. For files which would not be run,") | ||
110 | + print(" information is given for why they are excluded") | ||
111 | + print(" --help Show this help and exit") | ||
112 | + print(" --version Show version and copyright information") | ||
113 | + print() | ||
114 | + print("ENVIRONMENT specifies a list of environments for which to run autostart") | ||
115 | + print("applications. If none are specified, only applications which do not ") | ||
116 | + print("limit themselves to certain environments will be run.") | ||
117 | + print() | ||
118 | + print("ENVIRONMENT can be one or more of:") | ||
119 | + print(" GNOME Gnome Desktop") | ||
120 | + print(" KDE KDE Desktop") | ||
121 | + print(" ROX ROX Desktop") | ||
122 | + print(" XFCE XFCE Desktop") | ||
123 | + print(" Old Legacy systems") | ||
124 | + print() | ||
125 | |||
126 | def show_version(): | ||
127 | - print ME, VERSION | ||
128 | - print "Copyright (c) 2008 Dana Jansens" | ||
129 | |||
130 | + print(ME, VERSION) | ||
131 | + print("Copyright (c) 2008 Dana Jansens") | ||
132 | + print() | ||
133 | |||
134 | if __name__ == "__main__": | ||
135 | sys.exit(main()) | ||
136 | -- | ||
137 | 2.20.1 | ||
138 | |||
diff --git a/meta-oe/recipes-graphics/openbox/openbox_3.6.1.bb b/meta-oe/recipes-graphics/openbox/openbox_3.6.1.bb index 33f34e4282..e269a264f8 100644 --- a/meta-oe/recipes-graphics/openbox/openbox_3.6.1.bb +++ b/meta-oe/recipes-graphics/openbox/openbox_3.6.1.bb | |||
@@ -7,6 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" | |||
7 | SRC_URI = " \ | 7 | SRC_URI = " \ |
8 | http://icculus.org/openbox/releases/openbox-${PV}.tar.gz \ | 8 | http://icculus.org/openbox/releases/openbox-${PV}.tar.gz \ |
9 | file://0001-Makefile.am-avoid-race-when-creating-autostart-direc.patch \ | 9 | file://0001-Makefile.am-avoid-race-when-creating-autostart-direc.patch \ |
10 | file://0001-openbox-xdg-autostart-convert-to-python3.patch \ | ||
10 | " | 11 | " |
11 | 12 | ||
12 | SRC_URI[md5sum] = "b72794996c6a3ad94634727b95f9d204" | 13 | SRC_URI[md5sum] = "b72794996c6a3ad94634727b95f9d204" |
@@ -54,4 +55,4 @@ FILES_${PN}-gnome += " \ | |||
54 | 55 | ||
55 | FILES_${PN}-config += "${sysconfdir}" | 56 | FILES_${PN}-config += "${sysconfdir}" |
56 | 57 | ||
57 | RDEPENDS_${PN} += "${PN}-core ${PN}-config ${PN}-theme-clearlooks python python-shell pyxdg" | 58 | RDEPENDS_${PN} += "${PN}-core ${PN}-config ${PN}-theme-clearlooks python3 python3-shell pyxdg" |