!116 bugfix on finding python-3.x dir

From: @renxichen 
Reviewed-by: @overweight 
Signed-off-by: @overweight
This commit is contained in:
openeuler-ci-bot 2022-02-16 06:12:36 +00:00 committed by Gitee
commit 64abcba77b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 8 additions and 2 deletions

View File

@ -1,6 +1,6 @@
Name: rpm Name: rpm
Version: 4.17.0 Version: 4.17.0
Release: 1 Release: 2
Summary: RPM Package Manager Summary: RPM Package Manager
License: GPLv2+ License: GPLv2+
URL: http://www.rpm.org/ URL: http://www.rpm.org/
@ -295,6 +295,12 @@ make check || (cat tests/rpmtests.log; exit 0)
%{_mandir}/man1/gendiff.1* %{_mandir}/man1/gendiff.1*
%changelog %changelog
* Wed Feb 16 2022 renhongxun<renhongxun@h-partners.com> - 4.17.0-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:bugfix on finding python3.x dir
* Mon Dec 27 2021 renhongxun<renhongxun@huawei.com> - 4.17.0-1 * Mon Dec 27 2021 renhongxun<renhongxun@huawei.com> - 4.17.0-1
- Type:requirement - Type:requirement
- ID:NA - ID:NA

View File

@ -122,7 +122,7 @@ index 0000000..d9c4832
+# and below /usr/lib/python3.1/, we're targeting /usr/bin/python3.1 +# and below /usr/lib/python3.1/, we're targeting /usr/bin/python3.1
+ +
+shopt -s nullglob +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 +do
+ python_binary=/usr/bin/$(basename $python_libdir) + python_binary=/usr/bin/$(basename $python_libdir)
+ real_libdir=${python_libdir/$RPM_BUILD_ROOT/} + real_libdir=${python_libdir/$RPM_BUILD_ROOT/}