teknoraver / rpms / rpm

Forked from rpms/rpm 3 months ago
Clone

Blame SOURCES/rpm-4.11.3-brp-python-bytecompile-Fix-when-default-python-is-no.patch

dac7c0
--- rpm-4.11.3/scripts/brp-python-bytecompile.old	2014-02-05 14:04:02.000000000 +0100
dac7c0
+++ rpm-4.11.3/scripts/brp-python-bytecompile	2019-03-25 09:43:06.272804044 +0100
dac7c0
@@ -6,12 +6,6 @@
dac7c0
 	exit 0
dac7c0
 fi
dac7c0
 
dac7c0
-# If we don't have a python interpreter, avoid changing anything.
dac7c0
-default_python=${1:-/usr/bin/python}
dac7c0
-if [ ! -x "$default_python" ]; then
dac7c0
-	exit 0
dac7c0
-fi
dac7c0
-
dac7c0
 # Figure out how deep we need to descend.  We could pick an insanely high
dac7c0
 # number and hope it's enough, but somewhere, somebody's sure to run into it.
dac7c0
 depth=`(find "$RPM_BUILD_ROOT" -type f -name "*.py" -print0 ; echo /) | \
dac7c0
@@ -55,6 +49,11 @@
dac7c0
 	fi
dac7c0
 done
dac7c0
 
dac7c0
+# If we don't have a python interpreter, avoid changing anything.
dac7c0
+default_python=${1:-/usr/bin/python}
dac7c0
+if [ ! -x "$default_python" ]; then
dac7c0
+	exit 0
dac7c0
+fi
dac7c0
 
dac7c0
 # Handle other locations in the filesystem using the default python
dac7c0
 # implementation: