[Buildroot] [PATCH] package/mono: allow to select which folders to install to target

Thomas Petazzoni thomas.petazzoni at bootlin.com
Mon Oct 31 12:25:19 UTC 2022


Hello Giulio,

On Wed, 19 Oct 2022 01:46:17 +0200
Giulio Benetti <giulio.benetti at benettiengineering.com> wrote:

> At the moment all APIs folders are copied to target increasing the size of
> rootfs of ~190MB. Allow to select which API folders we want to copy to
> target to shrink rootfs down.
> 
> Signed-off-by: Giulio Benetti <giulio.benetti at benettiengineering.com>

Thanks for proposing this.

Practically speaking, could you describe which folders are needed in a
typical scenario you've had?

Here, I have these ones:

drwxr-xr-x   2 thomas thomas  4096 oct.  25 22:58 2.0-api
drwxr-xr-x   2 thomas thomas  4096 oct.  25 22:58 3.5-api
drwxr-xr-x   2 thomas thomas  4096 oct.  25 22:56 4.0
drwxr-xr-x   2 thomas thomas 12288 oct.  25 22:58 4.0-api
drwxr-xr-x   4 thomas thomas 16384 oct.  25 22:58 4.5
drwxr-xr-x   3 thomas thomas 12288 oct.  25 22:58 4.5.1-api
drwxr-xr-x   3 thomas thomas 12288 oct.  25 22:58 4.5.2-api
drwxr-xr-x   3 thomas thomas 12288 oct.  25 22:58 4.5-api
drwxr-xr-x   3 thomas thomas 12288 oct.  25 22:58 4.6.1-api
drwxr-xr-x   3 thomas thomas 12288 oct.  25 22:58 4.6.2-api
drwxr-xr-x   3 thomas thomas 12288 oct.  25 22:58 4.6-api
drwxr-xr-x   3 thomas thomas 12288 oct.  25 22:58 4.7.1-api
drwxr-xr-x   3 thomas thomas 12288 oct.  25 22:58 4.7.2-api
drwxr-xr-x   3 thomas thomas 12288 oct.  25 22:58 4.7-api
drwxr-xr-x   3 thomas thomas 12288 oct.  25 22:58 4.8-api
drwxr-xr-x 145 thomas thomas 12288 oct.  25 22:56 gac
drwxr-xr-x   2 thomas thomas  4096 oct.  25 22:56 lldb
drwxr-xr-x   3 thomas thomas  4096 oct.  25 22:56 mono-configuration-crypto
drwxr-xr-x   2 thomas thomas  4096 oct.  25 22:56 monodoc
drwxr-xr-x   3 thomas thomas  4096 oct.  25 22:56 msbuild
drwxr-xr-x   6 thomas thomas  4096 oct.  25 22:56 xbuild
drwxr-xr-x   4 thomas thomas  4096 oct.  25 22:56 xbuild-frameworks

> +config BR2_PACKAGE_MONO_SPECIFY_FOLDERS_TO_INSTALL
> +	bool "Specify folders to install to target"
> +	help
> +	  Allow to specify which Mono folder to install to target

I don't really have a very good suggestion, but I don't like the name
of the option. We rarely have option names that are "sentences", i.e
"specify folders to install" is a sentence.

Should we instead have a single string option
BR2_PACKAGE_MONO_INSTALL_LIB_DIRS, which is empty by default. When
empty, it means all folders are installed. Otherwise, only the
specified folders are installed.

The other obvious question is whether this shouldn't simply be left as
something to do in a post-build script. Even though I admit that
reducing 190 MB down to something reasonable can be seen as something
that is almost mandatory.

Or alternatively, do we have a better way, where we could automate this
selection of which folders are needed?

Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com



More information about the buildroot mailing list