For your issue to not get closed without review, please confirm that:
[your issue text goes here]
Disclaimer: I couldn't find a better/more suitable place to report this.
When using the Debian/Ubuntu repo to install/upgrade helium-bin, I noticed apt complaining about /var/lib/dpkg/info/helium-bin.postrm:
$ sudo apt install helium-bin
[...]
Unpacking helium-bin (0.11.3.2-1) over (0.10.9.1-1) ...
/var/lib/dpkg/info/helium-bin.postrm: 4: [: Illegal number: upgrade
[...]
So I turned to shellcheck to see what that had to report on that file (and on /var/lib/dpkg/info/helium-bin.postinst too for good measure). Looks like there's some non-Posix stuff in there that might be worthwhile looking into.
$ shellcheck /var/lib/dpkg/info/helium-bin.postrm
```
In /var/lib/dpkg/info/helium-bin.postrm line 3:
/usr/bin/update-desktop-database &> /dev/null || :
^----------^ SC3020 (warning): In POSIX sh, &> is undefined.
In /var/lib/dpkg/info/helium-bin.postrm line 4:
if [ $1 -eq 0 ] ; then
^-- SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
if [ "$1" -eq 0 ] ; then
In /var/lib/dpkg/info/helium-bin.postrm line 5:
/bin/touch --no-create /usr/share/icons/hicolor &>/dev/null
^---------^ SC3020 (warning): In POSIX sh, &> is undefined.
In /var/lib/dpkg/info/helium-bin.postrm line 6:
/usr/bin/gtk-update-icon-cache /usr/share/icons/hicolor &>/dev/null || :
^---------^ SC3020 (warning): In POSIX sh, &> is undefined.
For more information:
https://www.shellcheck.net/wiki/SC3020 -- In POSIX sh, &> is undefined.
https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...
```
$ shellcheck /var/lib/dpkg/info/helium-bin.postinst
```
In /var/lib/dpkg/info/helium-bin.postinst line 13:
/usr/bin/update-desktop-database &> /dev/null || :
^----------^ SC3020 (warning): In POSIX sh, &> is undefined.
In /var/lib/dpkg/info/helium-bin.postinst line 14:
/bin/touch --no-create /usr/share/icons/hicolor &>/dev/null || :
^---------^ SC3020 (warning): In POSIX sh, &> is undefined.
In /var/lib/dpkg/info/helium-bin.postinst line 21:
/usr/bin/gtk-update-icon-cache /usr/share/icons/hicolor &>/dev/null || :
^---------^ SC3020 (warning): In POSIX sh, &> is undefined.
For more information:
https://www.shellcheck.net/wiki/SC3020 -- In POSIX sh, &> is undefined.
```
Additionally, IMO, the apparmor profile handling could be improved. The postinst script runs apparmor_parser -r. The debian wiki recommends also using the '-W -T' options.
Regards
For your issue to not get closed without review, please confirm that:
why I am making a blank issue from scratch.
I am aware that there is an appropriate channel for that.
organization if I lied by checking any of these checkboxes.
[your issue text goes here]
Disclaimer: I couldn't find a better/more suitable place to report this.
When using the Debian/Ubuntu repo to install/upgrade helium-bin, I noticed apt complaining about /var/lib/dpkg/info/helium-bin.postrm:
So I turned to shellcheck to see what that had to report on that file (and on /var/lib/dpkg/info/helium-bin.postinst too for good measure). Looks like there's some non-Posix stuff in there that might be worthwhile looking into.
$ shellcheck /var/lib/dpkg/info/helium-bin.postrm
/usr/bin/update-desktop-database &> /dev/null || :
^----------^ SC3020 (warning): In POSIX sh, &> is undefined.
In /var/lib/dpkg/info/helium-bin.postrm line 4:
if [ $1 -eq 0 ] ; then
^-- SC2086 (info): Double quote to prevent globbing and word splitting.
Did you mean:
if [ "$1" -eq 0 ] ; then
In /var/lib/dpkg/info/helium-bin.postrm line 5:
/bin/touch --no-create /usr/share/icons/hicolor &>/dev/null
^---------^ SC3020 (warning): In POSIX sh, &> is undefined.
In /var/lib/dpkg/info/helium-bin.postrm line 6:
/usr/bin/gtk-update-icon-cache /usr/share/icons/hicolor &>/dev/null || :
^---------^ SC3020 (warning): In POSIX sh, &> is undefined.
For more information:
https://www.shellcheck.net/wiki/SC3020 -- In POSIX sh, &> is undefined.
https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...
```
$ shellcheck /var/lib/dpkg/info/helium-bin.postinst
/usr/bin/update-desktop-database &> /dev/null || :
^----------^ SC3020 (warning): In POSIX sh, &> is undefined.
In /var/lib/dpkg/info/helium-bin.postinst line 14:
/bin/touch --no-create /usr/share/icons/hicolor &>/dev/null || :
^---------^ SC3020 (warning): In POSIX sh, &> is undefined.
In /var/lib/dpkg/info/helium-bin.postinst line 21:
/usr/bin/gtk-update-icon-cache /usr/share/icons/hicolor &>/dev/null || :
^---------^ SC3020 (warning): In POSIX sh, &> is undefined.
For more information:
https://www.shellcheck.net/wiki/SC3020 -- In POSIX sh, &> is undefined.
```
Additionally, IMO, the apparmor profile handling could be improved. The postinst script runs
apparmor_parser -r. The debian wiki recommends also using the '-W -T' options.Regards