All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] erlang: remove unwanted packages from staging too
@ 2016-02-25 14:56 Frank Hunleth
  2016-03-06 23:03 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Frank Hunleth @ 2016-02-25 14:56 UTC (permalink / raw)
  To: buildroot

This fixes an issue where an Erlang program compiles fine against files
in staging, but fails to run on the target due to the unwanted packages
being removed.

Signed-off-by: Frank Hunleth <fhunleth@troodon-software.com>
---
 package/erlang/erlang.mk | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/package/erlang/erlang.mk b/package/erlang/erlang.mk
index 638d2c2..88b0d42 100644
--- a/package/erlang/erlang.mk
+++ b/package/erlang/erlang.mk
@@ -74,7 +74,13 @@ ifneq ($(BR2_PACKAGE_ERLANG_MEGACO),y)
 ERLANG_REMOVE_PACKAGES += megaco
 endif
 
-define ERLANG_REMOVE_UNUSED
+define ERLANG_REMOVE_STAGING_UNUSED
+	for package in $(ERLANG_REMOVE_PACKAGES); do \
+		rm -rf $(STAGING_DIR)/usr/lib/erlang/lib/$${package}-*; \
+	done
+endef
+
+define ERLANG_REMOVE_TARGET_UNUSED
 	find $(TARGET_DIR)/usr/lib/erlang -type d -name src -prune -exec rm -rf {} \;
 	find $(TARGET_DIR)/usr/lib/erlang -type d -name examples -prune -exec rm -rf {} \;
 	for package in $(ERLANG_REMOVE_PACKAGES); do \
@@ -82,7 +88,8 @@ define ERLANG_REMOVE_UNUSED
 	done
 endef
 
-ERLANG_POST_INSTALL_TARGET_HOOKS += ERLANG_REMOVE_UNUSED
+ERLANG_POST_INSTALL_STAGING_HOOKS += ERLANG_REMOVE_STAGING_UNUSED
+ERLANG_POST_INSTALL_TARGET_HOOKS += ERLANG_REMOVE_TARGET_UNUSED
 
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [PATCH 1/1] erlang: remove unwanted packages from staging too
  2016-02-25 14:56 [Buildroot] [PATCH 1/1] erlang: remove unwanted packages from staging too Frank Hunleth
@ 2016-03-06 23:03 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2016-03-06 23:03 UTC (permalink / raw)
  To: buildroot

Dear Frank Hunleth,

On Thu, 25 Feb 2016 09:56:35 -0500, Frank Hunleth wrote:
> This fixes an issue where an Erlang program compiles fine against files
> in staging, but fails to run on the target due to the unwanted packages
> being removed.
> 
> Signed-off-by: Frank Hunleth <fhunleth@troodon-software.com>
> ---
>  package/erlang/erlang.mk | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-03-06 23:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-25 14:56 [Buildroot] [PATCH 1/1] erlang: remove unwanted packages from staging too Frank Hunleth
2016-03-06 23:03 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.