void-packages/srcpkgs/hplip/REMOVE
Andrew J. Hesford 316bc350dd hplip: prevent conflicts with the GUI package
The hplip-gui package uses the exact same files as the regular hplip
package, plus a few extra for the UI and three changes in the
configuration file. Rather than copy the entire package contents and
register conflict= and provides= to fool the package manager, we can
make hplip-gui depend on hplip and just manage a symlink between two
alternative configuration files.
2022-12-02 14:19:52 -05:00

10 lines
248 B
Text

case "${ACTION}" in
pre)
# Remove a configuration symlink if it points to the non-GUI config
if [ -L etc/hp/hplip.conf ]; then
case "$(readlink etc/hp/hplip.conf 2>/dev/null)" in
""|hplip-nogui.conf) rm etc/hp/hplip.conf ;;
esac
fi
esac