[MacPorts] #50776: PortGroup/"base" extension suggestion : locale_select
MacPorts
noreply at macports.org
Thu Sep 1 20:21:02 PDT 2016
#50776: PortGroup/"base" extension suggestion : locale_select
--------------------------+--------------------------------
Reporter: rjvbertin@… | Owner: macports-tickets@…
Type: submission | Status: new
Priority: Normal | Milestone:
Component: base | Version:
Resolution: | Keywords:
Port: |
--------------------------+--------------------------------
Old description:
> As suggested elsewhere
> (https://trac.macports.org/ticket/49051#comment:17) I propose a new
> PortGroup which might inspire an extension of "base".
>
> The aim is to allow users who don't like or cannot afford to waste disk
> space (on things they don't use) to reduce the number of translations
> installed by ports. A good example is port:VLC : this one consists for
> over 50% of translations, most of which will never be used by the (vast)
> majority of users. That may be "only" around 37Mb, which is why I've
> hesitated a bit to make this proposal. Still, leaving only the en_GB, fr
> and nl translations that overhead shrinks to about 1.2Mb .
>
> The principle of this PortGroup is simple: if adds a variant (tentatively
> called `langselect`) which adds a post-destroot block that prunes
> translations from ${destroot}${prefix}/share/locale, leaving only
> translations the user is interested in.
> This happens only when the variant is active, of course, but also
> requires the user to list the translation(s) s/he is interested in. Those
> desired translations are read from a list assignment to a variable
> called`keep_languages` in ${prefix}/etc/macports/locales.tcl. A
> locales.conf file would be nicer but I didn't want to spend too much time
> figuring out how to write a parser for that kind of file.
>
> Currently the code only removes translations from the share/locale
> directory, but one could extend the principle to prune unwanted .lproj
> directories too.
New description:
As suggested [comment:ticket:49051:17 elsewhere] I propose a new PortGroup
which might inspire an extension of "base".
The aim is to allow users who don't like or cannot afford to waste disk
space (on things they don't use) to reduce the number of translations
installed by ports. A good example is port:VLC : this one consists for
over 50% of translations, most of which will never be used by the (vast)
majority of users. That may be "only" around 37Mb, which is why I've
hesitated a bit to make this proposal. Still, leaving only the en_GB, fr
and nl translations that overhead shrinks to about 1.2Mb .
The principle of this PortGroup is simple: if adds a variant (tentatively
called `langselect`) which adds a post-destroot block that prunes
translations from ${destroot}${prefix}/share/locale, leaving only
translations the user is interested in.
This happens only when the variant is active, of course, but also requires
the user to list the translation(s) s/he is interested in. Those desired
translations are read from a list assignment to a variable
called`keep_languages` in ${prefix}/etc/macports/locales.tcl. A
locales.conf file would be nicer but I didn't want to spend too much time
figuring out how to write a parser for that kind of file.
Currently the code only removes translations from the share/locale
directory, but one could extend the principle to prune unwanted .lproj
directories too.
--
Comment (by ryandesign@…):
Suppose a user wants to take advantage of this feature, but they have
already installed a lot of ports. How will they do that? After having
indicated their preferred locale, would they then have to deactivate and
reactivate all affected ports, which would then prune the unwanted
locales? How would the user determine which ports are affected? Or would
the user have to deactivate and reactivate all ports?
Suppose a user has taken advantage of this feature, and now wants to stop
using it. How do they get back the other locales? Same questions again. Do
they have to deactivate and reactivate all ports?
I am not wild about this proposal because it is contrary to the principle
we've used in MacPorts so far, which is that each port provides a complete
set of files and features, even if not every user will use every file or
feature. For example, we don't declare variants for every possible
configure option; we make a best guess as to the features that would be
helpful for most users, then provide variants for esoteric features that
would require lots of extra disk space or dependencies. I worry that you
will expand your request to add features for removing other aspects of
ports that you personally don't need.
There are existing Mac apps, outside of MacPorts, that help you reclaim
disk space by deleting unwanted translations, architectures, etc. You
could probably use those apps to prune the files installed by MacPorts.
I'm not convinced we need to duplicate this feature in MacPorts.
--
Ticket URL: <https://trac.macports.org/ticket/50776#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list