deb-package breaks apt/dpkg on dash-shell Linux OS #1227
Description
What Operating System
Linux (Other)
Debug Code
Describe the bug
Installed from ftb-app-1.26.5-amd64.deb.
After installation the app runs, but apt/dpkg will set it as half-installed and continually error when installing or removing packages from that point on.
"dpkg (subprocess): unable to execute installed ftb-app package post-removal script (/var/lib/dpkg/info/ftb-app.postrm): No such file or directory
dpkg: error processing package ftb-app (--remove):
installed ftb-app package post-removal script subprocess returned error exit status 2
dpkg: too many errors, stopping
Errors were encountered while processing:
ftb-app
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
"
The package can not be removed or automatically fixed.
The cause of this, is that the postrm-script contains Windows-style line-endings, that mangle the bash commands for removing the app from /usr/bin.
In bash-proper this is ignored, in alternatives like dash, this breaks the script.
I understand that this affects a negligible amount of users, but it may be an easy fix.
The other scripts seem to use Unix line-endings, so I wonder why the postrm-script differs.
Could you please review the build-process and ensure that scripts are formatted for Unix.
Steps to reproduce
- Use a dash-shell Linux OS (Tuxedo OS in my case).
- Install the app.
- Observe that "apt install" now lists the ftb-app as "to be installed".
- Attempt to remove the ftb-app.
- Observe the error described above.
Expected behaviour
The app can be installed and removed at will, without corrupting the dpkg-state.
Screenshots
No response
Additional information
No response