From 0ac286071b65bb451525d650857652f546a777f6 Mon Sep 17 00:00:00 2001 From: rwx403335 Date: Wed, 16 Feb 2022 11:46:19 +0800 Subject: [PATCH] bugfix on finding python3.x dir --- rpm.spec | 8 +++++++- still-in-use-of-python-scripts-from-old-version.patch | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/rpm.spec b/rpm.spec index d6c2a6c..c074927 100644 --- a/rpm.spec +++ b/rpm.spec @@ -1,6 +1,6 @@ Name: rpm Version: 4.17.0 -Release: 1 +Release: 2 Summary: RPM Package Manager License: GPLv2+ URL: http://www.rpm.org/ @@ -295,6 +295,12 @@ make check || (cat tests/rpmtests.log; exit 0) %{_mandir}/man1/gendiff.1* %changelog +* Wed Feb 16 2022 renhongxun - 4.17.0-2 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:bugfix on finding python3.x dir + * Mon Dec 27 2021 renhongxun - 4.17.0-1 - Type:requirement - ID:NA diff --git a/still-in-use-of-python-scripts-from-old-version.patch b/still-in-use-of-python-scripts-from-old-version.patch index d9fee0b..50fdb6f 100644 --- a/still-in-use-of-python-scripts-from-old-version.patch +++ b/still-in-use-of-python-scripts-from-old-version.patch @@ -122,7 +122,7 @@ index 0000000..d9c4832 +# and below /usr/lib/python3.1/, we're targeting /usr/bin/python3.1 + +shopt -s nullglob -+for python_libdir in `find "$RPM_BUILD_ROOT" -type d|grep -E "/usr/lib(64)?/python[0-9]\.[0-9]$"`; ++for python_libdir in `find "$RPM_BUILD_ROOT" -type d|grep -E "/usr/lib(64)?/python[0-9]\.([0-9]$|[0-9]{2}$)"`; +do + python_binary=/usr/bin/$(basename $python_libdir) + real_libdir=${python_libdir/$RPM_BUILD_ROOT/}