Make ambiguous python shebangs error
See https://fedoraproject.org/wiki/Changes/Make_ambiguous_python_shebangs_error
This commit is contained in:
parent
9278251531
commit
b852a706ad
|
@ -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@')
|
py_shebang=$(echo "$shebang" | sed -r -e 's@/usr/bin/python(\s|$)@/usr/bin/python2\1@')
|
||||||
|
|
||||||
if [ "$shebang" != "$py_shebang" ]; then
|
if [ "$shebang" != "$py_shebang" ]; then
|
||||||
sed -i -e "1c #!$py_shebang" "$f"
|
echo >&2 "*** ERROR: ambiguous python shebang in $path: #!$orig_shebang. Change it to python3 (or python2) explicitly."
|
||||||
echo >&2 "*** WARNING: mangling shebang in $path from #!$orig_shebang to #!$py_shebang. This will become an ERROR, fix it manually!"
|
fail=1
|
||||||
elif [ "#!$shebang" != "#!$orig_shebang" ]; then
|
elif [ "#!$shebang" != "#!$orig_shebang" ]; then
|
||||||
sed -i -e "1c #!$shebang" "$f"
|
sed -i -e "1c #!$shebang" "$f"
|
||||||
echo "mangling shebang in $path from $orig_shebang to #!$shebang"
|
echo "mangling shebang in $path from $orig_shebang to #!$shebang"
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
Summary: Red Hat specific rpm configuration files
|
Summary: Red Hat specific rpm configuration files
|
||||||
Name: redhat-rpm-config
|
Name: redhat-rpm-config
|
||||||
Version: 119
|
Version: 120
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
# No version specified.
|
# No version specified.
|
||||||
License: GPL+
|
License: GPL+
|
||||||
|
@ -183,6 +183,10 @@ install -p -m 755 -t %{buildroot}%{_rpmconfigdir} kmod.prov
|
||||||
%{_rpmconfigdir}/macros.d/macros.kmp
|
%{_rpmconfigdir}/macros.d/macros.kmp
|
||||||
|
|
||||||
%changelog
|
%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
|
* Mon Aug 20 2018 Kalev Lember <klember@redhat.com> - 119-1
|
||||||
- Add aarch64 to ldc arches
|
- Add aarch64 to ldc arches
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue