summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorDaniel Dickinson <lede@daniel.thecshore.com>2016-05-23 00:39:02 -0400
committerDaniel Dickinson <lede@daniel.thecshore.com>2016-07-06 05:26:02 -0400
commit1b2e2dcbffa3341d2bab925cc9b40581bf1b8e47 (patch)
tree6e068153acc5112104027ed6387fa8065c6d76e2 /net
parent8c3dda69e0690ac191ead8e7acdb9da367752b0c (diff)
net/wget: Remove use broken use of symlinks to /usr/bin/wget
postrm/postinst symlink mangling is frowned upon by trunk devs, in addition to packages modifying the files as other packages during installation/removal (without a agreed upon mechanism for coordinating such changes) is prohibited in most distros. Further in this case results in wget-ssl failing to conflict with wget-nossl. As mentioned in the github issue regarding this (https://github.com/openwrt/packages/issues/2728) it is also unnessary in current openwrt/lede. This patch there makes the symlink from the specific flavour of wget (e.g. wget-ssl) from /usr/bin/wget part of /install so that they conflict with each other the way they should, and do not modify the same files without a delibarate --force-overwrite. Signed-off-by: Daniel Dickinson <lede@daniel.thecshore.com>
Diffstat (limited to 'net')
-rw-r--r--net/wget/Makefile40
1 files changed, 3 insertions, 37 deletions
diff --git a/net/wget/Makefile b/net/wget/Makefile
index 65a440f3e..2f26d9a04 100644
--- a/net/wget/Makefile
+++ b/net/wget/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=wget
PKG_VERSION:=1.18
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
@@ -87,47 +87,13 @@ endif
define Package/wget/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/wget $(1)/usr/bin/wget-ssl
+ ln -sf wget-ssl $(1)/usr/bin/wget
endef
define Package/wget-nossl/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/wget $(1)/usr/bin/wget-nossl
-endef
-
-define Package/wget/postinst
-#!/bin/sh
-if [ -e $${IPKG_INSTROOT}/usr/bin/wget ]; then
- rm -rf $${IPKG_INSTROOT}/usr/bin/wget;
-fi
-ln -sf ./wget-ssl $${IPKG_INSTROOT}/usr/bin/wget
-endef
-
-define Package/wget/postrm
-#!/bin/sh
-rm $${IPKG_INSTROOT}/usr/bin/wget
-[ -x $${IPKG_INSTROOT}/usr/bin/wget-nossl ] && ln -s ./wget-nossl $${IPKG_INSTROOT}/usr/bin/wget || {
- ln -s ../../bin/busybox $${IPKG_INSTROOT}/usr/bin/wget
- $${IPKG_INSTROOT}/usr/bin/wget 2>&1 | grep 'applet not found' > /dev/null 2>&1 && rm $${IPKG_INSTROOT}/usr/bin/wget
-}
-exit 0
-endef
-
-define Package/wget-nossl/postinst
-#!/bin/sh
-if [ -e $${IPKG_INSTROOT}/usr/bin/wget ]; then
- rm -rf $${IPKG_INSTROOT}/usr/bin/wget;
-fi
-ln -s ./wget-nossl $${IPKG_INSTROOT}/usr/bin/wget
-endef
-
-define Package/wget-nossl/postrm
-#!/bin/sh
-rm $${IPKG_INSTROOT}/usr/bin/wget
-[ -x $${IPKG_INSTROOT}/usr/bin/wget-ssl ] && ln -s ./wget-ssl $${IPKG_INSTROOT}/usr/bin/wget || {
- ln -s ../../bin/busybox $${IPKG_INSTROOT}/usr/bin/wget
- $${IPKG_INSTROOT}/usr/bin/wget 2>&1 | grep 'applet not found' > /dev/null 2>&1 && rm $${IPKG_INSTROOT}/usr/bin/wget
-}
-exit 0
+ ln -sf wget-nossl $(1)/usr/bin/wget
endef
$(eval $(call BuildPackage,wget))