• # /usr/bin/reportbug

    Posté par . En réponse au journal Bootsplash et alternative /bin/sh dans Debian. Évalué à 4.

    « Il existe plusieurs solutions simples pour régler le problème [...]»

    La meilleur solution est de faire un rapport de bug, car il s'agit bien d'un bug: Les scripts en #!/bin/sh ne doivent pas comporter de « bashisme »

    http://www.debian.org/doc/debian-policy/ch-files.html(...)

    The standard shell interpreter /bin/sh can be a symbolic link to any POSIX compatible shell, if echo -n does not generate a newline.[53] Thus, shell scripts specifying /bin/sh as interpreter should only use POSIX features. If a script requires non-POSIX features from the shell interpreter, the appropriate shell must be specified in the first line of the script (e.g., #!/bin/bash) and the package must depend on the package providing the shell (unless the shell package is marked "Essential", as in the case of bash).


    « Evidemment c'est un bricolage, le packageur ne peut pas se contenter de faire ça. »

    Non non c'est pas du bricolage, c'est la bonne façon de faire. A la rigueur, il pourrait émuler la fonction bash en shellscript POSIX, mais c'est inutile (BASH est un paquet marqué « Essential »). Il y a d'ailleurs plein de paquets qui ont leurs scripts *.{pre,post}{inst,rm} en bash sans que ça pose problème.