[LEDE-DEV] [RFCv2 0/3] Fix and improve PROVIDES handling

Jo-Philipp Wich jo at mein.io
Tue Oct 25 02:52:28 PDT 2016


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 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.


Changes since v1:

 - Instead of splitting -m and -y variant lists, fix the root cause of
   improperly updated install stamp files

 - Instead of letting "ip" and "ip-full" provide "ip-command", rename "ip" to
   "ip-tiny" and let both build variants provide "ip" instead, this way no "ip"
   users need to be changed


Jo-Philipp Wich (3):
  scripts/package-metadata.pl: fix handling of virtual (PROVIDES)
    depends
  include: properly update .install stamp files
  iproute2: rename ip to ip-tiny and let both ip-tiny and ip-full
    provide "ip"

 include/package-ipkg.mk                 | 26 ++++++++++++++------------
 package/network/utils/iproute2/Makefile | 13 +++++++------
 scripts/package-metadata.pl             |  4 ++--
 3 files changed, 23 insertions(+), 20 deletions(-)

-- 
2.9.3




More information about the Lede-dev mailing list