[byobu] patch for issue with missing ~/.byobu/status leading to crash in byobu-config

Jan Klepek hpejakle at fedoraproject.org
Fri Feb 28 17:50:20 UTC 2014


commit 12d0732136bdebf2884b118caed7e544a30577ca
Author: Jan Klepek <jan.klepek at gmail.com>
Date:   Fri Feb 28 18:51:11 2014 +0100

    patch for issue with missing ~/.byobu/status leading to crash in byobu-config

 byobu-5.73-config_except.patch |   21 +++++++++++++++++++++
 byobu.spec                     |    8 +++++++-
 2 files changed, 28 insertions(+), 1 deletions(-)
---
diff --git a/byobu-5.73-config_except.patch b/byobu-5.73-config_except.patch
new file mode 100644
index 0000000..fac5b0a
--- /dev/null
+++ b/byobu-5.73-config_except.patch
@@ -0,0 +1,21 @@
+--- usr/lib/byobu/include/config.py.old	2014-02-28 18:10:06.262946167 +0100
++++ usr/lib/byobu/include/config.py	2014-02-28 18:30:45.862109401 +0100
+@@ -212,10 +212,16 @@
+ 		status[i[1]] = i[0]
+ 	for key in ["tmux_left", "tmux_right", "screen_upper_left", "screen_upper_right", "screen_lower_left", "screen_lower_right"]:
+ 		if key.startswith(BYOBU_BACKEND):
+-			f = open(path, "r")
++			try:
++				f = open(path, "r")
++		 	except:
++				f = open(SHARE + '/status/status', "r")
+ 			lines = f.readlines()
+ 			f.close()
+-			f = open(path, "w")
++			try:
++				f = open(path, "w")
++			except:
++				f = open(path, "a+")
+ 			for l in lines:
+ 				if l.startswith("%s=" % key):
+ 					val = genstatusstring(key, status)
diff --git a/byobu.spec b/byobu.spec
index 48b8694..d5df46c 100644
--- a/byobu.spec
+++ b/byobu.spec
@@ -6,7 +6,7 @@
 
 Name:		byobu
 Version:	5.73
-Release:	3%{?dist}
+Release:	4%{?dist}
 Summary:	Light-weight, configurable window manager built upon GNU screen
 
 Group:		Applications/System
@@ -23,6 +23,8 @@ Patch1:		byobu-5.73-bash.patch
 Patch2:		byobu-5.73-tmux_date.patch
 # patch for multiple sourcing, https://bugs.launchpad.net/byobu/+bug/1273685
 Patch3:		byobu-5.73-tmuxrc_source.patch
+# patch for crashing byobu-config, https://bugs.launchpad.net/byobu/+bug/1286249
+Patch4:		byobu-5.73-config_except.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch:	noarch
 %if 0%{?rhel}%{?fedora} > 5
@@ -60,6 +62,7 @@ done
 %patch1
 %patch2
 %patch3
+%patch4
 
 # fix path for correct directory in /usr/share
 sed -i "s#DOC = BYOBU_PREFIX + '/share/doc/' + PKG#DOC='%{_pkgdocdir}'#g" usr/lib/byobu/include/config.py
@@ -136,6 +139,9 @@ fi
 %config(noreplace) %{_sysconfdir}/%{name}/*
 
 %changelog
+* Fri Feb 28 2014 Jan Klepek <jan.klepek at, gmail.com> - 5.73-4
+- patch for issue with missing ~/.byobu/status leading to crash in byobu-config
+
 * Thu Feb 27 2014 Jan Klepek <jan.klepek at, gmail.com> - 5.73-3
 - various upstream patches
 


More information about the scm-commits mailing list