Various packages in the feeds and within the base repository provide multiple build variants with slightly varying feature sets and in some cases packages rely on functionality that can be supported by entirely different packages, like using either openssl-util or px5g to generate an RSA certificate.
The current situation is that packages that rely on features provided by multi- build-variant packages are forcibly depending on specific candidates which makes it impossible for users to install other variants due to file clashes reported by opkg. One exemplary common use case is OpenVPN which can be configured to support and use iproute2, in which case it will forcibly depend on "ip" which is the stripped down variant of iproute2. Due to this hard dependency it is impossible for users to choose "ip-full" because "opkg install" will fail with file clashes since commit 021b96d7c5c668fbcb5375c65cee90832bb2854f. This patch series attempts to fix the already existing but slightly defunct PROVIDES support in the buildroot in order to be able to properly satisfy depends with any build variant in the future. Topics that require further testing and refinement are: 1) Investigate handling of DEFAULT_VARIANT wrt. <*> vs. <m> selections, similar to the fixes in patch 2 and 3 2) Ensure that DEFAULT_VARIANT is properly respected by mconf_depends() of scripts/package-metadata.pl - right now the (alphabetically?) first build variant is considered to be the preferred candidate 3) Test proper OPKG runtime behaviour when installing packages depending on virtual PROVIDES, e.g. "opkg install ip-full; opkg remove ip" should not remove the iproute2-enabled OpenVPN This series only touches OpenVPN and iproute2 for now to demonstrate the viability of the approach so any testing should be done with a fresh .config and only those two packages. Once PROVIDES support is properly fixed, other multi-variant package users should be converted to provides as well. ~ Jo -- Jo-Philipp Wich (5): scripts/package-metadata.pl: fix handling of virtual (PROVIDES) depends scripts/package-metadata.pl: split variants into -y and -m lists build: only consider <*> package variants for opkg install iproute2: let both ip and ip-full provide the virtual ip-command package openvpn: depend on virtual "ip-command" package/Makefile | 4 ++-- package/network/services/openvpn/Makefile | 2 +- package/network/utils/iproute2/Makefile | 7 ++++--- scripts/package-metadata.pl | 12 +++++++++--- 4 files changed, 16 insertions(+), 9 deletions(-) -- 2.1.4 _______________________________________________ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev