Skip to contentSkip to conversation

package/composer: needs host-php to extract phar files

PATCH Applied Bernd Kuhls 2 participants 2 messages Aug 4, 2023 – Aug 7, 2023

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/composer: needs host-php to extract phar files

Although composer has host-php as build dependency, in the case of BR2_PER_PACKAGE_DIRECTORIES=y host-php was not built during extract stage of the composer package.

Fixes:
http://autobuild.buildroot.net/results/506/50658c50fde8145fac320e3b17004e98c78c6c4d/

---
v2: use _EXTRACT_DEPENDENCIES (Thomas)

 package/composer/composer.mk | 1 +
 1 file changed, 1 insertion(+)
package/composer/composer.mk +1 -0
index a24c020796..fde5b48951 100644
@@ -15,6 +15,7 @@ COMPOSER_LICENSE = MIT
 COMPOSER_LICENSE_FILES = LICENSE
 
 HOST_COMPOSER_DEPENDENCIES = host-php
+HOST_COMPOSER_EXTRACT_DEPENDENCIES = host-php
 
 define HOST_COMPOSER_EXTRACT_CMDS
 	cp $(HOST_COMPOSER_DL_DIR)/$(COMPOSER_SOURCE) $(@D)
Signature · 6 lines
2.39.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Hello Bernd,

Quoted 3 lines · On Fri, 4 Aug 2023 17:50:09 +0200 Bernd Kuhls <[email protected]> wrote:

Although composer has host-php as build dependency, in the case of BR2_PER_PACKAGE_DIRECTORIES=y host-php was not built during extract stage of the composer package.

It's not just BR2_PER_PACKAGE_DIRECTORIES=y that is broken. If you run "make host-composer-extract", you'd get the same result, without per-package directories. I've adjusted a bit the commit message.

Quoted 2 lines

HOST_COMPOSER_DEPENDENCIES = host-php
+HOST_COMPOSER_EXTRACT_DEPENDENCIES = host-php

Here I hesitated a bit because those dependencies (build and extract) are now slightly redundant. However, it's true that we need host-php at extract time, but also to use host-composer. But for host packages we don't really have the concept of runtime dependency: the only way to ensure a runtime dependency will be there at runtime is to make it a build-time dependency, which is what we do here with <pkg>_DEPENDENCIES. So I've kept it like you did, but I will certainly be willing to hear arguments of others as I don't have a very strong opinion there.

Applied to master with the tweaked commit log. Thanks!

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot