Sophie

Sophie

distrib > Mageia > 6 > armv7hl > media > core-updates-src > by-pkgid > 79d279be24add26b6cecd45eadbb80ea > files > 43

rpm-4.13.0.2-3.1.mga6.src.rpm

--- ./scripts/script.req	2014-09-10 14:18:23.978949876 +0200
+++ ./scripts/script.req	2014-09-10 14:24:42.450938935 +0200
@@ -29,5 +29,11 @@
 	    :
     else
+	    # "resolve" /bin/env foo interpreter to actual path, rather than generating
+	    # dependencies on coreutils, should trim off ~800 dependencies more
+	    if [[ "$INTERP" == *bin/env ]]; then
+		   arg=`head -n 1 $filename | grep '^#!' | sed -e 's/^\#\![   ]*//' | cut -d" " -f2`
+		   INTERP="`which $arg 2>/dev/null || echo $INTERP`"
+	    fi
 	    echo $INTERP
     fi
     #!/usr/bin/env /foo/bar