From 29b4f1f1a35fbe81a50f8b96752c58eafc2f86a4 Mon Sep 17 00:00:00 2001
From: James Meyer <james.meyer@operamail.com>
Date: Thu, 9 Sep 2010 21:02:19 -0500
Subject: bash: recompile with new gcc/glibc

Signed-off-by: James Meyer <james.meyer@operamail.com>
---
 abs/core-testing/bash/bash-noinfo.patch | 12 -----------
 abs/core-testing/bash/profile           | 35 ---------------------------------
 2 files changed, 47 deletions(-)
 delete mode 100644 abs/core-testing/bash/bash-noinfo.patch
 delete mode 100644 abs/core-testing/bash/profile

diff --git a/abs/core-testing/bash/bash-noinfo.patch b/abs/core-testing/bash/bash-noinfo.patch
deleted file mode 100644
index 856ec80..0000000
--- a/abs/core-testing/bash/bash-noinfo.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur bash-3.0-orig/doc/Makefile.in bash-3.0/doc/Makefile.in
---- bash-3.0-orig/doc/Makefile.in	2004-07-27 05:57:48.000000000 -0700
-+++ bash-3.0/doc/Makefile.in	2005-02-11 22:44:49.000000000 -0800
-@@ -220,7 +220,7 @@
- 		$(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(htmldir) ; \
- 	fi
- 	
--install: info installdirs bash.info
-+install: installdirs
- 	-$(INSTALL_DATA) $(srcdir)/bash.1 $(DESTDIR)$(man1dir)/bash${man1ext}
- 	-$(INSTALL_DATA) $(srcdir)/bashbug.1 $(DESTDIR)$(man1dir)/bashbug${man1ext}
- # uncomment the next line to install the builtins man page
diff --git a/abs/core-testing/bash/profile b/abs/core-testing/bash/profile
deleted file mode 100644
index ca1d402..0000000
--- a/abs/core-testing/bash/profile
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# /etc/profile
-#
-
-export PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/opt/bin"
-
-export MANPATH="/usr/man:/usr/X11R6/man"
-export LESSCHARSET="latin1"
-export INPUTRC="/etc/inputrc"
-export LESS="-R"
-
-export LC_COLLATE="C"
-
-export COLUMNS LINES
-
-export PS1='[\u@\h \W]\$ '
-export PS2='> '
-
-umask 022
-
-if [ "$TERM" = "xterm" -o "$TERM" = "xterm-color" -o "$TERM" = "rxvt" -o "$TERM" = "xterm-xfree86" ]; then
-  PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
-fi
-
-# load profiles from /etc/profile.d
-#  (to disable a profile, just remove execute permission on it)
-if [ `ls -A1 /etc/profile.d/ | wc -l` -gt 0 ]; then
-  for profile in /etc/profile.d/*.sh; do
-    if [ -x $profile ]; then
-      . $profile
-    fi
-  done
-  unset profile
-fi
-# End of file
-- 
cgit v0.12


From 4c251912c6a90b8a1ce6b23db972b8503a785f67 Mon Sep 17 00:00:00 2001
From: Britney Fransen <brfransen@gmail.com>
Date: Fri, 17 Sep 2010 15:34:22 -0500
Subject: linhes-scripts: update removecommercials.sh

---
 abs/core-testing/linhes-scripts/PKGBUILD           |  4 +-
 .../linhes-scripts/removecommercials.sh            | 50 +++++++++++++++-------
 2 files changed, 37 insertions(+), 17 deletions(-)

diff --git a/abs/core-testing/linhes-scripts/PKGBUILD b/abs/core-testing/linhes-scripts/PKGBUILD
index d4bdc50..07ddbc9 100644
--- a/abs/core-testing/linhes-scripts/PKGBUILD
+++ b/abs/core-testing/linhes-scripts/PKGBUILD
@@ -3,7 +3,7 @@
 
 pkgname=linhes-scripts
 pkgver=1
-pkgrel=77
+pkgrel=78
 pkgdesc="Various scripts that help to make LinHES, LinHES."
 arch=('i686' 'x86_64')
 license=('GPL2')
@@ -84,7 +84,7 @@ md5sums=('f56985b2d602e11dc1e10d3e7848b2a5'
          '65629302a4d2c3adf88cdf0ebc10d493'
          '2734054f08c4c885bb9070dce239d4c3'
          '87b0dc855181f98516acb18a7d551601'
-         '25c1baeb97a49656456ae33f7e7a9f06'
+         'c54a3afd4aa3c1af560c9b6adb600f3a'
          '2fb25aef03ffd1282414d8cca3df7056'
          'd2a29444ab9036fb385bbf044daf1ff5'
          'df727c98350a64e2171c950bbefc9c5d'
diff --git a/abs/core-testing/linhes-scripts/removecommercials.sh b/abs/core-testing/linhes-scripts/removecommercials.sh
index 70e2e52..0497dd5 100755
--- a/abs/core-testing/linhes-scripts/removecommercials.sh
+++ b/abs/core-testing/linhes-scripts/removecommercials.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 # remove commercials from recordings using the user generated cutlist or
 # optionally using the mythcommflag generated cutlist.
-# version 0.2  3/24/2010
+# version 0.3  9/1/2010
 
 # usage:
 # first parameter must be %DIR% of the recording
@@ -18,7 +18,13 @@
 #          to generate a cutlist.
 # WARNING: Using this option could result in part of the recording being cut if 
 #          mythcommflag incorrectly flagged the commercial.
-USE_MYTHCOMMFLAG_CUTLIST=NO
+# The USE_MYTHCOMMFLAG_CUTLIST option is saved in ~/.removecommercials.cfg and will
+#          not be overwritten by updates to this script. The ~/.removecommercials.cfg
+#          will be created by this script if it doesn't exist.
+# To enable set USE_MYTHCOMMFLAG_CUTLIST=YES in ~/.removecommercials.cfg
+
+[[ ! -f ~/.removecommercials.cfg ]] && printf "# If no cutlist is found USE_MYTHCOMMFLAG_CUTLIST=YES will use mythcommflag\n#          to generate a cutlist.\n# WARNING: Using this option could result in part of the recording being cut if\n#          mythcommflag incorrectly flagged the commercial.\nUSE_MYTHCOMMFLAG_CUTLIST=NO" > ~/.removecommercials.cfg
+. ~/.removecommercials.cfg
 
 # Auguments passed from command line
 VIDEODIR=$1
@@ -33,7 +39,8 @@ DBUSERNAME=${DBUSERNAME:-"mythtv"}
 DBPASSWORD=${DBPASSWORD:-"mythtv"}
 SQLCMD="mysql -u $DBUSERNAME --password=$DBPASSWORD -h $BACKEND_HOSTNAME mythconverg -e"
 
-LOG="/var/log/mythtv/removecommercials.log"
+LOG="/dev/null"
+#LOG="/var/log/mythtv/removecommercials.log"
 
 #------FUNCTIONS---------------
 update_comment()
@@ -149,18 +156,22 @@ update_status 4
 
 check_myth_jobcmds
 
+echo "" >> $LOG
+date >> $LOG
+$VIDEODIR/$FILENAME >> $LOG
+
 # check for cutlist
 MYTHCOMMFRAMES=`mythcommflag --getcutlist -f $VIDEODIR/$FILENAME | grep 'Cutlist:' | cut -d \  -f 2`
 
 if [ $USE_MYTHCOMMFLAG_CUTLIST=YES ] && [ -z "$MYTHCOMMFRAMES" ]; then
-    echo "Generating cutlist..."
+    echo "Generating cutlist..." >> $LOG
     update_comment "Generating cutlist..."
     /usr/bin/nice -n19 /usr/bin/mythcommflag --gencutlist -f $VIDEODIR/$FILENAME
     MYTHCOMMFRAMES=`mythcommflag --getcutlist -f $VIDEODIR/$FILENAME | grep 'Cutlist:' | cut -d \  -f 2`
 fi
 
 if [ -n "$MYTHCOMMFRAMES" ]; then
-    echo "Removing Commercials..."
+    echo "Removing Commercials..." >> $LOG
     update_comment "Removing Commercials..."
     ( /usr/bin/nice -n19 /usr/bin/mythtranscode -c $CHANID -s $STARTTIME -o $TMPFILE $MPEG --honorcutlist --showprogress > $STATUSFILE 2>&1 ; echo "Done" >> $STATUSFILE ) &
     TPID=$!
@@ -168,46 +179,55 @@ if [ -n "$MYTHCOMMFRAMES" ]; then
     check_background_progress
     ERROR=$?
     if [ $ERROR -ne 0 ]; then
-        echo "Transcoding failed for ${FILENAME} with error $ERROR"
+        echo "Transcoding failed for ${FILENAME} with error $ERROR" >> $LOG
         exit $ERROR
     fi
 
     check_myth_jobcmds
     # move temp file to output location
-    echo "Moving file..."
+    echo "Moving file..." >> $LOG
     update_comment "Moving file..."
     if [ `$SQLCMD "select data from settings where value='SaveTranscoding';" | sed '/[0-9]/!d'` = 1 ]; then
-        echo "DB is set to save transcoding"
+        echo "DB is set to save transcoding" >> $LOG
         mv $VIDEODIR/$FILENAME $VIDEODIR/$FILENAME.old
     fi
     mv $TMPFILE $VIDEODIR/$FILENAME
 
     # file has changed, rebuild index
-    echo "Rebuilding index..."
+    echo "Rebuilding index..." >> $LOG
     update_comment "Rebuilding index..."
     mythcommflag -c $CHANID -s $STARTTIME --rebuild
     ERROR=$?
     if [ $ERROR -ne 0 ]; then
-        echo "Rebuilding seek list failed for ${FILENAME} with error $ERROR"
+        echo "Rebuilding seek list failed for ${FILENAME} with error $ERROR" >> $LOG
         exit $ERROR
     fi
 
     # remove old cutlist
-    echo "Removing old cutlist..."
+    echo "Removing old cutlist..." >> $LOG
     update_comment "Removing old cutlist..."
     mythcommflag -c $CHANID -s $STARTTIME --clearcutlist
     ERROR=$?
     if [ $ERROR -eq 0 ]; then
         # Fix the database entry for the file
-        `$SQLCMD UPDATE recorded SET cutlist = 0, filesize = $(ls -l $VIDEODIR/$FILENAME | awk '{print $5}') WHERE basename = '$FILENAME';` > /dev/null
+        echo "Fixing database entry..." >> $LOG
+        `$SQLCMD "UPDATE recorded SET cutlist = 0, filesize = $(ls -l $VIDEODIR/$FILENAME | awk '{print $5}') WHERE basename = '$FILENAME';"` > /dev/null
     else
-        echo "Clearing cutlist failed for ${FILENAME} with error $ERROR"
+        echo "Clearing cutlist failed for ${FILENAME} with error $ERROR" >> $LOG
+        clean_up_files
+        update_status 272
+        update_comment "Error: Clearing cutlist failed."
         exit $ERROR
     fi
+
+    # clear autoskip list
+    echo "Clearing autoskip list..." >> $LOG
+    `$SQLCMD "DELETE FROM recordedmarkup WHERE CONCAT( chanid, starttime ) IN (SELECT CONCAT( chanid, starttime ) FROM recorded WHERE basename = '$FILENAME');"` > /dev/null
+
     clean_up_files
-    echo "Commercials Removed"
+    echo "Commercials Removed" >> $LOG
     update_status 272
     update_comment "Sucessfully Completed." 
 else
-    echo "No cutlist found."
+    echo "No cutlist found." >> $LOG
 fi
-- 
cgit v0.12