package/pkg-rebar.mk: Fix remove-rebar-config-dependencies
PATCH 1/3 package/pkg-rebar.mk: Fix remove-rebar-config-dependencies
Handle the case where there is only one dependency described in rebar.config, so when the line starts by '{deps' and ends by '}.'. Before it was deleting this line but also all next lines until finding a line that ends by '}.'.
--- package/pkg-rebar.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
package/pkg-rebar.mk +2 -1
@@ -96,7 +96,8 @@ endef # Remove the "deps" statement from a rebar.config file define remove-rebar-config-dependencies - $(SED) '/^{deps/,/}\.$$/d' $($(PKG)_DIR)/rebar.config + $(SED) '/^{deps.*}\.$$/d' -e '/^{deps/,/}\.$$/d' \ + $($(PKG)_DIR)/rebar.config endef
Signature · 1 line
2.17.1
PATCH 2/3 package/pkg-rebar.mk: Change semantic of <PKG>_KEEP_DEPENDENCIES
Set it to NO by default and check if it is equal to NO. This is to be more consistent with other boolean variables in Buildroot.
--- package/pkg-rebar.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
package/pkg-rebar.mk +3 -1
@@ -234,9 +234,11 @@ $(2)_REBAR = rebar $(2)_DEPENDENCIES += host-erlang-rebar endif +$(2)_KEEP_DEPENDENCIES ?= NO + # Remove dependencies listed in rebar.config unless the package says # otherwise -ifeq ($$($(2)_KEEP_DEPENDENCIES),) +ifeq ($$($(2)_KEEP_DEPENDENCIES),NO) $(2)_POST_PATCH_HOOKS += remove-rebar-config-dependencies endif
Signature · 1 line
2.17.1
PATCH 3/3 docs/manual: Document ERLANG_FOOBAR_KEEP_DEPENDENCIES in rebar infra
In reply to Johan Oudinet--- docs/manual/adding-packages-rebar.txt | 6 ++++++ 1 file changed, 6 insertions(+)
docs/manual/adding-packages-rebar.txt +6 -0
@@ -86,6 +86,12 @@ If the package bundles a _rebar_ utility, but can use the generic * +ERLANG_FOOBAR_REBAR_ENV+, to specify additional environment variables to pass to the _rebar_ utility. +* +ERLANG_FOOBAR_KEEP_DEPENDENCIES+, to keep the dependencies + described in the rebar.config file. Valid values are +YES+ or +NO+ + (the default). Unless this variable is set to +YES+, the _rebar_ + infrastructure removes such dependencies in a post-patch hook to + ensure rebar does not download nor compile them. + With the rebar infrastructure, all the steps required to build and install the packages are already defined, and they generally work well for most rebar-based packages. However, when required, it is
Signature · 1 line
2.17.1
PATCH 1/3 package/pkg-rebar.mk: Fix remove-rebar-config-dependencies
In reply to Johan OudinetHello,
Quoted 9 lines · Johan Oudinet
Handle the case where there is only one dependency described in rebar.config, so when the line starts by '{deps' and ends by '}.'. Before it was deleting this line but also all next lines until finding a line that ends by '}.'.
Signed-off-by Johan Oudinet <[email protected]>--- package/pkg-rebar.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Series applied. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com