Overview
Request 1072269 accepted
- Rewrite the script to Python:
* the current script is quite slow and delays libreoffice package
build where we install all packages and then uninstall them
* the script uses linkfile=${file/${datadir}/${libdir}} for replacement
of $datadir prefix with $libdir (if the $file path starts with $datadir;
if not, we end up with an empty string and we execute various shell
scripts with it
* the Python implementation should be more readable
* the Python version runs about 200s faster when it comes to libreoffice
package build (on a recent Ryzen 9 machine)
- Created by marxin
- In state accepted
- Package maintainers: dspinella and mcalabkova
Request History
marxin created request
- Rewrite the script to Python:
* the current script is quite slow and delays libreoffice package
build where we install all packages and then uninstall them
* the script uses linkfile=${file/${datadir}/${libdir}} for replacement
of $datadir prefix with $libdir (if the $file path starts with $datadir;
if not, we end up with an empty string and we execute various shell
scripts with it
* the Python implementation should be more readable
* the Python version runs about 200s faster when it comes to libreoffice
package build (on a recent Ryzen 9 machine)
dspinella accepted request
Thank you! :)
Thank you for your change and improvement. I'll take some time to properly read and review both scripts before accepting.
Sure! If I see correctly, the script is run by the root user, so I don't put various
x.unlink()
andx.rmdir()
..I've just made a script that I verify both scripts do the same: https://gist.github.com/marxin/35c0560c39d4fec0cee230c572090de4
... and one can see the last step takes ~50s right now and 2s with the Python version of the script
This makes the build faster, but more importantly, it makes much installation and uninstallation whenever somebody installs libreoffice.
@dspinella, @mcalabkova: review reminder