Discussion:
[PATCH 2/3] package/pkg-rebar.mk: Change semantic of <PKG>_KEEP_DEPENDENCIES
(too old to reply)
Johan Oudinet
2018-12-05 16:06:17 UTC
Permalink
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.

Signed-off-by: Johan Oudinet <***@gmail.com>
---
package/pkg-rebar.mk | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/package/pkg-rebar.mk b/package/pkg-rebar.mk
index 838e7681de..e4e3f3bb6c 100644
--- a/package/pkg-rebar.mk
+++ b/package/pkg-rebar.mk
@@ -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
--
2.17.1
Johan Oudinet
2018-12-05 16:06:18 UTC
Permalink
Signed-off-by: Johan Oudinet <***@gmail.com>
---
docs/manual/adding-packages-rebar.txt | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/docs/manual/adding-packages-rebar.txt b/docs/manual/adding-packages-rebar.txt
index be9ede0113..d78b3171d8 100644
--- a/docs/manual/adding-packages-rebar.txt
+++ b/docs/manual/adding-packages-rebar.txt
@@ -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
--
2.17.1
Thomas Petazzoni
2018-12-09 16:29:42 UTC
Permalink
Hello,
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(-)
Series applied. Thanks!

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Loading...