You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The build system should allow adding PROVIDES for existing package names, to facilitate replacing core packages. At the moment, adding such PROVIDES will not lead to the desired dependencies.
Example: ip-tiny and ip-full both provide ip, the generated Kconfig for +ip depends looks like this:
select PACKAGE_ip-tiny if !PACKAGE_ip-full
This would not work if ip-full was just called ip (applying the following patch to show the issue):
diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile
index 364c1b22a1..d7933ede54 100644
--- a/package/network/utils/iproute2/Makefile
+++ b/package/network/utils/iproute2/Makefile
@@ -39,11 +39,10 @@ $(call Package/iproute2/Default)
ALTERNATIVES:=200:/sbin/ip:/sbin/ip-tiny
endef
The Kconfig looks like this now:
select PACKAGE_ip
instead of the expected
select PACKAGE_ip if !PACKAGE_ip-tiny
I expect this can be solved by separating the "vdepends" list from the package list, making each package provide itself, and always resolving DEPENDS through vdepends.
The text was updated successfully, but these errors were encountered:
I expect this can be solved by separating the “vdepends” list from the package list, making each package provide itself, and always resolving DEPENDS through vdepends.
This is actually how opkg works internally as well so it might make sense to align behaviour here.
NeoRaider:
The build system should allow adding PROVIDES for existing package names, to facilitate replacing core packages. At the moment, adding such PROVIDES will not lead to the desired dependencies.
Example: ip-tiny and ip-full both provide ip, the generated Kconfig for +ip depends looks like this:
select PACKAGE_ip-tiny if !PACKAGE_ip-full
This would not work if ip-full was just called ip (applying the following patch to show the issue):
diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile
index 364c1b22a1..d7933ede54 100644
--- a/package/network/utils/iproute2/Makefile
+++ b/package/network/utils/iproute2/Makefile
@@ -39,11 +39,10 @@ $(call Package/iproute2/Default)
ALTERNATIVES:=200:/sbin/ip:/sbin/ip-tiny
endef
-define Package/ip-full
+define Package/ip
$(call Package/iproute2/Default)
TITLE:=Routing control utility (Full)
VARIANT:=full
ALTERNATIVES:=300:/sbin/ip:/sbin/ip-full
endef
@@ -120,7 +119,7 @@ define Package/ip-tiny/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ip/ip $(1)/sbin/ip-tiny
endef
-define Package/ip-full/install
+define Package/ip/install
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ip/ip $(1)/sbin/ip-full
endef
@@ -158,7 +157,7 @@ define Package/devlink/install
endef
$(eval $(call BuildPackage,ip-tiny))
-$(eval $(call BuildPackage,ip-full))
+$(eval $(call BuildPackage,ip))
$(eval $(call BuildPackage,tc))
$(eval $(call BuildPackage,genl))
$(eval $(call BuildPackage,ip-bridge))
The Kconfig looks like this now:
select PACKAGE_ip
instead of the expected
select PACKAGE_ip if !PACKAGE_ip-tiny
I expect this can be solved by separating the "vdepends" list from the package list, making each package provide itself, and always resolving DEPENDS through vdepends.
The text was updated successfully, but these errors were encountered: