]> sourceware.org Git - systemtap.git/commitdiff
RHBZ1312169: make stap-prep fall back to debuginfo-install
authorFrank Ch. Eigler <fche@redhat.com>
Thu, 11 Aug 2016 17:40:55 +0000 (13:40 -0400)
committerFrank Ch. Eigler <fche@redhat.com>
Thu, 11 Aug 2016 17:59:05 +0000 (13:59 -0400)
On some fedora / rhel boxes and their repo selections,
"debuginfo-install" can sometimes fetch the right files
even if "yum install" cannot.

stap-prep

index 5c233bf0dbb00606aaed406c2a589f040ed85d05..ca9adff21fa079bca74dad7005676d92f903a014 100755 (executable)
--- a/stap-prep
+++ b/stap-prep
@@ -26,13 +26,17 @@ KERN_ARCH=`uname -m`
 KERN_REV=`echo $UNAME | sed s/.$KERN_ARCH//` # strip arch from uname
 CANDIDATES="$KERNEL-$KERN_REV.$KERN_ARCH \
   $KERNEL-devel-$KERN_REV.$KERN_ARCH \
+  yum-utils \
   $KERNEL-debuginfo-$KERN_REV.$KERN_ARCH"
 NEEDED=`rpm --qf "%{name}-%{version}-%{release}.%{arch}\n" \
     -q $CANDIDATES | grep "is not installed" | awk '{print $2}'`
 if [ "$NEEDED" != "" ]; then
     echo -e "Need to install the following packages:\n$NEEDED"
     if [ `id -u` = "0" ]; then #attempt to install
-        yum install -y --enablerepo=\* $NEEDED
+        yum install -y --enablerepo=\* $NEEDED ||
+           (if expr "$NEEDED" : ".*debuginfo.*" >/dev/null;
+             then debuginfo-install -y $KERNEL-$KERN_REV.$KERN_ARCH;
+             fi)
         rpm -q $NEEDED
         check_error $? "problem installing rpm(s) $NEEDED"
     fi
This page took 0.028307 seconds and 5 git commands to generate.