Package: oprofile
Version: 0.9.2-3
Severity: minor

utils/opcontrol needs a small fix to be used with sh interperter (ash or 
busybox etc)

This has been fixed upstream (cvs) but I attached a patch

I also let the user to overide objdump if needed ,
if you think it is a not so good idea then please ignore this

-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.20-k7-amiloa-rt
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages oprofile depends on:
ii  debconf [debconf-2.0]         1.5.11     Debian configuration management sy
ii  oprofile-common               0.9.2-3    system-wide profiler for Linux sys
ii  oprofile-gui                  0.9.2-3    system-wide profiler for Linux sys

oprofile recommends no packages.

-- no debconf information

*** oprofile-0.9.2-sh.diff
diff -Bur oprofile-0.9.2/utils/opcontrol oprofile-0.9.2-sh/utils/opcontrol
--- oprofile-0.9.2/utils/opcontrol      2007-02-13 19:08:34.000000000 +0100
+++ oprofile-0.9.2-sh/utils/opcontrol   2007-02-13 19:18:26.000000000 +0100
@@ -11,6 +11,7 @@
 # NOTE: This script should be as shell independent as possible
 
 SYSCTL=do_sysctl
+OBJDUMP=${OBJDUMP:=objdump}
 
 # A replacement function for the sysctl (procps package) utility which is
 # missing on some distribution (e.g. slack 7.0). 
@@ -453,10 +454,10 @@
        fi
 
        # start at the start of .text and then continue to the end 
-       range_info=`objdump -h $FILE_IMAGE 2>/dev/null | grep " .text "`
+       range_info=`$OBJDUMP -h $FILE_IMAGE 2>/dev/null | grep " .text "`
        tmp1=`echo $range_info | awk '{print $4}'`      
        tmp_length=`echo $range_info | awk  '{print $3}'`
-       tmp2=`objdump -h $FILE_IMAGE --adjust-vma=0x$tmp_length 2>/dev/null | 
grep " .text " | awk  '{print $4}'`
+       tmp2=`$OBJDUMP -h $FILE_IMAGE --adjust-vma=0x$tmp_length 2>/dev/null | 
grep " .text " | awk  '{print $4}'`
 
        if test -z "$tmp1" -o -z "$tmp2"; then
                echo "The specified file $FILE_IMAGE does not seem to be valid" 
>&2
@@ -485,7 +486,7 @@
        SEPARATE_KERNEL=0
        SEPARATE_THREAD=0
        SEPARATE_CPU=0
-       while (($i < $#)); do
+       while [ "$i" -lt "$#" ]; do
                shift
                case "$1" in
                        lib|library)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to