Make ambiguous python shebangs error

See https://fedoraproject.org/wiki/Changes/Make_ambiguous_python_shebangs_error
This commit is contained in:
Miro Hrončok 2018-09-09 22:46:34 +02:00
parent 9278251531
commit b852a706ad
2 changed files with 7 additions and 3 deletions

View File

@ -129,8 +129,8 @@ while IFS= read -r -d $'\0' f; do
py_shebang=$(echo "$shebang" | sed -r -e 's@/usr/bin/python(\s|$)@/usr/bin/python2\1@')
if [ "$shebang" != "$py_shebang" ]; then
sed -i -e "1c #!$py_shebang" "$f"
echo >&2 "*** WARNING: mangling shebang in $path from #!$orig_shebang to #!$py_shebang. This will become an ERROR, fix it manually!"
echo >&2 "*** ERROR: ambiguous python shebang in $path: #!$orig_shebang. Change it to python3 (or python2) explicitly."
fail=1
elif [ "#!$shebang" != "#!$orig_shebang" ]; then
sed -i -e "1c #!$shebang" "$f"
echo "mangling shebang in $path from $orig_shebang to #!$shebang"

View File

@ -6,7 +6,7 @@
Summary: Red Hat specific rpm configuration files
Name: redhat-rpm-config
Version: 119
Version: 120
Release: 1%{?dist}
# No version specified.
License: GPL+
@ -183,6 +183,10 @@ install -p -m 755 -t %{buildroot}%{_rpmconfigdir} kmod.prov
%{_rpmconfigdir}/macros.d/macros.kmp
%changelog
* Mon Sep 10 2018 Miro Hrončok <mhroncok@redhat.com> - 120-1
- Make ambiguous python shebangs error
https://fedoraproject.org/wiki/Changes/Make_ambiguous_python_shebangs_error
* Mon Aug 20 2018 Kalev Lember <klember@redhat.com> - 119-1
- Add aarch64 to ldc arches