runit systems will break if using dash as is 15 September 2020, 20:12:00 I use the runit version and I also use dash as my default shell for the minor speed boost. Unfortunately one of the postinstall hook scripts is mislabelled as a shell script despite having bashisms and the system become ubootable for dash/runit users like me:Running post-transaction hooks...(1/2) Detecting init .../usr/share/libalpm/scripts/initswitch-hook: 12: [[: not found/usr/share/libalpm/scripts/initswitch-hook: 14: [[: not found/usr/share/libalpm/scripts/initswitch-hook: 16: [[: not found/usr/share/libalpm/scripts/initswitch-hook: 19: [[: not foundThis happened in an update several months and then again a couple days ago.Replacing the [[ ]] with single brackets or marking the script as /bin/bash would solve the problem. As it is, the script will erroneously think runit systems are openrc systems and will make them unbootable.If anyone else sees this error, you can actually just run pacman -S runit and the runit post-install hooks will fix the issue for you.That's it. I wasn't 100% sure where to open a PR hence a forum post, but that's the fix. I'm sure others have run into this problem.
Re: runit systems will break if using dash as is Reply #1 – 15 September 2020, 22:10:30 Seems reasonable. I'd lean towards marking it as a bash script (every artix linux install has bash after all).
Re: runit systems will break if using dash as is Reply #2 – 15 September 2020, 23:54:59 It's not my decision to make, but just using [ ] would probably be abstractly preferable as a nit-pick. There's not really a reason to invoke bash when posix-compliant shell will do. The [[ ]] aren't actually used for regex matching or any of their added features so there's no harm in replacing them with [ ] and keeping it as a /bin/sh script.Of course it's all immaterial because the any performance gains in allowing the script to use sh rather than bash would be inconsequential, but it's just the principle of the thing.
Re: runit systems will break if using dash as is Reply #3 – 16 September 2020, 01:06:45 Artoo ended up making it [ ] after all. Should be fixed in testing. Thanks for the report!