Prevent race condition in Bookwyrm install script

This commit is contained in:
Reinout Meliesie 2025-03-08 15:43:09 +01:00
parent 7d22990573
commit 07ec1ea383
Signed by: zedfrigg
GPG key ID: 3AFCC06481308BC6

View file

@ -114,12 +114,18 @@ mkDerivation {
for directory in $( cd $package/lib/python3.11/site-packages ; find -mindepth 1 -type d -not -name __pycache__ ) ; do
mkdir -p $out/lib/python3.11/site-packages/$directory &
done
done
wait
for package in $pythonDependencies ; do
for file in $( cd $package/lib/python3.11/site-packages ; find -type f -not -path \*__pycache__\* ) ; do
ln -s $package/lib/python3.11/site-packages/$file $out/lib/python3.11/site-packages/$file &
done
done
wait
# Python packages
cp -r $src/bookwyrm $out/lib/python3.11/site-packages/
@ -149,8 +155,6 @@ mkDerivation {
cp $src/VERSION $out/var/lib/bookwyrm/
wait # Wait for async subprocesses to finish
runHook postInstall
'' ;
}