Don't require python3 for a string replace

This commit is contained in:
Pablo Greco 2019-01-15 06:44:09 -03:00 committed by Laura Abbott
parent 15c042d2f4
commit 6eaa39e231

View File

@ -1225,7 +1225,7 @@ BuildKernel() {
# make sure EXTRAVERSION says what we want it to say # make sure EXTRAVERSION says what we want it to say
# Trim the release if this is a CI build, since KERNELVERSION is limited to 64 characters # Trim the release if this is a CI build, since KERNELVERSION is limited to 64 characters
ShortRel=$(python3 -c "import re; print(re.sub(r'\.pr\.[0-9A-Fa-f]{32}', '', '%{release}'))") ShortRel=$(perl -e "print \"%{release}\" =~ s/\.pr\.[0-9A-Fa-f]{32}//r")
perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -${ShortRel}.%{_target_cpu}${Flav}/" Makefile perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -${ShortRel}.%{_target_cpu}${Flav}/" Makefile
# if pre-rc1 devel kernel, must fix up PATCHLEVEL for our versioning scheme # if pre-rc1 devel kernel, must fix up PATCHLEVEL for our versioning scheme