From: Daniel Dickinson Date: Tue, 5 Jul 2016 01:53:57 +0000 (-0400) Subject: mail/msmtp: Remove use of symlink postinst/postrm X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=843fab534dfa5088eeab910e4982d63dbeed7b00;p=openwrt-packages.git mail/msmtp: Remove use of symlink postinst/postrm Avoid the postrm/postinst symlink addition and removal as 1) This fails to conflict with other packages which also provide the same commands and makes what packages is supply the command depend on which command was installed last. 2) Trunk devs don't like postrm/postinst symlink mangling 3) Packages changing things from other packages is considered bad packaging pratice on most distros and debian, for example, prohibits it. Signed-off-by: Daniel Dickinson --- diff --git a/mail/msmtp/Makefile b/mail/msmtp/Makefile index 0c3af6df6..9ea72427b 100644 --- a/mail/msmtp/Makefile +++ b/mail/msmtp/Makefile @@ -112,19 +112,7 @@ define Package/msmtp/install $(1)/etc/msmtprc $(INSTALL_DIR) $(1)/usr/bin $(CP) $(PKG_INSTALL_DIR)/usr/bin/msmtp $(1)/usr/bin/ -endef - -define Package/msmtp/postinst - [ -e $${IPKG_INSTROOT}/usr/sbin/sendmail ] || { - mkdir -p $${IPKG_INSTROOT}/usr/sbin - ln -sf ../bin/msmtp $${IPKG_INSTROOT}/usr/sbin/sendmail - } -endef - -define Package/msmtp/prerm - [ "../bin/msmtp" = "$(readlink -qs $${IPKG_INSTROOT}/usr/sbin/sendmail)" ] && { - rm -f $${IPKG_INSTROOT}/usr/sbin/sendmail - } + ln -s ../bin/msmtp $(1)/usr/sbin/sendmail endef Package/msmtp-nossl/conffiles = $(Package/msmtp/conffiles)