patch-tools_Linux_xbmc_sh_in 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. --- xbmc-24032014.orig/tools/Linux/xbmc.sh.in 2014-03-24 15:52:52.000000000 +0100
  2. +++ xbmc-24032014/tools/Linux/xbmc.sh.in 2014-03-27 11:42:33.985822969 +0100
  3. @@ -23,7 +23,7 @@ prefix="@prefix@"
  4. exec_prefix="@exec_prefix@"
  5. datarootdir="@datarootdir@"
  6. LIBDIR="@libdir@"
  7. -CRASHLOG_DIR=${CRASHLOG_DIR:-$HOME}
  8. +CRASHLOG_DIR=/tmp/xbmc
  9. # Check for some options used by this script
  10. while [ "$#" -gt "0" ]
  11. @@ -42,7 +42,7 @@ done
  12. single_stacktrace()
  13. {
  14. # core filename is either "core.$PID" or "core"
  15. - find "$1" -maxdepth $2 -name 'core*' | while read core; do
  16. + find "$1" -name 'core*' | while read core; do
  17. LC_ALL=C gdb --core="$core" --batch 2> /dev/null | grep -q "^Core was generated by \`$LIBDIR/xbmc/xbmc.bin" || continue
  18. echo "=====> Core file: "$core" ($(stat -c%y "$core"))" >> $FILE
  19. echo " =========================================" >> $FILE
  20. @@ -64,33 +64,14 @@ print_crash_report()
  21. uname -m >> $FILE
  22. echo -n " Kernel: " >> $FILE
  23. uname -rvs >> $FILE
  24. - echo -n " Release: " >> $FILE
  25. - if [ -f /etc/os-release ]; then
  26. - . /etc/os-release
  27. - echo $NAME $VERSION >> $FILE
  28. - elif which lsb_release > /dev/null; then
  29. - echo >> $FILE
  30. - lsb_release -a 2> /dev/null | sed -e 's/^/ /' >> $FILE
  31. - else
  32. - echo "lsb_release not available" >> $FILE
  33. - fi
  34. echo "############## END SYSTEM INFO ##############" >> $FILE
  35. echo >> $FILE
  36. echo "############### STACK TRACE #################" >> $FILE
  37. if which gdb >/dev/null 2>&1; then
  38. - if which systemd-coredumpctl &> /dev/null; then
  39. - systemd-coredumpctl dump -o core xbmc.bin &> /dev/null
  40. - fi
  41. - single_stacktrace "$PWD" 1
  42. + single_stacktrace "$PWD"
  43. # Find in plugins directories
  44. - if [ $XBMC_HOME ]; then
  45. - BASEDIR=$XBMC_HOME
  46. - else
  47. - BASEDIR="$LIBDIR/xbmc/"
  48. - fi
  49. - single_stacktrace "$BASEDIR" 5
  50. - # find in user xbmc dir
  51. - single_stacktrace $HOME/.xbmc/ 5
  52. + BASEDIR="$LIBDIR/xbmc/"
  53. + single_stacktrace "$BASEDIR"
  54. else
  55. echo "gdb not installed, can't get stack trace." >> $FILE
  56. fi
  57. @@ -98,9 +79,9 @@ print_crash_report()
  58. echo >> $FILE
  59. echo "################# LOG FILE ##################" >> $FILE
  60. echo >> $FILE
  61. - if [ -f ~/.xbmc/temp/xbmc.log ]
  62. + if [ -f /tmp/xbmc/xbmc.log ]
  63. then
  64. - cat ~/.xbmc/temp/xbmc.log >> $FILE
  65. + cat /tmp/xbmc/xbmc.log >> $FILE
  66. echo >> $FILE
  67. else
  68. echo "Logfile not found in the usual place." >> $FILE
  69. @@ -114,12 +95,6 @@ print_crash_report()
  70. echo "Crash report available at $FILE"
  71. }
  72. -python @datadir@/xbmc/FEH.py $SAVED_ARGS
  73. -RET=$?
  74. -if [ $RET -ne 0 ]; then
  75. - exit $RET
  76. -fi
  77. -
  78. if which gdb >/dev/null 2>&1; then
  79. # Output warning in case ulimit is unsupported by shell
  80. eval ulimit -c unlimited