You are not logged in.
Hello,
https://wiki.archlinux.org/title/Dash i follow this, and make dash the symlink to /bin/sh rather than bash.
The problem is that pacman -R dash let me unsintall it without any issue, where pacman -R bash make me wheel understand that a really bad idea.
How can i had manualy all package who have a script #!/bin/sh script on one of my bin requieres dash as a dependencie.
Something like reinstall them with --asdenpof like discute on this thread https://bbs.archlinux.org/viewtopic.php?id=79026
Btw the command
IFS=:; grep -Irl '#!/bin/sh' $PATH |xargs -r checkbashismsreturn some script, but nothing to worry because this same package are use on debian where dash is /bin/sh by default for a bunch of years now, maybe some tips to add ?
Offline
/tmp/PGKBUILD.dash-keeper
pkgname=dash-keeper
pkgver=1
pkgrel=1
pkgdesc='keep dash'
arch=('any')
license=('dwtfyw')
provides=('dash-keeper')
depends=('dash')PKGEXT=".pkg.tar" makepkg -p /tmp/PGKBUILD.dash-keeper
rm /tmp/PGKBUILD.dash-keeperOffline
How can i had manualy all package who have a script #!/bin/sh script on one of my bin requieres dash as a dependencie
And I bet you have a lot of scripts that think /bin/sh is bash! Replacing the symlink will be reverted on every bash update.
The simple fix would be to edit the #! in the one script that requires dash.
Offline
Replacing the symlink will be reverted on every bash update.
This is actually addressed in https://wiki.archlinux.org/title/Dash#Relinking_/bin/sh and afaiu the OP they just wants to use dash as default sh; it's not so much that some script would specifically depend on dash (what'd be weird anyway, bash would typically superset dash)
Whether wrt
return some script, but nothing to worry because
that's a good idea at all and worth the hassle performance-wise is a fair but different question.
Offline
Allan is mostly right wrote:Replacing the symlink will be reverted on every bash update.
This is actually addressed in https://wiki.archlinux.org/title/Dash#Relinking_/bin/sh
That is an interesting solution.... A 10 line hook instead of adding one entry to pacman.conf!
I still have concerns about software using /bin/sh but having bashisms, but maybe I am just old and the situation has improved since I last investigated.
Offline
I guess it depends on what you're investigating.
There're relevant certainly scripts outside $PATH and checkbashism's will not necessarily figure all non POSIX-compliant stanzas but "performs basic checks on /bin/sh shell scripts for the possible presence of bashisms"
(and otoh dash also has some extensions over POSIX)
But as long as this isn't presenting itself as an xy-problem and the OP deliberately wants to pursue this (for whatever reason) and is ready to accept a false premise and then in doubt shy away, that's not wrong™ to do.
¯\_(ツ)_/¯
Offline
Sorry for late respond
/tmp/PGKBUILD.dash-keeper
Already have think about that, but i'm was not quite a fan of this, so i just gonna remember to not remove dash
I still have concerns about software using /bin/sh but having bashisms, but maybe I am just old and the situation has improved since I last investigated.
It's okay, this laptop is use to experiment on the linux word, and it's just some script who have some issue i can always change the shellbang, and on the end gonna learn thing into the journey.
That is an interesting solution.... A 10 line hook instead of adding one entry to pacman.conf!
I'm interrest into this simple line i can add into pacman.conf, for the hook it's okay i learn what a pacman hook is with that.
that's a good idea at all and worth the hassle performance-wise is a fair but different question.
I'm sorry but i have not understand what you mean here, but i guess my suggestion find a ears to listen to it so it's okay.
Thanks for you're time anyways, always enjoy learn new thing here ![]()
Offline
Allanb wrote:That is an interesting solution.... A 10 line hook instead of adding one entry to pacman.conf!
I'm interrest into this simple line i can add into pacman.conf, for the hook it's okay i learn what a pacman hook is with that.
I should have given the line. This should do the job.
NoExtract = bin/shOffline