kmod: fix ALTERNATIVES
authorKuan-Yi Li <kyli@abysm.org>
Fri, 12 Jun 2020 01:15:32 +0000 (09:15 +0800)
committerYousong Zhou <yszhou4tech@gmail.com>
Thu, 18 Jun 2020 08:41:51 +0000 (16:41 +0800)
ALTERNATIVES shall be defined in the package where /sbin/kmod resides --
otherwise kmod tools will break if we install only the library as these
tools will be linked to a nonexistent executable.

Signed-off-by: Kuan-Yi Li <kyli@abysm.org>
utils/kmod/Makefile

index ecd7e3d6dfebc6e118cba292e4c654588a6657c1..fd8e5807c3144afc00e299eea5cff81e9d86d731 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=kmod
 PKG_VERSION:=20
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/linux/utils/kernel/kmod/
@@ -32,6 +32,12 @@ define Package/kmod/Default
   TITLE:=Linux kernel module handling
   URL:=https://www.kernel.org/pub/linux/utils/kernel/kmod/
   DEPENDS:=+zlib
+endef
+
+
+define Package/kmod
+$(call Package/kmod/Default)
+  TITLE+= (tools)
   ALTERNATIVES:=\
     200:/sbin/depmod:/sbin/kmod \
     200:/sbin/insmod:/sbin/kmod \
@@ -41,12 +47,6 @@ define Package/kmod/Default
     200:/sbin/rmmod:/sbin/kmod
 endef
 
-
-define Package/kmod
-$(call Package/kmod/Default)
-  TITLE+= (tools)
-endef
-
 define Package/kmod/description
 Linux kernel module handling
  kmod is a set of tools to handle common tasks with Linux kernel modules like