public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM]  master: Fixes bz#5802. Additional error handling for fdebugrpm.
@ 2008-02-28 19:12 tthomas
  0 siblings, 0 replies; only message in thread
From: tthomas @ 2008-02-28 19:12 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  41417f3ab9ce44f1f77024b3da0f91a61967a049 (commit)
       via  56b0aa1ac0096acf0d095509e1231a65fb047df1 (commit)
      from  72543106fcd8c66bcbda2fac110ef2d792fd2c44 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 41417f3ab9ce44f1f77024b3da0f91a61967a049
Author: Teresa <tthomas@redhat.com>
Date:   Thu Feb 28 14:01:30 2008 -0500

    Fixes bz#5802. Additional error handling for fdebugrpm.
    
    frysk-core/frysk/bindir/ChangeLog:
    2008-02-28  Teresa Thomas  <tthomas@redhat.com>
    
    	* fdebugrpm.sh: Show error message if fdebuginfo install
    	or arguments missing.

commit 56b0aa1ac0096acf0d095509e1231a65fb047df1
Author: Teresa <tthomas@redhat.com>
Date:   Thu Feb 28 13:55:50 2008 -0500

    Clean up imports.
    
    frysk-core/frysk/testbed/ChangeLog:
    2008-02-28    Teresa Thomas  <tthomas@redhat.com>
    
    	* CorefileFactory.java: Remove redundant import.

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/bindir/ChangeLog             |    5 ++
 frysk-core/frysk/bindir/fdebugrpm.sh          |   62 +++++++++++++++----------
 frysk-core/frysk/testbed/ChangeLog            |    4 ++
 frysk-core/frysk/testbed/CorefileFactory.java |    1 -
 4 files changed, 47 insertions(+), 25 deletions(-)

First 500 lines of diff:
diff --git a/frysk-core/frysk/bindir/ChangeLog b/frysk-core/frysk/bindir/ChangeLog
index 8a4cbe8..c2f4788 100644
--- a/frysk-core/frysk/bindir/ChangeLog
+++ b/frysk-core/frysk/bindir/ChangeLog
@@ -1,3 +1,8 @@
+2008-02-28  Teresa Thomas  <tthomas@redhat.com>
+
+	* fdebugrpm.sh: Show error message if fdebuginfo install 
+	or arguments missing.
+
 2008-02-28  Tim Moore  <timoore@redhat.com>
 
 	* fhpd.java (TerminalObserver): New class
diff --git a/frysk-core/frysk/bindir/fdebugrpm.sh b/frysk-core/frysk/bindir/fdebugrpm.sh
index 38ce411..1c87e3f 100644
--- a/frysk-core/frysk/bindir/fdebugrpm.sh
+++ b/frysk-core/frysk/bindir/fdebugrpm.sh
@@ -42,32 +42,46 @@
 # Requires pid(s) as argument
 
 # Run fdebuginfo and get the name of missing debuginfo packages
-                                                                    
-export packages=`@bindir@/fdebuginfo "$*" | grep "\-\-\-" |   
-                 cut -d ' ' -f 1 | 
-                 sort | uniq | 
-                 grep '^/'| 
-                 xargs rpm -qf --qf '%{SOURCERPM}\n' | 
-                 sort | uniq | 
-                 sed -e 's/-/-debuginfo-/' |
-                 sed -e 's/.src.rpm//g'`
 
-if [ -n "$packages" ] 
+# Display error message if no args provided
+if [ $# -lt 1 ]
 then
-    # Display missing packages
-    echo ""
-    echo "Missing Debuginfo package(s)"
-    echo "============================"
-    echo "$packages"
-    echo ""
+    echo "No arguments provided."
+    exit
+fi
+
+# Check if fdebuginfo is installed.
+if ! test -f "@bindir@/fdebuginfo"
+then
+    echo "fdebugrpm error: Frysk not installed."
+    
+else                                                               
+    export packages=`@bindir@/fdebuginfo $* | grep "\-\-\-" |   
+                     cut -d ' ' -f 1 | 
+                     sort | uniq | 
+                     grep '^/'| 
+                     xargs rpm -qf --qf '%{SOURCERPM}\n' | 
+                     sort | uniq | 
+                     sed -e 's/-/-debuginfo-/' |
+                     sed -e 's/.src.rpm//g'`
 
-    # Install on user request
-    read -p "Do you wish to install the above packages? [y/n]: " ch
-    if [ "$ch" = "y" ]  
+    if [ -n "$packages" ] 
     then
-       sudo yum install --enablerepo=*-debuginfo $packages
-    fi
+        # Display missing packages
+        echo ""
+        echo "Missing Debuginfo package(s)"
+        echo "============================"
+        echo "$packages"
+        echo ""
 
-else
-   echo "No missing debuginfo packages"
-fi
+        # Install on user request
+        read -p "Do you wish to install the above packages? [y/n]: " ch
+        if [ "$ch" = "y" ]  
+        then
+            sudo yum install --enablerepo=*-debuginfo $packages
+        fi
+
+    else
+        echo "No missing debuginfo packages"
+    fi
+fi
\ No newline at end of file
diff --git a/frysk-core/frysk/testbed/ChangeLog b/frysk-core/frysk/testbed/ChangeLog
index acce90b..98d033a 100644
--- a/frysk-core/frysk/testbed/ChangeLog
+++ b/frysk-core/frysk/testbed/ChangeLog
@@ -1,3 +1,7 @@
+2008-02-28    Teresa Thomas  <tthomas@redhat.com>
+
+	* CorefileFactory.java: Remove redundant import.
+
 2008-02-27  Andrew Cagney  <cagney@redhat.com>
 
 	* TestCorefileFactory.java: Use LinuxCoreFactory.
diff --git a/frysk-core/frysk/testbed/CorefileFactory.java b/frysk-core/frysk/testbed/CorefileFactory.java
index a4fd040..369bf5f 100644
--- a/frysk-core/frysk/testbed/CorefileFactory.java
+++ b/frysk-core/frysk/testbed/CorefileFactory.java
@@ -44,7 +44,6 @@ import frysk.event.Event;
 import frysk.proc.Manager;
 import frysk.proc.Proc;
 import frysk.proc.ProcBlockAction;
-import frysk.testbed.CoredumpAction;
 import frysk.Config;
 
 public class CorefileFactory extends TestLib {


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-02-28 19:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-28 19:12 [SCM] master: Fixes bz#5802. Additional error handling for fdebugrpm tthomas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).