[arch-commits] Commit in sugar-runner/trunk (0001-Python-3-port.patch PKGBUILD)

Balló György bgyorgy at archlinux.org
Sun Mar 15 17:31:49 UTC 2020


    Date: Sunday, March 15, 2020 @ 17:31:49
  Author: bgyorgy
Revision: 598369

upgpkg: sugar-runner 0.110.0-4: Fix python3 port

Modified:
  sugar-runner/trunk/0001-Python-3-port.patch
  sugar-runner/trunk/PKGBUILD

--------------------------+
 0001-Python-3-port.patch |   47 +++++++++++++++++++++++++++++++++++++++------
 PKGBUILD                 |    9 ++++++--
 2 files changed, 48 insertions(+), 8 deletions(-)

Modified: 0001-Python-3-port.patch
===================================================================
--- 0001-Python-3-port.patch	2020-03-15 17:31:28 UTC (rev 598368)
+++ 0001-Python-3-port.patch	2020-03-15 17:31:49 UTC (rev 598369)
@@ -1,17 +1,17 @@
-From aa22afcc5e26f81706a52141cbb064ebc1d2f2f7 Mon Sep 17 00:00:00 2001
+From 2bbb41c38f81f53e5c8d0be7a1847bc0674fd424 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor at gmail.com>
 Date: Mon, 9 Mar 2020 20:06:25 +0100
 Subject: [PATCH] Python 3 port
 
 ---
- scripts/sugar-runner.in | 4 ++--
+ scripts/sugar-runner.in | 6 +++---
  scripts/tweak-xwrapper  | 2 +-
  scripts/xephyr-window   | 4 ++--
- scripts/xinitrc         | 2 +-
- 4 files changed, 6 insertions(+), 6 deletions(-)
+ scripts/xinitrc         | 8 ++++----
+ 4 files changed, 10 insertions(+), 10 deletions(-)
 
 diff --git a/scripts/sugar-runner.in b/scripts/sugar-runner.in
-index f39bdfb..8f3f9e9 100644
+index f39bdfb..9aa83ff 100644
 --- a/scripts/sugar-runner.in
 +++ b/scripts/sugar-runner.in
 @@ -1,4 +1,4 @@
@@ -29,6 +29,15 @@
      tweak_wrapper = os.path.join(helpers_dir, "tweak-xwrapper")
      subprocess.check_call(["sudo", "-k", tweak_wrapper])
  
+@@ -83,7 +83,7 @@ def _run_xephyr_window(resolution):
+ 
+ def _get_tty_number():
+     tty = subprocess.check_output(["tty"])
+-    head, tail = os.path.split(tty)
++    head, tail = os.path.split(tty.decode('ascii'))
+     return tail.strip().replace("tty", "")
+ 
+ 
 diff --git a/scripts/tweak-xwrapper b/scripts/tweak-xwrapper
 index 05f9c6e..87ceec1 100644
 --- a/scripts/tweak-xwrapper
@@ -57,7 +66,7 @@
 +            print(SugarRunner.window_get_xid())
              xid_printed = True
 diff --git a/scripts/xinitrc b/scripts/xinitrc
-index 904822e..1488880 100644
+index 904822e..de75d8f 100644
 --- a/scripts/xinitrc
 +++ b/scripts/xinitrc
 @@ -1,4 +1,4 @@
@@ -66,6 +75,32 @@
  
  # Copyright (C) 2013, Daniel Narvaez
  #
+@@ -48,7 +48,7 @@ def _load_xkb_config():
+     if "SUGAR_RUNNER_XKBCONFIG" not in os.environ:
+         return
+ 
+-    with open(os.environ["SUGAR_RUNNER_XKBCONFIG"]) as f:
++    with open(os.environ["SUGAR_RUNNER_XKBCONFIG"], 'rb') as f:
+         config = f.read()
+ 
+     process = subprocess.Popen(["xkbcomp", "-", os.environ["DISPLAY"]],
+@@ -65,14 +65,14 @@ def _add_output_to_environ(output):
+ 
+ def _start_dbus():
+     output = subprocess.check_output(["dbus-launch", "--exit-with-session"])
+-    _add_output_to_environ(output)
++    _add_output_to_environ(output.decode('ascii'))
+ 
+ 
+ def _start_keyring():
+     output = subprocess.check_output(["gnome-keyring-daemon",
+                                       "--start", "-d",
+                                       "--components=secrets,pkcs11,ssh,gpg"])
+-    _add_output_to_environ(output)
++    _add_output_to_environ(output.decode('ascii'))
+ 
+ 
+ def _setup_xdg_user_dirs():
 -- 
 2.25.1
 

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-03-15 17:31:28 UTC (rev 598368)
+++ PKGBUILD	2020-03-15 17:31:49 UTC (rev 598369)
@@ -2,7 +2,7 @@
 
 pkgname=sugar-runner
 pkgver=0.110.0
-pkgrel=3
+pkgrel=4
 pkgdesc="Scripts to run Sugar"
 arch=('x86_64')
 url="https://sugarlabs.org/"
@@ -12,11 +12,16 @@
 source=(https://download.sugarlabs.org/sources/sucrose/glucose/$pkgname/$pkgname-$pkgver.tar.xz
         0001-Python-3-port.patch)
 sha256sums=('383db309d4444f4758892b57614ace47d7cc395fdf01d1894d3da94354ff6870'
-            '960e7e2606ffcb09c3ae309570768438920613227d3ecaf903b8c8e0e4ae7fa0')
+            'f0969d827b5799d2f86f4e38dd4eae14ec1ee1b31b33ef0bb8c609185cb3eec6')
 
 prepare() {
   cd $pkgname-$pkgver
+
+  # https://github.com/sugarlabs/sugar-runner/pull/5
   patch -Np1 -i ../0001-Python-3-port.patch
+
+  # Fix launch from the application menu
+  echo 'Terminal=true' >>data/sugar-runner.desktop
 }
 
 build() {



More information about the arch-commits mailing list