* [Buildroot] [PATCH/next v2 1/9] package/xdg-user-dirs: new package
@ 2023-11-18 22:11 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
` (3 more replies)
0 siblings, 4 replies; 13+ messages in thread
From: Adam Duskett @ 2023-11-18 22:11 UTC (permalink / raw)
To: buildroot; +Cc: Adam Duskett
This is needed to fix flutter-gallery
Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
---
DEVELOPERS | 1 +
package/Config.in | 1 +
package/xdg-user-dirs/Config.in | 14 +++++++
package/xdg-user-dirs/S22xdg-user-dirs-update | 26 +++++++++++++
.../xdg-user-dirs-update.service | 10 +++++
package/xdg-user-dirs/xdg-user-dirs.hash | 3 ++
package/xdg-user-dirs/xdg-user-dirs.mk | 37 +++++++++++++++++++
7 files changed, 92 insertions(+)
create mode 100644 package/xdg-user-dirs/Config.in
create mode 100644 package/xdg-user-dirs/S22xdg-user-dirs-update
create mode 100644 package/xdg-user-dirs/xdg-user-dirs-update.service
create mode 100644 package/xdg-user-dirs/xdg-user-dirs.hash
create mode 100644 package/xdg-user-dirs/xdg-user-dirs.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index 1f26e9bc81..ab0ef81639 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -39,6 +39,7 @@ F: package/flutter-pi/
F: package/flutter-sdk-bin/
F: package/python-kmod/
F: package/python-versioneer/
+F: package/xdg-user-dirs/
F: support/testing/tests/package/test_firewalld.py
F: support/testing/tests/package/test_flutter.py
diff --git a/package/Config.in b/package/Config.in
index 5a3410d758..3bdf5e92b1 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2783,6 +2783,7 @@ menu "System tools"
source "package/watchdog/Config.in"
source "package/watchdogd/Config.in"
source "package/xdg-dbus-proxy/Config.in"
+ source "package/xdg-user-dirs/Config.in"
source "package/xen/Config.in"
source "package/xvisor/Config.in"
endmenu
diff --git a/package/xdg-user-dirs/Config.in b/package/xdg-user-dirs/Config.in
new file mode 100644
index 0000000000..ba122606f2
--- /dev/null
+++ b/package/xdg-user-dirs/Config.in
@@ -0,0 +1,14 @@
+config BR2_PACKAGE_XDG_USER_DIRS
+ bool "xdg-user-dirs"
+ depends on BR2_ENABLE_LOCALE
+ depends on BR2_USE_WCHAR # libglib2 -> gettext
+ help
+ xdg-user-dirs is a tool to help manage "well known" user
+ directories like the desktop folder and the music folder.
+ It also handles localization (i.e. translation) of the
+ filenames.
+
+ https://freedesktop.org/wiki/Software/xdg-user-dirs/
+
+comment "xdg-user-dirs needs a toolchain w/ wchar, locale"
+ depends on !BR2_USE_WCHAR || !BR2_ENABLE_LOCALE
diff --git a/package/xdg-user-dirs/S22xdg-user-dirs-update b/package/xdg-user-dirs/S22xdg-user-dirs-update
new file mode 100644
index 0000000000..ec8f2039b3
--- /dev/null
+++ b/package/xdg-user-dirs/S22xdg-user-dirs-update
@@ -0,0 +1,26 @@
+#!/bin/sh
+set -e
+
+DAEMON="xdg-user-dirs-update"
+XDG_USER_DIRS_UPDATE_ARGS="--force"
+
+start() {
+ printf "Starting %s: " "${DAEMON}"
+ su - root -c "${DAEMON} ${XDG_USER_DIRS_UPDATE_ARGS}"
+ status=$?
+ if [ "${status}" -eq 0 ]; then
+ echo "OK"
+ else
+ echo "FAIL"
+ fi
+ return "${status}"
+}
+
+case "$1" in
+ start)
+ "$1";;
+ *)
+ echo "Usage: xdg-user-dirs-update start"
+ exit 1
+ ;;
+esac
diff --git a/package/xdg-user-dirs/xdg-user-dirs-update.service b/package/xdg-user-dirs/xdg-user-dirs-update.service
new file mode 100644
index 0000000000..438df4a8da
--- /dev/null
+++ b/package/xdg-user-dirs/xdg-user-dirs-update.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Update XDG user dir configuration
+
+[Service]
+Type=oneshot
+EnvironmentFile=-/etc/locale.conf
+ExecStart=/usr/bin/xdg-user-dirs-update --force
+
+[Install]
+WantedBy=default.target
diff --git a/package/xdg-user-dirs/xdg-user-dirs.hash b/package/xdg-user-dirs/xdg-user-dirs.hash
new file mode 100644
index 0000000000..a4d911ee7d
--- /dev/null
+++ b/package/xdg-user-dirs/xdg-user-dirs.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 ec6f06d7495cdba37a732039f9b5e1578bcb296576fde0da40edb2f52220df3c xdg-user-dirs-0.18.tar.gz
+sha256 32b1062f7da84967e7019d01ab805935caa7ab7321a7ced0e30ebe75e5df1670 COPYING
diff --git a/package/xdg-user-dirs/xdg-user-dirs.mk b/package/xdg-user-dirs/xdg-user-dirs.mk
new file mode 100644
index 0000000000..43febe3215
--- /dev/null
+++ b/package/xdg-user-dirs/xdg-user-dirs.mk
@@ -0,0 +1,37 @@
+################################################################################
+#
+# xdg-user-dirs
+#
+################################################################################
+
+XDG_USER_DIRS_VERSION = 0.18
+XDG_USER_DIRS_SITE = http://user-dirs.freedesktop.org/releases
+XDG_USER_DIRS_LICENSE = GPL-2.0
+XDG_USER_DIRS_LICENSE_FILES = COPYING
+XDG_USER_DIRS_CONF_OPTS = \
+ --disable-rpath \
+ --with-gnu-ld
+
+ifeq ($(BR2_PACKAGE_GETTEXT_PROVIDES_LIBINTL),y)
+XDG_USER_DIRS_CONF_OPTS += --with-libintl-prefix=$(STAGING_DIR)/usr
+else
+XDG_USER_DIRS_CONF_OPTS += --without-libintl-prefix
+endif
+
+# We do not want nor need the desktop file.
+define XDG_USER_DIRS_REMOVE_DESKTOP_FILE
+ $(RM) -r $(TARGET_DIR)/etc/xdg/autostart/
+endef
+XDG_USER_DIRS_POST_INSTALL_TARGET_HOOKS += XDG_USER_DIRS_REMOVE_DESKTOP_FILE
+
+define XDG_USER_DIRS_INSTALL_INIT_SYSTEMD
+ $(INSTALL) -D -m 0644 $(XDG_USER_DIRS_PKGDIR)/xdg-user-dirs-update.service \
+ $(TARGET_DIR)/usr/lib/systemd/system/xdg-user-dirs-update.service
+endef
+
+define XDG_USER_DIRS_INSTALL_INIT_SYSV
+ $(INSTALL) -D -m 0755 $(XDG_USER_DIRS_PKGDIR)/S22xdg-user-dirs-update \
+ $(TARGET_DIR)/etc/init.d/S22xdg-user-dirs-update
+endef
+
+$(eval $(autotools-package))
--
2.42.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 13+ messages in thread* [Buildroot] [PATCH/next v2 2/9] package/flutter-sdk-bin: bump version to 3.16.0 2023-11-18 22:11 [Buildroot] [PATCH/next v2 1/9] package/xdg-user-dirs: new package Adam Duskett @ 2023-11-18 22:11 ` Adam Duskett 2023-11-18 22:11 ` [Buildroot] [PATCH/next v2 3/9] package/flutter-engine: " Adam Duskett ` (2 subsequent siblings) 3 siblings, 0 replies; 13+ messages in thread From: Adam Duskett @ 2023-11-18 22:11 UTC (permalink / raw) To: buildroot; +Cc: Adam Duskett --no-analytics and --disable-telemetry have been combined into --disable-analytics Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com> --- package/flutter-sdk-bin/flutter-sdk-bin.hash | 2 +- package/flutter-sdk-bin/flutter-sdk-bin.mk | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/package/flutter-sdk-bin/flutter-sdk-bin.hash b/package/flutter-sdk-bin/flutter-sdk-bin.hash index a204de1807..b5e8f38dae 100644 --- a/package/flutter-sdk-bin/flutter-sdk-bin.hash +++ b/package/flutter-sdk-bin/flutter-sdk-bin.hash @@ -1,3 +1,3 @@ # Locally calculated -sha256 b6bc6f93423488c67110e0fe56523cd2260f3a4c379ed015cd1c7fab66362739 flutter_linux_3.13.9-stable.tar.xz +sha256 5f36e985500ea66e6076d47defc294e4c856f2d9545ef6582af05294687b942c flutter_linux_3.16.0-stable.tar.xz sha256 a598db94b6290ffbe10b5ecf911057b6a943351c727fdda9e5f2891d68700a20 LICENSE diff --git a/package/flutter-sdk-bin/flutter-sdk-bin.mk b/package/flutter-sdk-bin/flutter-sdk-bin.mk index e8e71b6ab0..9461148dfb 100644 --- a/package/flutter-sdk-bin/flutter-sdk-bin.mk +++ b/package/flutter-sdk-bin/flutter-sdk-bin.mk @@ -4,7 +4,7 @@ # ################################################################################ -FLUTTER_SDK_BIN_VERSION = 3.13.9 +FLUTTER_SDK_BIN_VERSION = 3.16.0 FLUTTER_SDK_BIN_SITE = https://storage.googleapis.com/flutter_infra_release/releases/stable/linux FLUTTER_SDK_BIN_SOURCE = flutter_linux_$(FLUTTER_SDK_BIN_VERSION)-stable.tar.xz FLUTTER_SDK_BIN_LICENSE = BSD-3-Clause @@ -24,8 +24,7 @@ HOST_FLUTTER_SDK_BIN_ENV = \ # The following config options must be ran one at a time. HOST_FLUTTER_SDK_BIN_CONF_OPTS = \ --clear-features \ - --no-analytics \ - --disable-telemetry \ + --disable-analytics \ --enable-custom-devices \ --enable-linux-desktop \ --no-enable-android \ -- 2.42.0 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Buildroot] [PATCH/next v2 3/9] package/flutter-engine: bump version to 3.16.0 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 ` 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 3 siblings, 0 replies; 13+ messages in thread From: Adam Duskett @ 2023-11-18 22:11 UTC (permalink / raw) To: buildroot; +Cc: Adam Duskett Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com> --- package/flutter-engine/flutter-engine.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/flutter-engine/flutter-engine.mk b/package/flutter-engine/flutter-engine.mk index d31d435d79..58ebda5ca9 100644 --- a/package/flutter-engine/flutter-engine.mk +++ b/package/flutter-engine/flutter-engine.mk @@ -21,7 +21,7 @@ # # There is no hash provided, as the gn binary (used for configuration) relies # on the .git directories. As such, a reproducible tarball is not possible. -FLUTTER_ENGINE_VERSION = 3.13.9 +FLUTTER_ENGINE_VERSION = 3.16.0 # There is nothing for Buildroot to download. This is handled by gclient. FLUTTER_ENGINE_SITE = -- 2.42.0 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Buildroot] [PATCH/next v2 4/9] package/flutter-engine: Add profile runtime mode selection 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 ` 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 3 siblings, 0 replies; 13+ messages in thread From: Adam Duskett @ 2023-11-18 22:12 UTC (permalink / raw) To: buildroot; +Cc: Adam Duskett There are only two possible modes for Flutter: Debug and release. However, there is a third mode available to users: profile. As Flutter projects can be pretty heavy and consume a lot of resources, it is necessary to allow users to profile their Flutter application during development. Add a new choice: FLUTTER_ENGINE_RUNTIME_MODE_PROFILE. If unselected, the global option BR2_ENABLE_RUNTIME_DEBUG determines whether to build Flutter in release or debug mode. Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com> --- v1 -> v2: Only add the profile option and rely on the global BR2_ENABLE_RUNTIME_DEBUG option for release and debug [Yann] package/flutter-engine/Config.in | 25 ++++++++++++++++++++++++ package/flutter-engine/flutter-engine.mk | 4 +++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/package/flutter-engine/Config.in b/package/flutter-engine/Config.in index 2ec5b90ffd..3c92e40f74 100644 --- a/package/flutter-engine/Config.in +++ b/package/flutter-engine/Config.in @@ -39,6 +39,31 @@ config BR2_PACKAGE_FLUTTER_ENGINE https://github.com/flutter/engine +if BR2_PACKAGE_FLUTTER_ENGINE + +config FLUTTER_ENGINE_RUNTIME_MODE_PROFILE + bool "enable profiling" + help + Some debugging ability is maintained—enough to profile your + apps performance. Profile mode is disabled on the emulator + and simulator, because their behavior is not representative + of real performance. Profile mode is similar to release mode, + with the following differences: + + - Some service extensions, such as the one that enables the + performance overlay, are enabled. + + - Tracing is enabled, and tools supporting source-level + debugging (such as DevTools) can connect to the process. + + If this option is left unselected, the global option + BR2_ENABLE_RUNTIME_DEBUG determines whether to build Flutter + in release or debug mode. + + https://docs.flutter.dev/testing/build-modes#profile + +endif + comment "flutter-engine needs an OpenGL or OpenGLES backend" depends on BR2_PACKAGE_FLUTTER_ENGINE_ARCH_SUPPORTS depends on !BR2_PACKAGE_HAS_LIBGL && !BR2_PACKAGE_HAS_LIBGLES diff --git a/package/flutter-engine/flutter-engine.mk b/package/flutter-engine/flutter-engine.mk index 58ebda5ca9..d0ce792c44 100644 --- a/package/flutter-engine/flutter-engine.mk +++ b/package/flutter-engine/flutter-engine.mk @@ -52,7 +52,9 @@ FLUTTER_ENGINE_TARGET_ARCH = x64 FLUTTER_ENGINE_TARGET_TRIPPLE = x86_64-unknown-linux-gnu endif -ifeq ($(BR2_ENABLE_RUNTIME_DEBUG),y) +ifeq ($(FLUTTER_ENGINE_RUNTIME_MODE_PROFILE),y) +FLUTTER_ENGINE_RUNTIME_MODE=profile +else ifeq ($(BR2_ENABLE_RUNTIME_DEBUG),y) FLUTTER_ENGINE_RUNTIME_MODE=debug else FLUTTER_ENGINE_RUNTIME_MODE=release -- 2.42.0 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Buildroot] [PATCH/next v2 5/9] package/flutter-sdk-bin/Config.in.host: add pub-cache location option 2023-11-18 22:11 [Buildroot] [PATCH/next v2 1/9] package/xdg-user-dirs: new package Adam Duskett ` (2 preceding siblings ...) 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 ` Adam Duskett 2023-11-19 8:21 ` Yann E. MORIN 2023-11-19 20:43 ` Arnout Vandecappelle via buildroot 3 siblings, 2 replies; 13+ messages in thread From: Adam Duskett @ 2023-11-18 22:12 UTC (permalink / raw) To: buildroot; +Cc: Adam Duskett 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 <adam.duskett@amarulasolutions.com> --- package/flutter-sdk-bin/Config.in.host | 11 +++++++++++ package/flutter-sdk-bin/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. 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/flutter-sdk-bin.mk b/package/flutter-sdk-bin/flutter-sdk-bin.mk index 9461148dfb..6471c11d4e 100644 --- a/package/flutter-sdk-bin/flutter-sdk-bin.mk +++ b/package/flutter-sdk-bin/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)) -- 2.42.0 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [Buildroot] [PATCH/next v2 5/9] package/flutter-sdk-bin/Config.in.host: add pub-cache location option 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 20:43 ` Arnout Vandecappelle via buildroot 1 sibling, 1 reply; 13+ messages in thread From: Yann E. MORIN @ 2023-11-19 8:21 UTC (permalink / raw) To: Adam Duskett; +Cc: buildroot On 2023-11-18 15:12 -0700, Adam Duskett spake thusly: > 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. So, this is for caching the downloaded artefacts. It should probably be non-configurable, and should be moved into a sub-directory iof BR2_DL_DIR, like we have for cargo: 8450b7691870 package/pkg-cargo: move CARGO_HOME into DL_DIR So I would suggest that we do similar for the flutter download cache. As for wanted to commit that downladed stuff to git: if people want that, then they would also want to commit all ofthe download stuff, so just have them point BR2_DL_DIR to a sub-dir of their outter repository. Regards, Yann E. MORIN. > Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com> > --- > package/flutter-sdk-bin/Config.in.host | 11 +++++++++++ > package/flutter-sdk-bin/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. > > 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/flutter-sdk-bin.mk b/package/flutter-sdk-bin/flutter-sdk-bin.mk > index 9461148dfb..6471c11d4e 100644 > --- a/package/flutter-sdk-bin/flutter-sdk-bin.mk > +++ b/package/flutter-sdk-bin/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)) > -- > 2.42.0 > > _______________________________________________ > 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 ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Buildroot] [PATCH/next v2 5/9] package/flutter-sdk-bin/Config.in.host: add pub-cache location option 2023-11-19 8:21 ` Yann E. MORIN @ 2023-11-19 17:47 ` Adam Duskett 2023-11-19 19:45 ` Yann E. MORIN 0 siblings, 1 reply; 13+ messages in thread From: Adam Duskett @ 2023-11-19 17:47 UTC (permalink / raw) To: Yann E. MORIN, Thomas Petazzoni; +Cc: buildroot [-- Attachment #1.1: Type: text/plain, Size: 4821 bytes --] This one we should discuss. While it's reasonable to set a default to either dl/flutter-pub-cache or dl/pub-cache (your choice obviously!), we should still have this as a configurable string. 1) The work is already done, and most users won't change the default. 2) When developing an application, the pub-cache directory may be somewhere more convenient for the developer. Maybe they want to use ~/.pub-cache, or in my case /home/adam/projects/${company}/${project}/pub-cache This allows users to not have to re-download the pub-cache if it already exists on their system. As Thomas seems interested in Flutter, I'll also bring him in for his thoughts. Thanks so much for the quick response! Adam Duskett Senior Embedded Systems Developer adam.duskett@amarulasolutions.com __________________________________ Amarula Solutions BV Joop Geesinkweg 125, 1114 AB, Amsterdam, NL T. +31 (0)85 111 9170 info@amarulasolutions.com www.amarulasolutions.com On Sun, Nov 19, 2023 at 1:21 AM Yann E. MORIN <yann.morin.1998@free.fr> wrote: > On 2023-11-18 15:12 -0700, Adam Duskett spake thusly: > > 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. > > So, this is for caching the downloaded artefacts. It should probably be > non-configurable, and should be moved into a sub-directory iof > BR2_DL_DIR, like we have for cargo: > > 8450b7691870 package/pkg-cargo: move CARGO_HOME into DL_DIR > > So I would suggest that we do similar for the flutter download cache. > > As for wanted to commit that downladed stuff to git: if people want > that, then they would also want to commit all ofthe download stuff, so > just have them point BR2_DL_DIR to a sub-dir of their outter repository. > > Regards, > Yann E. MORIN. > > > Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com> > > --- > > package/flutter-sdk-bin/Config.in.host | 11 +++++++++++ > > package/flutter-sdk-bin/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. > > > > 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/flutter-sdk-bin.mk > b/package/flutter-sdk-bin/flutter-sdk-bin.mk > > index 9461148dfb..6471c11d4e 100644 > > --- a/package/flutter-sdk-bin/flutter-sdk-bin.mk > > +++ b/package/flutter-sdk-bin/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)) > > -- > > 2.42.0 > > > > _______________________________________________ > > 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. | > > '------------------------------^-------^------------------^--------------------' > [-- Attachment #1.2: Type: text/html, Size: 9125 bytes --] [-- Attachment #2: Type: text/plain, Size: 150 bytes --] _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Buildroot] [PATCH/next v2 5/9] package/flutter-sdk-bin/Config.in.host: add pub-cache location option 2023-11-19 17:47 ` Adam Duskett @ 2023-11-19 19:45 ` Yann E. MORIN 2023-11-19 20:41 ` Arnout Vandecappelle via buildroot 0 siblings, 1 reply; 13+ messages in thread From: Yann E. MORIN @ 2023-11-19 19:45 UTC (permalink / raw) To: Adam Duskett; +Cc: Thomas Petazzoni, buildroot Adam, All, On 2023-11-19 10:47 -0700, Adam Duskett spake thusly: > This one we should discuss. This is exactly what a review is for. > While it's reasonable to set a default to either dl/flutter-pub-cache or dl/pub-cache (your choice obviously!), I was thinking more like we did for cargo, as I hinted earlier by pointing to the commit which introduced it (8450b7691870): BR_CARGO_HOME = $(DL_DIR)/br-cargo-home So: FLUTTER_SDK_BIN_PUB_CACHE = $(DL_DIR)/br-flutter-pub-cache (As Thomas pointed out on IRC, DL_DIR is just the internal variable that gets set from BR2_DL_DIR; in all practical matters, they are the same.) > we should still have this as a configurable string. > 1) The work is already done, and most users won't change the default. "The work is done" is not a valid argument for applying a patch, otherwise we would just blindly apply all and every patches that are submitted, on the rationale that "the work is done". > 2) When developing an application, the pub-cache directory may be somewhere more convenient for the developer. > Maybe they want to use ~/.pub-cache, or in my case /home/adam/projects/${company}/${project}/pub-cache > This allows users to not have to re-download the pub-cache if it already exists on their system. If one wants to avoid re-downloading stuff again and again, one has already set BR2_DL_DIR in their environment and thus storing the flutter pub-cache there, is indeed exactly what we want to do. As for sharing the pub-cache with something outside of Buildroot, I would argue against. Sharing with the ouside world means we no longer have exclusivity, and thus we risk conflicts on access. We never account for out-of-Buildroot use of our caches. Regards, Yann E. MORIN. > As Thomas seems interested in Flutter, I'll also bring him in for his thoughts. > Thanks so much for the quick response! > Adam Duskett > > Senior Embedded Systems Developer > > [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:21 AM Yann E. MORIN < [4]yann.morin.1998@free.fr> wrote: > > On 2023-11-18 15:12 -0700, Adam Duskett spake thusly: > > 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. > > So, this is for caching the downloaded artefacts. It should probably be > non-configurable, and should be moved into a sub-directory iof > BR2_DL_DIR, like we have for cargo: > > 8450b7691870 package/pkg-cargo: move CARGO_HOME into DL_DIR > > So I would suggest that we do similar for the flutter download cache. > > As for wanted to commit that downladed stuff to git: if people want > that, then they would also want to commit all ofthe download stuff, so > just have them point BR2_DL_DIR to a sub-dir of their outter repository. > > Regards, > Yann E. MORIN. > > > 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)) > > -- > > 2.42.0 > > > > _______________________________________________ > > buildroot mailing list > > [12]buildroot@buildroot.org > > [13]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 | > | [14]http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | > '------------------------------^-------^------------------^--------------------' > > Links: > 1. mailto:adam.duskett@amarulasolutions.com > 2. mailto:info@amarulasolutions.com > 3. http://www.amarulasolutions.com/ > 4. mailto:yann.morin.1998@free.fr > 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 > 12. mailto:buildroot@buildroot.org > 13. https://lists.buildroot.org/mailman/listinfo/buildroot > 14. http://ymorin.is-a-geek.org/ > _______________________________________________ > 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 ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Buildroot] [PATCH/next v2 5/9] package/flutter-sdk-bin/Config.in.host: add pub-cache location option 2023-11-19 19:45 ` Yann E. MORIN @ 2023-11-19 20:41 ` Arnout Vandecappelle via buildroot 0 siblings, 0 replies; 13+ messages in thread From: Arnout Vandecappelle via buildroot @ 2023-11-19 20:41 UTC (permalink / raw) To: Yann E. MORIN, Adam Duskett; +Cc: Thomas Petazzoni, buildroot On 19/11/2023 20:45, Yann E. MORIN wrote: > Adam, All, > > On 2023-11-19 10:47 -0700, Adam Duskett spake thusly: >> This one we should discuss. > > This is exactly what a review is for. > >> While it's reasonable to set a default to either dl/flutter-pub-cache or dl/pub-cache (your choice obviously!), > > I was thinking more like we did for cargo, as I hinted earlier by > pointing to the commit which introduced it (8450b7691870): > > BR_CARGO_HOME = $(DL_DIR)/br-cargo-home > > So: > > FLUTTER_SDK_BIN_PUB_CACHE = $(DL_DIR)/br-flutter-pub-cache +1 > > (As Thomas pointed out on IRC, DL_DIR is just the internal variable that > gets set from BR2_DL_DIR; in all practical matters, they are the same.) > >> we should still have this as a configurable string. >> 1) The work is already done, and most users won't change the default. > > "The work is done" is not a valid argument for applying a patch, > otherwise we would just blindly apply all and every patches that are > submitted, on the rationale that "the work is done". > >> 2) When developing an application, the pub-cache directory may be somewhere more convenient for the developer. >> Maybe they want to use ~/.pub-cache, or in my case /home/adam/projects/${company}/${project}/pub-cache >> This allows users to not have to re-download the pub-cache if it already exists on their system. > > If one wants to avoid re-downloading stuff again and again, one has > already set BR2_DL_DIR in their environment and thus storing the flutter > pub-cache there, is indeed exactly what we want to do. > > As for sharing the pub-cache with something outside of Buildroot, I > would argue against. Sharing with the ouside world means we no longer > have exclusivity, and thus we risk conflicts on access. We never > account for out-of-Buildroot use of our caches. AFAIU, this is a cache that is not managed by Buildroot at all, but rather it is managed by whatever flutter tool we are using to manage downloads. AFAIU, the downloads actually happen during the build rather than the download stage even... So I don't think "we no longer have exclusivity" is really much of a factor. That said, I do think this is enough of a corner case that it doesn't need a config option. It's easy enough to symlink dl/br-flutter-pub-cache to whereever your flutter cache is. Regards, Arnout > > Regards, > Yann E. MORIN. > >> As Thomas seems interested in Flutter, I'll also bring him in for his thoughts. >> Thanks so much for the quick response! >> Adam Duskett >> >> Senior Embedded Systems Developer >> >> [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:21 AM Yann E. MORIN < [4]yann.morin.1998@free.fr> wrote: >> >> On 2023-11-18 15:12 -0700, Adam Duskett spake thusly: >> > 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. >> >> So, this is for caching the downloaded artefacts. It should probably be >> non-configurable, and should be moved into a sub-directory iof >> BR2_DL_DIR, like we have for cargo: >> >> 8450b7691870 package/pkg-cargo: move CARGO_HOME into DL_DIR >> >> So I would suggest that we do similar for the flutter download cache. >> >> As for wanted to commit that downladed stuff to git: if people want >> that, then they would also want to commit all ofthe download stuff, so >> just have them point BR2_DL_DIR to a sub-dir of their outter repository. >> >> Regards, >> Yann E. MORIN. >> >> > 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)) >> > -- >> > 2.42.0 >> > >> > _______________________________________________ >> > buildroot mailing list >> > [12]buildroot@buildroot.org >> > [13]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 | >> | [14]http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | >> '------------------------------^-------^------------------^--------------------' >> >> Links: >> 1. mailto:adam.duskett@amarulasolutions.com >> 2. mailto:info@amarulasolutions.com >> 3. http://www.amarulasolutions.com/ >> 4. mailto:yann.morin.1998@free.fr >> 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 >> 12. mailto:buildroot@buildroot.org >> 13. https://lists.buildroot.org/mailman/listinfo/buildroot >> 14. http://ymorin.is-a-geek.org/ > >> _______________________________________________ >> buildroot mailing list >> buildroot@buildroot.org >> https://lists.buildroot.org/mailman/listinfo/buildroot > > _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Buildroot] [PATCH/next v2 5/9] package/flutter-sdk-bin/Config.in.host: add pub-cache location option 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 20:43 ` Arnout Vandecappelle via buildroot 2023-11-19 21:08 ` Adam Duskett 1 sibling, 1 reply; 13+ messages in thread From: Arnout Vandecappelle via buildroot @ 2023-11-19 20:43 UTC (permalink / raw) To: Adam Duskett, buildroot 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 <adam.duskett@amarulasolutions.com> > --- > package/flutter-sdk-bin/Config.in.host | 11 +++++++++++ > package/flutter-sdk-bin/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. > > 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/flutter-sdk-bin.mk b/package/flutter-sdk-bin/flutter-sdk-bin.mk > index 9461148dfb..6471c11d4e 100644 > --- a/package/flutter-sdk-bin/flutter-sdk-bin.mk > +++ b/package/flutter-sdk-bin/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 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Buildroot] [PATCH/next v2 5/9] package/flutter-sdk-bin/Config.in.host: add pub-cache location option 2023-11-19 20:43 ` Arnout Vandecappelle via buildroot @ 2023-11-19 21:08 ` Adam Duskett 2023-11-19 21:53 ` Yann E. MORIN 0 siblings, 1 reply; 13+ messages in thread From: Adam Duskett @ 2023-11-19 21:08 UTC (permalink / raw) To: Arnout Vandecappelle; +Cc: buildroot [-- Attachment #1.1: Type: text/plain, Size: 3677 bytes --] I'll change the patch to set a default to $(DL_DIR)/br-flutter-pub-cache. That seems reasonable and a small change. Adam Duskett Senior Embedded Systems Developer M. +1208-515-8102 adam.duskett@amarulasolutions.com __________________________________ Amarula Solutions BV Joop Geesinkweg 125, 1114 AB, Amsterdam, NL T. +31 (0)85 111 9170 info@amarulasolutions.com www.amarulasolutions.com On Sun, Nov 19, 2023 at 1:43 PM Arnout Vandecappelle <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 <adam.duskett@amarulasolutions.com> > > --- > > package/flutter-sdk-bin/Config.in.host | 11 +++++++++++ > > package/flutter-sdk-bin/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. > > > > 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/flutter-sdk-bin.mk > b/package/flutter-sdk-bin/flutter-sdk-bin.mk > > index 9461148dfb..6471c11d4e 100644 > > --- a/package/flutter-sdk-bin/flutter-sdk-bin.mk > > +++ b/package/flutter-sdk-bin/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 > [-- Attachment #1.2: Type: text/html, Size: 8042 bytes --] [-- Attachment #2: Type: text/plain, Size: 150 bytes --] _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Buildroot] [PATCH/next v2 5/9] package/flutter-sdk-bin/Config.in.host: add pub-cache location option 2023-11-19 21:08 ` Adam Duskett @ 2023-11-19 21:53 ` Yann E. MORIN 2023-11-20 16:40 ` Adam Duskett 0 siblings, 1 reply; 13+ messages in thread From: Yann E. MORIN @ 2023-11-19 21:53 UTC (permalink / raw) To: Adam Duskett; +Cc: buildroot 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 ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Buildroot] [PATCH/next v2 5/9] package/flutter-sdk-bin/Config.in.host: add pub-cache location option 2023-11-19 21:53 ` Yann E. MORIN @ 2023-11-20 16:40 ` Adam Duskett 0 siblings, 0 replies; 13+ messages in thread From: Adam Duskett @ 2023-11-20 16:40 UTC (permalink / raw) To: Yann E. MORIN; +Cc: buildroot [-- Attachment #1.1: Type: text/plain, Size: 6400 bytes --] Yann; I understand. However, after sleeping on the issue, I have decided to politely decline changing the patch to be hardcoded. It's too much bikeshedding and testing. The original patch solved the issue and I don't see a good reason to change it just because of a dislike for config options. If you want to personally submit a patch that better adheres to your vision of what the flutter package should look like you are more than welcome to do so! I can decline this patch series if you wish me to do so. Thanks again! Adam Duskett Senior Embedded Systems Developer adam.duskett@amarulasolutions.com __________________________________ Amarula Solutions BV Joop Geesinkweg 125, 1114 AB, Amsterdam, NL T. +31 (0)85 111 9170 info@amarulasolutions.com www.amarulasolutions.com On Sun, Nov 19, 2023 at 2:53 PM Yann E. MORIN <yann.morin.1998@free.fr> wrote: > 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. | > > '------------------------------^-------^------------------^--------------------' > [-- Attachment #1.2: Type: text/html, Size: 12441 bytes --] [-- Attachment #2: Type: text/plain, Size: 150 bytes --] _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2023-11-20 16:41 UTC | newest] Thread overview: 13+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 2023-11-20 16:40 ` Adam Duskett
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.