Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/edk2-platforms: fix installation
@ 2021-10-04 20:17 Yann E. MORIN
  2021-10-15 20:03 ` Arnout Vandecappelle
  2021-10-21 14:32 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Yann E. MORIN @ 2021-10-04 20:17 UTC (permalink / raw)
  To: buildroot; +Cc: Kory Maincent, Yann E. MORIN

There are currently three issues with the installation step:

 1. it does not ensure the parent destination directory exists before
    copying into it, so if /usr/share has not been created in the
    dependency chain of edk2-platforms, the installation fails, which
    may very well happen easily as edk2-plaforms has nothing in its
    dependency chain (except the toolchain et al.);

 2. all our dot-stampfiles and .files-list are also copied, as well as
    the Readme, license files, and maintainers file. All of those are
    useless on the target (and the .files-list introduce
    non-reproduciiblity);

 3. of a lesser importance, the construct to install, and specifically
    to reinstall, does not match what we usually do in Buildroot
    (removal of the directory to copy).

We fix all three in one fell swoop:

 1. create the destination directory if needed;
 2. copy just the directories with the actual platform descriptions

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Dick Olsson <hi@senzilla.io>
Cc: Kory Maincent <kory.maincent@bootlin.com>
---
 package/edk2-platforms/edk2-platforms.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/edk2-platforms/edk2-platforms.mk b/package/edk2-platforms/edk2-platforms.mk
index 47e6b1c51d..430791ae3e 100644
--- a/package/edk2-platforms/edk2-platforms.mk
+++ b/package/edk2-platforms/edk2-platforms.mk
@@ -15,8 +15,8 @@ EDK2_PLATFORMS_INSTALL_STAGING = YES
 # There is nothing to build for edk2-platforms. All we need to do is to copy
 # all description files to staging, for other packages to build with.
 define EDK2_PLATFORMS_INSTALL_STAGING_CMDS
-	rm -rf $(STAGING_DIR)/usr/share/edk2-platforms
-	cp -rf $(@D) $(STAGING_DIR)/usr/share/edk2-platforms
+	mkdir -p $(STAGING_DIR)/usr/share/edk2-platforms
+	cp -rf $(@D)/*/ $(STAGING_DIR)/usr/share/edk2-platforms/
 endef
 
 $(eval $(generic-package))
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2021-10-21 14:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-04 20:17 [Buildroot] [PATCH] package/edk2-platforms: fix installation Yann E. MORIN
2021-10-15 20:03 ` Arnout Vandecappelle
2021-10-21 14:32 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox