Skip to content

Commit 5784f71

Browse files
committed
build.sh/patch_osbuild: dynamically detect python lib dir
Fedora 43 now includes Python 3.14, which broke patch_upload since the python3.13 directory was hard-coded. Dynamically detect the python lib directory to avoid this in the future. https://fedoraproject.org/wiki/Changes/Python3.14
1 parent 120e6a9 commit 5784f71

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

build.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,8 @@ patch_osbuild() {
198198
# To make it easier to apply patches we'll move around the osbuild
199199
# code on the system first:
200200
rmdir /usr/lib/osbuild/osbuild
201-
mv /usr/lib/python3.13/site-packages/osbuild /usr/lib/osbuild/
201+
python_lib_dir=$(ls -d /usr/lib/python*)
202+
mv ${python_lib_dir}/site-packages/osbuild /usr/lib/osbuild/
202203
mkdir -p /usr/lib/osbuild/tools
203204
mv /usr/bin/osbuild-mpp /usr/lib/osbuild/tools/
204205

@@ -214,7 +215,7 @@ patch_osbuild() {
214215
# And then move the files back; supermin appliance creation will need it back
215216
# in the places delivered by the RPM.
216217
mv /usr/lib/osbuild/tools/osbuild-mpp /usr/bin/osbuild-mpp
217-
mv /usr/lib/osbuild/osbuild /usr/lib/python3.13/site-packages/osbuild
218+
mv /usr/lib/osbuild/osbuild ${python_lib_dir}/site-packages/osbuild
218219
mkdir -p /usr/lib/osbuild/osbuild
219220
}
220221

0 commit comments

Comments
 (0)