libmakepkg: Add delay to emptydirs.sh fixing bug...
Fix: Add delay to emptydirs.sh fixing bug https://bugs.archlinux.org/task/53770 you may push these changes Steps to Reproduce:
Make the 'perl-mldbm' package from AUR. Note that despite the '!emptydirs' being included in options, that there are several empty directories under '/usr/lib'. This is because with the default PURGE_TARGETS value, tidy_purge wipes out every file that perl-mldbm places under '/usr/lib' ('.packlist', and '*.pod')
The obvious solution would be to put "NN-" prefixes on the tidy hook filenames, and give emptydirs.sh a high NN.
someone said it would be
Easy fix would be to change /usr/share/makepkg/tidy/emptydirs.sh:
- tidy_remove+=('tidy_emptydirs')
- tidy_modify+=('tidy_emptydirs')
Since modify rules are run after remove rules - emptydirs will run after all remove rules are run.
We can add a comment in code stating that emptydirs is added in modify rules to make sure it runs after all remove rules.
but when i reviewed the above fix , it did not resolve the issue so what i did is to first compile pacman 100 times to get the cause and installing perl-mldbm , it would create an empty folder or file in /usr/lib so according to the bug emptydirs.sh runs too early so i putted a high NN gave it 99 because thats high you cant give it 100 because its always not the greatest number but 9 is. So after that , it did not fix the issue still and i realised i was being dumb , you see the script still runs early , with these fixes i also added a 10 second delay in emptydirs.sh and it fixes the bug when i reinstalled perl-mldbm it did not create any empty files or folders further