Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#837 - PROVIDES handling for non-virtual packages #5682

Closed
openwrt-bot opened this issue Jun 10, 2017 · 2 comments
Closed

FS#837 - PROVIDES handling for non-virtual packages #5682

openwrt-bot opened this issue Jun 10, 2017 · 2 comments
Labels

Comments

@openwrt-bot
Copy link

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

  • PROVIDES:=ip
    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.

@openwrt-bot
Copy link
Author

jow-:

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.

@openwrt-bot
Copy link
Author

NeoRaider:

I've tried my luck (and practically non-existing Perl knowledge) in fixing this, and pushed something to my staging that seems to work: https://git.lede-project.org/?p=lede/neoraider/staging.git;a=shortlog;h=refs/heads/provides

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant