From 5e3a702d865b87046379e1cfa3f8062e467d9854 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Thu, 8 Sep 2011 11:34:58 -0700 Subject: [PATCH] * usr/lib/byobu/apport: LP: #842113 - fix broken detection of apport bug reports, thanks to lp:~masterpatricko for the suggested fix --- debian/changelog | 3 +++ usr/lib/byobu/apport | 30 +++++++++++++++++------------- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/debian/changelog b/debian/changelog index eaf18b01..8e32aa2d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,9 @@ byobu (4.33) unreleased; urgency=low working metadata service might take several minutes for byobu to start while that wget tries repeatedly to reach the metadata service; big thanks to Ben Howard for helping triage and fix ;-) + * usr/lib/byobu/apport: LP: #842113 + - fix broken detection of apport bug reports, thanks to lp:~masterpatricko + for the suggested fix -- Dustin Kirkland Fri, 26 Aug 2011 19:07:32 -0500 diff --git a/usr/lib/byobu/apport b/usr/lib/byobu/apport index 8d4d82b2..03ed30c4 100755 --- a/usr/lib/byobu/apport +++ b/usr/lib/byobu/apport @@ -20,24 +20,28 @@ # along with this program. If not, see . __apport_detail() { - if ls /var/crash/*.crash >/dev/null 2>&1; then - printf "\nTo file bugs on the existing crash reports, run:\n" - which apport-cli >/dev/null || printf " sudo apt-get install apport\n" - for i in /var/crash/*.crash; do - printf " apport-cli $i\n" - done - printf "\nTo clear the pending reports:\n" - printf " rm -f /var/crash/*.crash\n\n" - else - printf "No pending crash reports\n" - fi + for i in /var/crash/*.crash; do + if [ -f "$i" ]; then + printf "\nTo file bugs on the existing crash reports, run:\n" + which apport-cli >/dev/null || printf " sudo apt-get install apport\n" + for i in /var/crash/*.crash; do + printf " apport-cli $i\n" + done + printf "\nTo clear the pending reports:\n" + printf " rm -f /var/crash/*.crash\n\n" + return + fi + done + printf "No pending crash reports\n" } __apport() { # Print {!} if a /var/crash/*.crash file exists for i in /var/crash/*.crash; do - color y k; printf "{!}"; color -- - return + if [ -f "$i" ]; then + color y k; printf "{!}"; color -- + return + fi done }