[arch-commits] Commit in lxtask/trunk (PKGBUILD fix-priority-change.patch)

Balló György bgyorgy at archlinux.org
Fri Jan 12 22:56:23 UTC 2018


    Date: Friday, January 12, 2018 @ 22:56:17
  Author: bgyorgy
Revision: 281717

upgpkg: lxtask 0.1.8-2

Fix priority change

Added:
  lxtask/trunk/fix-priority-change.patch
Modified:
  lxtask/trunk/PKGBUILD

---------------------------+
 PKGBUILD                  |   14 +++++++++++---
 fix-priority-change.patch |   43 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 54 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-01-12 22:54:59 UTC (rev 281716)
+++ PKGBUILD	2018-01-12 22:56:17 UTC (rev 281717)
@@ -7,7 +7,7 @@
 pkgbase=lxtask
 pkgname=(lxtask lxtask-gtk3)
 pkgver=0.1.8
-pkgrel=1
+pkgrel=2
 pkgdesc='Task manager of the LXDE Desktop'
 arch=('x86_64')
 license=('GPL2')
@@ -14,9 +14,17 @@
 url='https://lxde.org/'
 depends=('gtk2' 'gtk3')
 makedepends=('intltool')
-source=(https://downloads.sourceforge.net/lxde/$pkgbase-$pkgver.tar.xz)
-sha256sums=('dfb443805f72857b5ad711d4bb862a9cd3db0cd2df16d0c24f23ed679b0bef40')
+source=(https://downloads.sourceforge.net/lxde/$pkgbase-$pkgver.tar.xz
+        fix-priority-change.patch)
+sha256sums=('dfb443805f72857b5ad711d4bb862a9cd3db0cd2df16d0c24f23ed679b0bef40'
+            'aa489d9e15f11ee4aab25d13f1b3704f2571072b66d37ff1c02a2e7a957e7348')
 
+prepare() {
+  cd $pkgbase-$pkgver
+  # Fix priority change
+  patch -Np1 -i ../fix-priority-change.patch
+}
+
 build() {
   # GTK+ 2 version
   [ -d gtk2 ] || cp -r $pkgbase-$pkgver gtk2

Added: fix-priority-change.patch
===================================================================
--- fix-priority-change.patch	                        (rev 0)
+++ fix-priority-change.patch	2018-01-12 22:56:17 UTC (rev 281717)
@@ -0,0 +1,43 @@
+From 8274c99b34b0302a7f9c7a2bf33e38e4e61f82b1 Mon Sep 17 00:00:00 2001
+From: Mamoru TASAKA <mtasaka at fedoraproject.org>
+Date: Wed, 3 Jan 2018 21:41:24 +0900
+Subject: [PATCH] Make priority change work
+
+To get pid number from GTK selection, column id must be set to COLUMN_PID.
+Also, to redirect g_spawn_command_line_sync() result to /dev/null using
+shell-style redirect, shell command must be used, otherwise such redirection
+is regarded as command's arguments.
+---
+ src/callbacks.c              | 2 +-
+ src/xfce-taskmanager-linux.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/callbacks.c b/src/callbacks.c
+index dfaff57..315852e 100644
+--- a/src/callbacks.c
++++ b/src/callbacks.c
+@@ -103,7 +103,7 @@ void handle_prio_menu(GtkWidget *widget, gchar *prio)
+ 
+     if(gtk_tree_selection_get_selected(selection, &model, &iter))
+     {
+-        gtk_tree_model_get(model, &iter, 1, &task_id, -1);
++        gtk_tree_model_get(model, &iter, COLUMN_PID, &task_id, -1);
+ 
+         set_priority_to_task(atoi(task_id), atoi(prio));
+         refresh_task_list();
+diff --git a/src/xfce-taskmanager-linux.c b/src/xfce-taskmanager-linux.c
+index 36656fb..dd490c1 100644
+--- a/src/xfce-taskmanager-linux.c
++++ b/src/xfce-taskmanager-linux.c
+@@ -306,7 +306,7 @@ void set_priority_to_task(gint task_id, gint prio)
+     {
+     	int status = 0;
+         gchar command[128] = "";
+-        g_sprintf(command, "renice %d %d > /dev/null", prio, task_id);
++        g_sprintf(command, "sh -c \"renice %d %d > /dev/null\"", prio, task_id);
+ 
+         if( ! g_spawn_command_line_sync(command, NULL, NULL, &status, NULL) ||status )
+             show_error(_("Couldn't set priority %d to the task with ID %d"), prio, task_id);
+-- 
+2.1.4
+



More information about the arch-commits mailing list