[Ocfs2-tools-commits] manish commits r619 - trunk
    svn-commits at oss.oracle.com 
    svn-commits at oss.oracle.com
       
    Thu Jan 27 19:20:04 CST 2005
    
    
  
Author: manish
Date: 2005-01-27 19:20:01 -0600 (Thu, 27 Jan 2005)
New Revision: 619
Modified:
   trunk/rpmarch.guess
Log:
Don't run rpm on things we don't have to
Modified: trunk/rpmarch.guess
===================================================================
--- trunk/rpmarch.guess	2005-01-28 01:14:55 UTC (rev 618)
+++ trunk/rpmarch.guess	2005-01-28 01:20:01 UTC (rev 619)
@@ -3,7 +3,9 @@
 mode="$1"
 srcdir="$2"
 
-RPMARCH=
+host_cpu=
+QUERYFILE=
+
 if test -f /etc/redhat-release ; then
   QUERYFILE=/etc/redhat-release
 elif test -f /etc/SuSE-release ; then
@@ -12,7 +14,10 @@
   QUERYFILE=/etc/UnitedLinux-release
 fi
 
-host_cpu="`rpm -qf $QUERYFILE --queryformat \"%{ARCH}\"`"
+if test -n "$QUERYFILE"; then
+  host_cpu="`rpm -qf $QUERYFILE --queryformat \"%{ARCH}\"`"
+fi
+
 if test -z "$host_cpu" -o "$host_cpu" = "noarch" ; then
   host_alias=`$srcdir/config.guess`
   host=`$srcdir/config.sub $host_alias`
    
    
More information about the Ocfs2-tools-commits
mailing list