Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Adam Duskett <adam.duskett@amarulasolutions.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH/next v2 5/9] package/flutter-sdk-bin/Config.in.host: add pub-cache location option
Date: Sun, 19 Nov 2023 22:53:43 +0100	[thread overview]
Message-ID: <20231119215343.GQ996011@scaer> (raw)
In-Reply-To: <CAHDQB6MoBM+TJj3ysJD9VVDCV4pErHQP=Gbf5xw8aQfjnPRMTw@mail.gmail.com>

Adam, All,

On 2023-11-19 14:08 -0700, Adam Duskett spake thusly:
> I'll change the patch to set a default to $(DL_DIR)/br-flutter-pub-cache.

As Arnout and I said, this should not be configurable, so, to be sure
we're on the same page: not a "default" [for the config option], but a
"hard-coded" value in the .mk.

Regards,
Yann E. MORIN.

> That seems reasonable and a small change.
> 
> Adam Duskett
> 
> Senior Embedded Systems Developer
> 
> M. +1208-515-8102
> 
> [1]adam.duskett@amarulasolutions.com
> 
> __________________________________
> 
> Amarula Solutions BV
> 
> Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
> 
> T. +31 (0)85 111 9170
> [2]info@amarulasolutions.com
> 
> [3]www.amarulasolutions.com
> 
> On Sun, Nov 19, 2023 at 1:43 PM Arnout Vandecappelle < [4]arnout@mind.be> wrote:
> 
>   On 18/11/2023 23:12, Adam Duskett wrote:
>   > When running the command "flutter pub get," the plugins are stored in the
>   > pub-cache directory along with their sha256sum hashes. The default location
>   > of the pub-cache directory is $(HOST_DIR)/share/flutter/sdk/.pub-cache.
>   > While the above location is a perfectly acceptable choice by default, users
>   > may want to define an alternate location to prevent downloading all of the
>   > plugins on each fresh build of a Flutter application, and they may want to
>   > commit the pub-cache directory to their project.
>   >
>   > Add the new option BR2_PACKAGE_HOST_FLUTTER_SDK_BIN_PUB_CACHE_LOCATION to the
>   > flutter-sdk-bin/Config.in.host file, and set the default to the current
>   > default of $(HOST_DIR)/share/flutter/sdk/.pub-cache.
>   >
>   > Signed-off-by: Adam Duskett < [5]adam.duskett@amarulasolutions.com>
>   > ---
>   >   package/flutter-sdk-bin/Config.in.host     | 11 +++++++++++
>   >   package/flutter-sdk-bin/ [6]flutter-sdk-bin.mk |  2 +-
>   >   2 files changed, 12 insertions(+), 1 deletion(-)
>   >
>   > diff --git a/package/flutter-sdk-bin/Config.in.host b/package/flutter-sdk-bin/Config.in.host
>   > index a48714ea7f..0e31a8e0fa 100644
>   > --- a/package/flutter-sdk-bin/Config.in.host
>   > +++ b/package/flutter-sdk-bin/Config.in.host
>   > @@ -14,3 +14,14 @@ config BR2_PACKAGE_HOST_FLUTTER_SDK_BIN
>   >         free and open source.
>   >   
>   >          [7]https://flutter.dev/
>   > +
>   > +if BR2_PACKAGE_HOST_FLUTTER_SDK_BIN_ARCH_SUPPORTS
>   > +
>   > +config BR2_PACKAGE_HOST_FLUTTER_SDK_BIN_PUB_CACHE_LOCATION
>   > +     string "pub-cache location"
>   > +     default "$(HOST_DIR)/share/flutter/sdk/.pub-cache"
>   > +     help
>   > +       Directory to store cached packages used by Pub with
>   > +       Dart/Flutter.
>   > +
>   > +endif
>   > diff --git a/package/flutter-sdk-bin/ [8]flutter-sdk-bin.mk b/package/flutter-sdk-bin/ [9]flutter-sdk-bin.mk
>   > index 9461148dfb..6471c11d4e 100644
>   > --- a/package/flutter-sdk-bin/ [10]flutter-sdk-bin.mk
>   > +++ b/package/flutter-sdk-bin/ [11]flutter-sdk-bin.mk
>   > @@ -95,4 +95,4 @@ HOST_FLUTTER_SDK_BIN_DART_BIN = \
>   >   $(eval $(host-generic-package))
>   >   
>   >   # For target packages to locate said pub-cache
>   > -FLUTTER_SDK_BIN_PUB_CACHE = $(HOST_FLUTTER_SDK_BIN_SDK)/.pub-cache
>   > +FLUTTER_SDK_BIN_PUB_CACHE = $(call qstrip,$(BR2_PACKAGE_HOST_FLUTTER_SDK_BIN_PUB_CACHE_LOCATION))
> 
>     What about this code?
> 
>   # Remove the cache, as we will run precache after setting up flutter and dart
>   # with the new config options.
>   define HOST_FLUTTER_SDK_BIN_BUILD_CMDS
>            mkdir -p $(HOST_FLUTTER_SDK_BIN_SDK)
>            rm -rf $(HOST_FLUTTER_SDK_BIN_SDK)/.pub-cache
>            cd $(@D) && \
>                    $(HOST_FLUTTER_SDK_BIN_ENV) $(@D)/bin/flutter precache;
>   endef
> 
>     Either this code is needed and the idea of a shared cache is void, and it
>   really shouldn't be in DL_DIR at all. Or it is not needed and it should be
>   removed, with an explanation about why this "setting up flutter and dart with
>   the new config optoins" doesn't actually apply.
> 
>     Regards,
>     Arnout
> 
> Links:
> 1. mailto:adam.duskett@amarulasolutions.com
> 2. mailto:info@amarulasolutions.com
> 3. http://www.amarulasolutions.com/
> 4. mailto:arnout@mind.be
> 5. mailto:adam.duskett@amarulasolutions.com
> 6. http://flutter-sdk-bin.mk
> 7. https://flutter.dev/
> 8. http://flutter-sdk-bin.mk
> 9. http://flutter-sdk-bin.mk
> 10. http://flutter-sdk-bin.mk
> 11. http://flutter-sdk-bin.mk

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


-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2023-11-19 21:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-18 22:11 [Buildroot] [PATCH/next v2 1/9] package/xdg-user-dirs: new package Adam Duskett
2023-11-18 22:11 ` [Buildroot] [PATCH/next v2 2/9] package/flutter-sdk-bin: bump version to 3.16.0 Adam Duskett
2023-11-18 22:11 ` [Buildroot] [PATCH/next v2 3/9] package/flutter-engine: " Adam Duskett
2023-11-18 22:12 ` [Buildroot] [PATCH/next v2 4/9] package/flutter-engine: Add profile runtime mode selection Adam Duskett
2023-11-18 22:12 ` [Buildroot] [PATCH/next v2 5/9] package/flutter-sdk-bin/Config.in.host: add pub-cache location option Adam Duskett
2023-11-19  8:21   ` Yann E. MORIN
2023-11-19 17:47     ` Adam Duskett
2023-11-19 19:45       ` Yann E. MORIN
2023-11-19 20:41         ` Arnout Vandecappelle via buildroot
2023-11-19 20:43   ` Arnout Vandecappelle via buildroot
2023-11-19 21:08     ` Adam Duskett
2023-11-19 21:53       ` Yann E. MORIN [this message]
2023-11-20 16:40         ` Adam Duskett

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=20231119215343.GQ996011@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=adam.duskett@amarulasolutions.com \
    --cc=buildroot@buildroot.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