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