Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla@busybox.net
To: buildroot@uclibc.org
Subject: [Buildroot] [Bug 15576] Cannot skip post-image script with `make prepare-sdk`
Date: Sun, 21 May 2023 14:13:08 +0000	[thread overview]
Message-ID: <bug-15576-163-z4nydnHMMK@https.bugs.busybox.net/> (raw)
In-Reply-To: <bug-15576-163@https.bugs.busybox.net/>

https://bugs.busybox.net/show_bug.cgi?id=15576

Yann E. MORIN <yann.morin.1998@free.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yann.morin.1998@free.fr

--- Comment #2 from Yann E. MORIN <yann.morin.1998@free.fr> ---
mscdex, All,

Thanks for the report.

> It would be very useful to have an official/built-in way to bypass the
> post-image script

That's indeed pretty surprising. Could you please try this patch (not sure
if bugzilla keeps or removes TABs, so adapt if need be):

diff --git a/Makefile b/Makefile
index 3d0783242f..05b422d8d2 100644
--- a/Makefile
+++ b/Makefile
@@ -592,7 +592,7 @@ prepare: $(BUILD_DIR)/buildroot-config/auto.conf
 world: target-post-image

 .PHONY: prepare-sdk
-prepare-sdk: world
+prepare-sdk: target-finalize staging-finalize host-finalize
        @$(call MESSAGE,"Rendering the SDK relocatable")
        PER_PACKAGE_DIR=$(PER_PACKAGE_DIR) $(TOPDIR)/support/scripts/fix-rpath
host
        PER_PACKAGE_DIR=$(PER_PACKAGE_DIR) $(TOPDIR)/support/scripts/fix-rpath
staging


> (and possibly the other scripts) when doing `make prepare-sdk` (either
> implicitly or explicitly).

Post-fakeroot scripts are only caled when building an image, so the above patch
should also cover that case.

As for the post-build scripts, they are supposed to actually fixup the build,
and they may have to explixitly tweak host/ and staging/ for the purpose of
doing small last-minute cleanups and tweaks of various sorts, some which may
be needed to get a working SDK (I know of such a case). So I'm afraid that
is not going to be possible to cover both cases.

In such a case, I'd suggest that what you are doing, setting an environment
variable when you build the SDK and/or doing the full build, and checking that
variable in your post-build scripts, is the correct thing to do. I would
however argue that what your post-build scripts should not modify target/,
staging/, and/or host/ in a way that is incomaptible with assembling an SDK.

Regards,
Yann E. MORIN.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2023-05-21 14:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-20 17:09 [Buildroot] [Bug 15576] New: Cannot skip post-image script with `make prepare-sdk` bugzilla
2023-05-21  0:22 ` [Buildroot] [Bug 15576] " bugzilla
2023-05-21 14:13 ` bugzilla [this message]
2023-05-22 18:24 ` bugzilla
2023-05-24 20:11 ` bugzilla
2024-06-15 15:08 ` bugzilla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-15576-163-z4nydnHMMK@https.bugs.busybox.net/ \
    --to=bugzilla@busybox.net \
    --cc=buildroot@uclibc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox