* usr/lib/byobu/apport: LP: #842113

- fix broken detection of apport bug reports, thanks to lp:~masterpatricko
    for the suggested fix
This commit is contained in:
Dustin Kirkland 2011-09-08 11:34:58 -07:00
commit 5e3a702d86
2 changed files with 20 additions and 13 deletions

3
debian/changelog vendored
View file

@ -11,6 +11,9 @@ byobu (4.33) unreleased; urgency=low
working metadata service might take several minutes for byobu to start working metadata service might take several minutes for byobu to start
while that wget tries repeatedly to reach the metadata service; while that wget tries repeatedly to reach the metadata service;
big thanks to Ben Howard for helping triage and fix ;-) 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 <kirkland@ubuntu.com> Fri, 26 Aug 2011 19:07:32 -0500 -- Dustin Kirkland <kirkland@ubuntu.com> Fri, 26 Aug 2011 19:07:32 -0500

View file

@ -20,7 +20,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
__apport_detail() { __apport_detail() {
if ls /var/crash/*.crash >/dev/null 2>&1; then for i in /var/crash/*.crash; do
if [ -f "$i" ]; then
printf "\nTo file bugs on the existing crash reports, run:\n" printf "\nTo file bugs on the existing crash reports, run:\n"
which apport-cli >/dev/null || printf " sudo apt-get install apport\n" which apport-cli >/dev/null || printf " sudo apt-get install apport\n"
for i in /var/crash/*.crash; do for i in /var/crash/*.crash; do
@ -28,16 +29,19 @@ __apport_detail() {
done done
printf "\nTo clear the pending reports:\n" printf "\nTo clear the pending reports:\n"
printf " rm -f /var/crash/*.crash\n\n" printf " rm -f /var/crash/*.crash\n\n"
else return
printf "No pending crash reports\n"
fi fi
done
printf "No pending crash reports\n"
} }
__apport() { __apport() {
# Print {!} if a /var/crash/*.crash file exists # Print {!} if a /var/crash/*.crash file exists
for i in /var/crash/*.crash; do for i in /var/crash/*.crash; do
if [ -f "$i" ]; then
color y k; printf "{!}"; color -- color y k; printf "{!}"; color --
return return
fi
done done
} }