Skip to contentSkip to conversation

package/pkg-luarocks: use <pkg>_EXTRACT_DEPENDENCIES

PATCH New Thomas Petazzoni 4 participants 4 messages Nov 16, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/pkg-luarocks: use <pkg>_EXTRACT_DEPENDENCIES

The host luarocks tool is needed when *extracting* luarocks packages. Since regular dependencies are only available at the configure step, it caused the "luarocks" program to be available too late to be used to extract luarocks packages.

To work around this, host-luarocks was manually added as a dependency of the extract step of luarocks packages. While this worked fine until now, it breaks badly with per-package folders, because host-luarocks is not recorded as an extract dependency of luarocks packages, and therefore is not copied to the per-package host folder, causing a failure.

In the mean time, the <pkg>_EXTRACT_DEPENDENCIES mechanism was added, which aims at fixing exactly this problem, so let's use it and simplify pkg-luarocks.mk.

---
 package/pkg-luarocks.mk | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
package/pkg-luarocks.mk +2 -5
index e2b48cfb4c..29c5e66cd1 100644
@@ -42,7 +42,8 @@ $(2)_SITE		?= $$(call qstrip,$$(BR2_LUAROCKS_MIRROR))
 
 # Since we do not support host-luarocks-package, we know this is
 # a target package, and can just add the required dependencies
-$(2)_DEPENDENCIES	+= host-luarocks luainterpreter
+$(2)_DEPENDENCIES	+= luainterpreter
+$(2)_EXTRACT_DEPENDENCIES += host-luarocks
 
 #
 # Extract step. Extract into a temporary dir and move the relevant part to the
@@ -71,10 +72,6 @@ endif
 # make targets
 $(call inner-generic-package,$(1),$(2),$(3),$(4))
 
-# $(2)_DEPENDENCIES are handled for configure step (too late)
-# but host-luarocks is required to do the extract
-$$($(2)_TARGET_EXTRACT): | host-luarocks
-
 endef
 
 ################################################################################
Signature · 1 line
2.19.1
#1 lore raw

PATCH 1/1 package/pkg-luarocks: use <pkg>_EXTRACT_DEPENDENCIES

Thomas, All,

On 2018-11-16 14:53 +0100, Thomas Petazzoni spake thusly:

Quoted 12 lines

The host luarocks tool is needed when *extracting* luarocks packages. Since regular dependencies are only available at the configure step, it caused the "luarocks" program to be available too late to be used to extract luarocks packages.

To work around this, host-luarocks was manually added as a dependency of the extract step of luarocks packages. While this worked fine until now, it breaks badly with per-package folders, because host-luarocks is not recorded as an extract dependency of luarocks packages, and therefore is not copied to the per-package host folder, causing a failure.

Quoted 6 lines

In the mean time, the <pkg>_EXTRACT_DEPENDENCIES mechanism was added, which aims at fixing exactly this problem, so let's use it and simplify pkg-luarocks.mk.

Regards,
Yann E. MORIN.

Quoted 32 lines
---
 package/pkg-luarocks.mk | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
package/pkg-luarocks.mk +2 -5
index e2b48cfb4c..29c5e66cd1 100644
@@ -42,7 +42,8 @@ $(2)_SITE		?= $$(call qstrip,$$(BR2_LUAROCKS_MIRROR))
 
 # Since we do not support host-luarocks-package, we know this is
 # a target package, and can just add the required dependencies
-$(2)_DEPENDENCIES	+= host-luarocks luainterpreter
+$(2)_DEPENDENCIES	+= luainterpreter
+$(2)_EXTRACT_DEPENDENCIES += host-luarocks
 
 #
 # Extract step. Extract into a temporary dir and move the relevant part to the
@@ -71,10 +72,6 @@ endif
 # make targets
 $(call inner-generic-package,$(1),$(2),$(3),$(4))
 
-# $(2)_DEPENDENCIES are handled for configure step (too late)
-# but host-luarocks is required to do the extract
-$$($(2)_TARGET_EXTRACT): | host-luarocks
-
 endef
 
 ################################################################################
Signature · 1 line
2.19.1
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw

PATCH 1/1 package/pkg-luarocks: use <pkg>_EXTRACT_DEPENDENCIES

In reply to Thomas Petazzoni

Le ven. 16 nov. 2018 ? 14:53, Thomas Petazzoni <[email protected]> a ?crit :

Quoted 12 lines

The host luarocks tool is needed when *extracting* luarocks packages. Since regular dependencies are only available at the configure step, it caused the "luarocks" program to be available too late to be used to extract luarocks packages.

To work around this, host-luarocks was manually added as a dependency of the extract step of luarocks packages. While this worked fine until now, it breaks badly with per-package folders, because host-luarocks is not recorded as an extract dependency of luarocks packages, and therefore is not copied to the per-package host folder, causing a failure.

Quoted 6 lines

In the mean time, the <pkg>_EXTRACT_DEPENDENCIES mechanism was added, which aims at fixing exactly this problem, so let's use it and simplify pkg-luarocks.mk.

Cc Francois Perrad <[email protected]>
Quoted 32 lines
---
 package/pkg-luarocks.mk | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
package/pkg-luarocks.mk +2 -1
index e2b48cfb4c..29c5e66cd1 100644
@@ -42,7 +42,8 @@ $(2)_SITE             ?= $$(call
 qstrip,$$(BR2_LUAROCKS_MIRROR))
 
 # Since we do not support host-luarocks-package, we know this is
 # a target package, and can just add the required dependencies
-$(2)_DEPENDENCIES      += host-luarocks luainterpreter
+$(2)_DEPENDENCIES      += luainterpreter
+$(2)_EXTRACT_DEPENDENCIES += host-luarocks
 
 #

# Extract step. Extract into a temporary dir and move the relevant part
to the

package/pkg-luarocks.mk +0 -4
@@ -71,10 +72,6 @@ endif
 # make targets
 $(call inner-generic-package,$(1),$(2),$(3),$(4))
 
-# $(2)_DEPENDENCIES are handled for configure step (too late)
-# but host-luarocks is required to do the extract
-$$($(2)_TARGET_EXTRACT): | host-luarocks
-
 endef
 
 
Quoted 5 lines

################################################################################
--
2.19.1

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20181116/7e8d7a6b/attachment.html>

#3 lore raw

PATCH 1/1 package/pkg-luarocks: use <pkg>_EXTRACT_DEPENDENCIES

In reply to Thomas Petazzoni
Quoted 14 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

The host luarocks tool is needed when *extracting* luarocks packages. Since regular dependencies are only available at the configure step, it caused the "luarocks" program to be available too late to be used to extract luarocks packages.

To work around this, host-luarocks was manually added as a dependency of the extract step of luarocks packages. While this worked fine until now, it breaks badly with per-package folders, because host-luarocks is not recorded as an extract dependency of luarocks packages, and therefore is not copied to the per-package host folder, causing a failure.

Quoted 6 lines

In the mean time, the <pkg>_EXTRACT_DEPENDENCIES mechanism was added, which aims at fixing exactly this problem, so let's use it and simplify pkg-luarocks.mk.

Committed to next, thanks.

Signature · 1 line
Bye, Peter Korsgaard