[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-dev
Subject:    Re: [gentoo-dev] [RFC] How to deal with LINGUAS mess?
From:       Andrew Savchenko <bircoph () gentoo ! org>
Date:       2016-05-30 10:47:53
Message-ID: 20160530134753.137dff46089dae16f73f2abb () gentoo ! org
[Download RAW message or body]


On Sun, 29 May 2016 14:58:03 +0200 Michał Górny wrote:
> On Sat, 21 May 2016 11:19:07 -0400
> waltdnes@waltdnes.org wrote:
> 
> > On Sat, May 21, 2016 at 09:41:28AM +0200, Micha?? Górny wrote
> > 
> > > I see the following possibilities:
> > > 
> > > 1. We start explicitly listing linguas_* in all ebuilds, no matter how
> > > tiny they are. Maintainers are required to keep IUSE up-to-date
> > > and users are forced to rebuild a lot. This is also a QA violation
> > > in terms of invalid use of USE flags.
> > > 
> > > 2. We hack-unset LINGUAS in ebuilds. This is a lot of effort, easy to
> > > miss and probably would need to repeated for every single phase anyway
> > > due to how global variables are handled in PMS. Additionally, it may
> > > break at some point since those variables are likely expected to be
> > > read-only anyway.
> > > 
> > > 3. We remove LINGUAS from USE_EXPAND and stop using it. If ebuilds have
> > > a good reason to use flags for localization, we introduce a new,
> > > non-colliding USE_EXPAND for that. We also ask users to replace LINGUAS
> > > with the new flag in their make.conf files. LINGUAS gets the original
> > > upstream behavior back, and we eventually discourage it in favor of new
> > > INSTALL_MASK features (WiP) [2].
> > > 
> > > 4. We fix build systems not to do magic depending on whether LINGUAS
> > > is unset or set-to-empty. Instead, we could some special special value
> > > like '-' to signify not installing localizations at all. But that's
> > > upstream thing to do, and breaks backwards compatibility with existing
> > > systems disabling localizations.
> > > 
> > > 
> > > Your thoughts?  
> > 
> > 5. An reversed variant of INSTALL_MASK in make.conf, e.g.
> > LOCALE_ALLOW="foo bar fubar"
> > 
> > which would block installing files in /usr/share/locale/* and
> > /usr/share/man/* EXCEPT for...
> > 
> > /usr/share/locale/foo
> > /usr/share/locale/bar
> > /usr/share/locale/fubar
> > /usr/share/man/foo
> > /usr/share/man/bar
> > /usr/share/man/fubar
> 
> This can be accomplished using inclusion/exclusion logic included in
> the patches I've recently sent for Portage.
> 
>   INSTALL_MASK="/usr/share/locale -/usr/share/locale/foo"
 
A proper way will be to fix ebuilds to respect LINGUAS properly.
l10n.eclass makes this quite easy. Build and install files just to
remove them later before/after merge to a live system is ridiculous,
especially considering that LINGUAS covers not only manuals, but
also html docs and other files.

Why users should care about additional INSTALL_MASK ordeal if they
already set up LINGUAS properly? This is PM and ebuild maintainers
job.

The same states for cron, systemd, logrotate and other potentially
unneeded files. Install mask is dangerous, very dangerous, because
locations may move, mandatory files may have accidentally removed
by an oversight. INSTALL_MASK is indeed useful, essential tool and
it is nice that it is being extended, but it should be a last
resort way to fix stuff, not a recommended technique.

The real problem is that "small files" control creates much burden
for package maintainers. It should be fixed by versatile and easy
to use eclasses, ideally the most popular helpers should go to PMS,
e.g. to default src_install().

Moving all burden of "small files" control and optional cleanup
from developers to users is not nice.

Best regards,
Andrew Savchenko

[Attachment #3 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic