From 7997929f757ff3a31e39b856f5771de36bea06a4 Mon Sep 17 00:00:00 2001 From: Jiri Skala Date: Feb 23 2011 08:25:06 +0000 Subject: fixes #679022 - bltk_plot is broken fixes paths in bltk_get_hd_rpm --- diff --git a/bltk-1.0.9-plot-path.patch b/bltk-1.0.9-plot-path.patch new file mode 100644 index 0000000..41b3b47 --- /dev/null +++ b/bltk-1.0.9-plot-path.patch @@ -0,0 +1,30 @@ +diff -up bltk-1.0.9/tools/analyzer/bltk_plot.sh.plot-path bltk-1.0.9/tools/analyzer/bltk_plot.sh +--- bltk-1.0.9/tools/analyzer/bltk_plot.sh.plot-path 2011-02-23 09:12:31.497394001 +0100 ++++ bltk-1.0.9/tools/analyzer/bltk_plot.sh 2011-02-23 09:22:48.063394001 +0100 +@@ -78,7 +78,7 @@ set_bltk_paths() + return $RETCODE + } + +-set_bltk_root ++set_bltk_paths + + BLTK_GET_STAT_CMD=$BLTK_BIN/bltk_get_stat + BLTK_CALC_CMD=$BLTK_BIN/bltk_calc +@@ -88,7 +88,7 @@ BLTK_PLOT_TMP=$BLTK_TMP/bltk_plot.$$ + ARGS_FILE=$BLTK_PLOT_TMP/bltk_plot.cmd + ARGS_FILE_SAVED=$BLTK_PLOT_TMP/bltk_plot.cmd.saved + +-OPTIONS="hDd:f:swx:yX:Y:t:o:12:vp:nR" ++OPTIONS="hDd:f:swx:y:X:Y:t:o:12:vp:nR" + + command_line() + { +@@ -637,7 +637,7 @@ startup() + { + CMD="type -p gnuplot" + $CMD >/dev/null 2>&1 +- [[ $? != 0 ]] && error "$CMD failed, cannot accces gnuplot program" ++ [[ $? != 0 ]] && error "$CMD failed, cannot access gnuplot program" + + CMD="rm -rf $BLTK_PLOT_TMP" + $CMD diff --git a/bltk-1.0.9-rpm.patch b/bltk-1.0.9-rpm.patch new file mode 100644 index 0000000..c705318 --- /dev/null +++ b/bltk-1.0.9-rpm.patch @@ -0,0 +1,47 @@ +diff -up bltk/tools/analyzer/bltk_get_hd_rpm.sh.rpm bltk/tools/analyzer/bltk_get_hd_rpm.sh +--- bltk/tools/analyzer/bltk_get_hd_rpm.sh.rpm 2010-01-07 19:21:38.000000000 +0100 ++++ bltk/tools/analyzer/bltk_get_hd_rpm.sh 2010-10-25 09:27:38.070983166 +0200 +@@ -46,25 +46,29 @@ model="$*" + + set_bltk_root() + { +- PROG=`basename $0` ++ BLTK_BIN=`which bltk 2> /dev/null` ++ RETCODE=$? + +- BLTK_ROOT=`dirname $0` +- if [[ ! -a $BLTK_ROOT/.bltk ]] +- then +- BLTK_ROOT=`dirname $BLTK_ROOT` +- if [[ ! -a $BLTK_ROOT/.bltk ]] +- then +- echo "Cannot determine bltk root, bltk tree corrupted." +- exit 2 +- fi +- fi +- export BLTK_ROOT +- export BLTK_BIN=$BLTK_ROOT/bin +- export BLTK_TMP=$BLTK_ROOT/tmp ++ if [[ $RETCODE = 0 ]] ++ then ++ if [[ -L $BLTK_BIN ]] ++ then ++ BLTK_BIN=`readlink -f $BLTK_BIN` ++ fi ++ BLTK_ROOT=${BLTK_BIN%/bin/*} ++ export BLTK_ROOT ++ fi ++ ++ return $RETCODE + } + + set_bltk_root + ++if [[ $? -ne 0 ]]; then ++ echo "Cannot determine bltk root, bltk tree corrupted." ++ exit 2 ++fi ++ + RPM_FILE=$BLTK_ROOT/data/hd_rpm.data + + MODEL= diff --git a/bltk.spec b/bltk.spec index 4983790..e2f302c 100644 --- a/bltk.spec +++ b/bltk.spec @@ -1,6 +1,6 @@ Name: bltk Version: 1.0.9 -Release: 10%{?dist} +Release: 11%{?dist} Summary: The BLTK measures notebook battery life under any workload Group: Applications/System @@ -28,12 +28,14 @@ Patch13: bltk-1.0.9-installed.patch Patch15: bltk-1.0.9-xse.patch Patch16: bltk-1.0.9-conf_home.patch Patch17: bltk-1.0.9-rm_sudo.patch +Patch18: bltk-1.0.9-plot-path.patch +Patch19: bltk-1.0.9-rpm.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libX11-devel -Requires: udisks +Requires: udisks gnuplot %description This tool kit is used to measure battery life and performance under @@ -68,6 +70,8 @@ The following workloads are currently implemented: %patch15 -p1 -b .xse %patch16 -p1 -b .conf_home %patch17 -p1 -b .rm_sudo +%patch18 -p1 -b .plot-path +%patch19 -p1 -b .rpm %build export CFLAGS="$RPM_OPT_FLAGS" @@ -230,6 +234,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/bltk/wl_reader/war_and_peace.html %changelog +* Wed Feb 23 2011 Jiri Skala 1.0.9-11 +- fixes #679022 - bltk_plot is broken +- fixes paths in bltk_get_hd_rpm + * Mon Feb 07 2011 Fedora Release Engineering - 1.0.9-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild