All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: yann.morin@orange.com
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH] package/pkg-download: do not try to vendor _EXTRA_DOWNLOADS
Date: Tue, 10 May 2022 21:24:30 +0200	[thread overview]
Message-ID: <4634ccff-2b76-5b91-0730-391c53b883b8@mind.be> (raw)
In-Reply-To: <31076_1651814495_6274B05F_31076_440_1_20220506052132.GB2870@tl-lnx-nyma7486>



On 06/05/2022 07:21, yann.morin@orange.com wrote:
> Arnout, All,
> 
> On 2022-05-05 22:37 +0200, Arnout Vandecappelle spake thusly:
>> On 05/05/2022 19:19, yann.morin@orange.com wrote:
>>> From: "Yann E. MORIN" <yann.morin@orange.com>
>>>
>>> For golang- or cargo-based packages, we apply a vendoring pass after the
>>> package's "main" download is done. Whether to vendor or not is based on
>>> the heuristic that a specific directory exists or not; for golang
>>> packages, we look for '/vendor', while for cargo, we look for '/VENDOR'.
>>>
>>> This is fine for the "main" (by lack of a better term) download, but
>>> this falls flat on its face for extra downloads. Indeed, so packages may
>>> need to download data sets, or assets, as _EXTRA_DOWNLOADS. Those are
>>> usually just data blobs, and are not actual golang or cargo packages; as
>>> such they do not need to be vendored, but worse, if we try to actually
>>> vendor them, this fails because the required files for vendoring are
>>> missing from the archives in such data sets.
>>>
>>> We fix that by decoupling the download for the extra download, from the
>>> download for the main archive. We pass the post-processing option only
>>> to the main download.
>>>
>>> This makes the hard assumption that extra downloads will never need to
>>> be post-processed for vendoring, of course; we hope this will always be
>>> correct in practice.
>>>
>>> Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
>>> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
>>
>>   Applied to master, thanks, with a few changes:
>>
>>       - no loop needed for MAIN_DOWNLOAD, it can have only one;
> 
> In fact, that was on purpose: it can have no main download...
> Indeed, a package can very well only declare extra downloads...
> I forgot to explain that in the commit log, sorry.

  OK. However, somehow this seems to work:

package/foo/foo.mk:
FOO_SOURCE =
FOO_VERSION = 1

FOO_INSTALL_TARGET_CMDS = echo '***foo!***'

$(eval $(generic-package))

bash 84467$ make foo
WARNING: no hash file for
 >>> foo 1 Extracting
 >>> foo 1 Patching
 >>> foo 1 Configuring
 >>> foo 1 Building
 >>> foo 1 Installing to target
echo '***foo!***'
***foo!***


  So I don't think it is needed after all? The dl-wrapper script apparently 
doesn't do anything if the filename is empty.

  Regards,
  Arnout

> 
> So, either we do the loop, which is a simple way to expand to nothing
> when there is no item but the reason is not obvious, or we add an
> explicit $(if ...) test, which is going to be a bit more verbose...
> 
> What's your preference?
> 
>>       - remove superfluous backslash in the definition of MAIN_DOWNLOAD;
> 
> Ah, yes I forgot to drop it... Good catch.
> 
>>       - introduce _ADDITIONAL_DOWNLOADS to avoid filter-out.
> 
> I did that initially, but I thought that yet another variable could be
> easily avoided with the filtering our. But OK, that's fine with me too.
> 
> Thanks!
> 
> Regards,
> Yann E. MORIN.
> 
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2022-05-10 19:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-05 17:19 [Buildroot] [PATCH] package/pkg-download: do not try to vendor _EXTRA_DOWNLOADS yann.morin
2022-05-05 20:37 ` Arnout Vandecappelle
2022-05-06  5:21   ` yann.morin
2022-05-10 19:24     ` Arnout Vandecappelle [this message]
2022-05-11  6:00       ` yann.morin
2022-05-28  9:00 ` Peter Korsgaard

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=4634ccff-2b76-5b91-0730-391c53b883b8@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@buildroot.org \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=yann.morin@orange.com \
    /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 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.