element-hq / element-hq/element-web
Element-Desktop: Debian package: postinst and postrm ignore args
- Dominant language
- TypeScript
- Stars
- 13.5k
- Forks
- 2.8k
- PR merge metrics
- PR metrics pending
Description
The "maintainer scripts" `postinst` and `postrm`, which are part of the Debian package "element-desktop" offered via https://packages.riot.im/debian/, ignore any arguments they are given.
Everything will be fine if nothing goes wrong (as always ;-)), but if `postinst` ever gets called with "abort-upgrade", "abort-remove", "abort-deconfigure", or whatever else (other than "configure"), it will probably not do what it is expected to do. Similar for `postrm`.
Here's the complete contents of the `postinst` maintainer script found in the package file (.deb) for version 1.9.5 of the package – no distinction based on `$1` to be seen:
```
#!/bin/bash
# Link to the binary
ln -sf '/opt/Element/element-desktop' '/usr/bin/element-desktop'
# SUID chrome-sandbox for Electron 5+
chmod 4755 '/opt/Element/chrome-sandbox' || true
update-mime-database /usr/share/mime || true
update-desktop-database /usr/share/applications || true
```
(I have no clue where that code is coming from.)
Some(!) of the various possible invocations to expect can be seen in these flow charts showing some(!?) of the flows likely to occur: https://www.debian.org/doc/debian-policy/ap-flowcharts.html
Contributor guide
Assessment
This issue has not been assessed yet.