On 6/29/20 9:10 PM, PGNet Dev wrote: > It's clear that, in this^ example > > reinstall != remove + install > > In the same vein as > > restart == (typically) stop + start > > , shouldn't it? > > If not, what's causing the %preun removal to exec AFTER the %post install? > And, how do I prevent that?
found this https://stackoverflow.com/questions/7398834/rpm-upgrade-uninstalls-the-rpm which led me to try wrapping the '%preun' in a $1 condition %preun + if [[ $1 == 0 ]] then for r in %{rocks_list} do if [[ $( luarocks list --porcelain ${r} | cut -f1 ) == ${r} ]] then echo "##!! Removing rock: ${r}" luarocks remove --force-fast --deps-mode=none ${r} fi done + fi with that^, install remove reinstall all work as intended. specifically, the 'reinstall' stage does NOT install-tnhen-immediately-remove the rocks. tho it appears to work, i'm hoping this '[[ $1 == 0 ]]' conditional is correct/safe usage in the %preun for this case, and not just a lucky workaround. am I missing anything? _______________________________________________ buildsys mailing list -- buildsys@lists.fedoraproject.org To unsubscribe send an email to buildsys-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/buildsys@lists.fedoraproject.org