* [Buildroot] [PATCH 1/3] package/pkg-rebar.mk: Fix remove-rebar-config-dependencies
@ 2018-12-05 16:06 Johan Oudinet
2018-12-05 16:06 ` [Buildroot] [PATCH 2/3] package/pkg-rebar.mk: Change semantic of <PKG>_KEEP_DEPENDENCIES Johan Oudinet
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Johan Oudinet @ 2018-12-05 16:06 UTC (permalink / raw)
To: buildroot
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 <johan.oudinet@gmail.com>
---
package/pkg-rebar.mk | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/package/pkg-rebar.mk b/package/pkg-rebar.mk
index b6b095929c..838e7681de 100644
--- a/package/pkg-rebar.mk
+++ b/package/pkg-rebar.mk
@@ -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
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 2/3] package/pkg-rebar.mk: Change semantic of <PKG>_KEEP_DEPENDENCIES
2018-12-05 16:06 [Buildroot] [PATCH 1/3] package/pkg-rebar.mk: Fix remove-rebar-config-dependencies Johan Oudinet
@ 2018-12-05 16:06 ` Johan Oudinet
2018-12-05 16:06 ` [Buildroot] [PATCH 3/3] docs/manual: Document ERLANG_FOOBAR_KEEP_DEPENDENCIES in rebar infra Johan Oudinet
2018-12-09 16:29 ` [Buildroot] [PATCH 1/3] package/pkg-rebar.mk: Fix remove-rebar-config-dependencies Thomas Petazzoni
2 siblings, 0 replies; 4+ messages in thread
From: Johan Oudinet @ 2018-12-05 16:06 UTC (permalink / raw)
To: buildroot
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 <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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 3/3] docs/manual: Document ERLANG_FOOBAR_KEEP_DEPENDENCIES in rebar infra
2018-12-05 16:06 [Buildroot] [PATCH 1/3] package/pkg-rebar.mk: Fix remove-rebar-config-dependencies Johan Oudinet
2018-12-05 16:06 ` [Buildroot] [PATCH 2/3] package/pkg-rebar.mk: Change semantic of <PKG>_KEEP_DEPENDENCIES Johan Oudinet
@ 2018-12-05 16:06 ` Johan Oudinet
2018-12-09 16:29 ` [Buildroot] [PATCH 1/3] package/pkg-rebar.mk: Fix remove-rebar-config-dependencies Thomas Petazzoni
2 siblings, 0 replies; 4+ messages in thread
From: Johan Oudinet @ 2018-12-05 16:06 UTC (permalink / raw)
To: buildroot
Signed-off-by: Johan Oudinet <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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/3] package/pkg-rebar.mk: Fix remove-rebar-config-dependencies
2018-12-05 16:06 [Buildroot] [PATCH 1/3] package/pkg-rebar.mk: Fix remove-rebar-config-dependencies Johan Oudinet
2018-12-05 16:06 ` [Buildroot] [PATCH 2/3] package/pkg-rebar.mk: Change semantic of <PKG>_KEEP_DEPENDENCIES Johan Oudinet
2018-12-05 16:06 ` [Buildroot] [PATCH 3/3] docs/manual: Document ERLANG_FOOBAR_KEEP_DEPENDENCIES in rebar infra Johan Oudinet
@ 2018-12-09 16:29 ` Thomas Petazzoni
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2018-12-09 16:29 UTC (permalink / raw)
To: buildroot
Hello,
On Wed, 5 Dec 2018 17:06:16 +0100, Johan Oudinet wrote:
> 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 <johan.oudinet@gmail.com>
> ---
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-12-09 16:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-05 16:06 [Buildroot] [PATCH 1/3] package/pkg-rebar.mk: Fix remove-rebar-config-dependencies Johan Oudinet
2018-12-05 16:06 ` [Buildroot] [PATCH 2/3] package/pkg-rebar.mk: Change semantic of <PKG>_KEEP_DEPENDENCIES Johan Oudinet
2018-12-05 16:06 ` [Buildroot] [PATCH 3/3] docs/manual: Document ERLANG_FOOBAR_KEEP_DEPENDENCIES in rebar infra Johan Oudinet
2018-12-09 16:29 ` [Buildroot] [PATCH 1/3] package/pkg-rebar.mk: Fix remove-rebar-config-dependencies Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox