Re: [gentoo-dev] vim-syntax USE flag

2017-07-25 Thread Hans de Graaff
On Mon, 2017-07-24 at 12:10 +0200, Ulrich Mueller wrote:
> 
> Similarly, if we get rid of the vim-syntax flag, should we phase out
> the emacs USE flag, too?

I would say no because in almost all cases the emacs code needs to be
compiled and that requires emacs to be present.

As far as I understand installing a vim syntax file does not require
compilation and can therefore be done without having vim on the system.

Hans

signature.asc
Description: This is a digitally signed message part


Re: [gentoo-dev] vim-syntax USE flag

2017-07-24 Thread Mike Gilbert
On Sun, Jul 23, 2017 at 11:46 AM, Ciaran McCreesh
 wrote:
> On Sat, 22 Jul 2017 16:27:39 -0400
> Mike Gilbert  wrote:
>> Packages currently handle installation of vim syntax support files
>> inconsistently. Some builds install the files if the "vim-syntax" USE
>> flag is enabled, while others install them unconditionally.
>>
>> Do these files fall into the "small text files" category for
>> unconditional installation? If so, we should probably phase out the
>> vim-syntax USE flag.
>>
>> If we want to keep the USE flag, I would suggest documenting a global
>> policy regarding its use. Should that live in the devmanual? Or maybe
>> the Vim project page?
>
> One potential issue is help files: any Vim plugin that comes with
> documentation needs a little script (which requires Vim to be installed)
> to be run in pkg_postinst.

Thanks for pointing that out. Sounds like we need some documentation
on how to properly install vim-related files.



Re: [gentoo-dev] vim-syntax USE flag

2017-07-24 Thread Ulrich Mueller
> On Mon, 24 Jul 2017, Mike Gilbert wrote:

>> The flag also pulls in additional dependencies for some ebuilds.
>> So I wonder how it could be made unconditional? For example,
>> app-admin/eselect[vim-syntax] depends on app-vim/eselect-syntax
>> which in turn will pull in vim or gvim. Certainly not all users
>> would want that?

> I was unaware that the USE flag sometimes introduces additional
> dependencies. That being the case, we should certainly keep it.

A quick scan shows that about 100 ebuilds in the tree have such a
USE-conditional dependency.

>> Similarly, if we get rid of the vim-syntax flag, should we phase
>> out the emacs USE flag, too?

> Does this also pull in optional dependencies?

Yes, most of the time it does.

Also, last time I had a (non-Emacs) package unconditionally install
Emacs support, there were complaints by "religious" users who wanted
to keep their systems 100% Emacs free. ;-)

Ulrich


pgplS6G1tXxmX.pgp
Description: PGP signature


Re: [gentoo-dev] vim-syntax USE flag

2017-07-24 Thread Mike Gilbert
On Mon, Jul 24, 2017 at 6:10 AM, Ulrich Mueller  wrote:
>> On Sat, 22 Jul 2017, Mike Gilbert wrote:
>
>> Packages currently handle installation of vim syntax support files
>> inconsistently. Some builds install the files if the "vim-syntax"
>> USE flag is enabled, while others install them unconditionally.
>
>> Do these files fall into the "small text files" category for
>> unconditional installation? If so, we should probably phase out the
>> vim-syntax USE flag.
>
> The flag also pulls in additional dependencies for some ebuilds.
> So I wonder how it could be made unconditional? For example,
> app-admin/eselect[vim-syntax] depends on app-vim/eselect-syntax
> which in turn will pull in vim or gvim. Certainly not all users would
> want that?

I was unaware that the USE flag sometimes introduces additional
dependencies. That being the case, we should certainly keep it.

> Similarly, if we get rid of the vim-syntax flag, should we phase out
> the emacs USE flag, too?

Does this also pull in optional dependencies?



Re: [gentoo-dev] vim-syntax USE flag

2017-07-24 Thread Ulrich Mueller
> On Sat, 22 Jul 2017, Mike Gilbert wrote:

> Packages currently handle installation of vim syntax support files
> inconsistently. Some builds install the files if the "vim-syntax"
> USE flag is enabled, while others install them unconditionally.

> Do these files fall into the "small text files" category for
> unconditional installation? If so, we should probably phase out the
> vim-syntax USE flag.

The flag also pulls in additional dependencies for some ebuilds.
So I wonder how it could be made unconditional? For example,
app-admin/eselect[vim-syntax] depends on app-vim/eselect-syntax
which in turn will pull in vim or gvim. Certainly not all users would
want that?

Similarly, if we get rid of the vim-syntax flag, should we phase out
the emacs USE flag, too?

Ulrich


pgpLAaW8dAPlN.pgp
Description: PGP signature


Re: [gentoo-dev] vim-syntax USE flag

2017-07-23 Thread Walter Dnes
On Sun, Jul 23, 2017 at 05:46:04PM +0300, Andrew Savchenko wrote
> On Sat, 22 Jul 2017 22:00:16 +0100 Sergei Trofimovich wrote:
> > On Sat, 22 Jul 2017 16:27:39 -0400
> > Mike Gilbert  wrote:
> > 
> > > Packages currently handle installation of vim syntax support files
> > > inconsistently. Some builds install the files if the "vim-syntax" USE
> > > flag is enabled, while others install them unconditionally.

  This reminds me of /usr/share/locale/*/LC_MESSAGES/ and
/usr/share/man/*/man/.  There seem to be a lot of packages
that are hardcoded by upstream to install umpteen locales of this stuff.

> > > 
> > > Do these files fall into the "small text files" category for
> > > unconditional installation? If so, we should probably phase out the
> > > vim-syntax USE flag.
> > 
> > I'd say use flag is not needed as long as it does not slow vim startup
> > down by much and does not change editor behaviour for every single
> > edited file type.
> 
> The problem here is more complicated. What about 100 plugins from
> different packages which of them is fast enough, but together they
> are slowing vim down to unacceptable level? Such case is
> especially sensitive on slow hardware.
> 
> That's why fine control over vim files is mandatory. Yes, it
> requires to rebuild packages, but with ccache/distcc available this
> is not a huge issue. And if someone really want to avoid such
> rebuilds, vim files can always be put to a separated package;
> though I see no real reason to do this.
> 
> Using INSTALL_MASK here is not an option, because toggling of
> individual vim files using it will be a nightmare.

  A heavy-handed solution to the extra man pages and LC_MESSAGES stuff
I mentioned above, is "localepurge".  The file "/etc/locale.nopurge"
contains a list of locales to *NOT* purge.  LC_MESSAGES and man pages
for all other locales are wiped.  I'm not a professional programmer, but
the following approach looks promising...

Option A) A standalone program/script called "vimodulepurge" which would
consult a file "/etc/vimodule.nopurge".  The algorithm would be to
"equery b" for each module in the module directory.  If the owner of the
module is not listed in "/etc/vimodule.nopurge", delete the module.

Option B) Integrate this functionality into Portage.  During the install
process, check if the ebuild being installed is listed in
"/etc/vimodule.nopurge".  If not, skip installing files into the vim
modules directory.  If "/etc/vimodule.nopurge" doesn't exist, or
"NEEDSCONFIGFIRST" has not been commented out, allow the modules to be
installed.

-- 
Walter Dnes 
I don't run "desktop environments"; I run useful applications



Re: [gentoo-dev] vim-syntax USE flag

2017-07-23 Thread Ciaran McCreesh
On Sat, 22 Jul 2017 16:27:39 -0400
Mike Gilbert  wrote:
> Packages currently handle installation of vim syntax support files
> inconsistently. Some builds install the files if the "vim-syntax" USE
> flag is enabled, while others install them unconditionally.
> 
> Do these files fall into the "small text files" category for
> unconditional installation? If so, we should probably phase out the
> vim-syntax USE flag.
> 
> If we want to keep the USE flag, I would suggest documenting a global
> policy regarding its use. Should that live in the devmanual? Or maybe
> the Vim project page?

One potential issue is help files: any Vim plugin that comes with
documentation needs a little script (which requires Vim to be installed)
to be run in pkg_postinst.

-- 
Ciaran McCreesh



Re: [gentoo-dev] vim-syntax USE flag

2017-07-23 Thread Mike Gilbert
On Sun, Jul 23, 2017 at 10:20 AM, Patrice Clement  wrote:
> Hi Mike
>
> Saturday 22 Jul 2017 16:27:39, Mike Gilbert wrote :
>> Packages currently handle installation of vim syntax support files
>> inconsistently. Some builds install the files if the "vim-syntax" USE
>> flag is enabled, while others install them unconditionally.
>>
>> Do these files fall into the "small text files" category for
>> unconditional installation? If so, we should probably phase out the
>> vim-syntax USE flag.
>>
>> If we want to keep the USE flag, I would suggest documenting a global
>> policy regarding its use. Should that live in the devmanual? Or maybe
>> the Vim project page?
>>
>
> Do you have a list handy of packages installing the vim syntax files
> unconditionally? I can look into this issue.

Here's a quick and dirty list.

% git grep -l usr/share/vim/vimfiles | xargs grep -L vim-syntax
app-emulation/docker/docker-17.03.1.ebuild
app-emulation/docker/docker-17.03.2.ebuild
app-emulation/docker/docker-17.06.0-r1.ebuild
app-emulation/docker/docker-.ebuild
app-text/cmigemo/cmigemo-1.3c.ebuild
app-text/wklej/wklej-0.2.1-r1.ebuild
app-vim/cream/cream-0.43.ebuild
app-vim/easytags/easytags-3.11.ebuild
app-vim/pyclewn/pyclewn-2.0.1.ebuild
app-vim/pyclewn/pyclewn-2.1-r1.ebuild
app-vim/splice/splice-1.0.1.ebuild
app-vim/splice/splice-1.1.0.ebuild
app-vim/vim-latex/vim-latex-1.8.23.20130116.ebuild
app-vim/vim-latex/vim-latex-1.8.23.20141116.ebuild
app-vim/vim-multiple-cursors/vim-multiple-cursors-2.2-r1.ebuild
dev-libs/protobuf/protobuf-3.3.0.ebuild
dev-ml/merlin/merlin-2.5.3.ebuild
dev-ml/merlin/merlin-2.5.4.ebuild
dev-ml/merlin/merlin-2.5.5.ebuild
dev-python/jinja/jinja-2.8.ebuild
dev-python/jinja/jinja-2.9.5.ebuild
dev-python/jinja/jinja-2.9.6.ebuild
dev-util/cmake/cmake-3.7.2.ebuild
dev-util/cmake/cmake-3.8.2.ebuild
dev-util/cmake/cmake-3.9.0.ebuild
dev-util/coccigrep/coccigrep-1.13.ebuild
dev-util/global/global-6.3.1.ebuild
dev-util/meson/meson-0.41.2.ebuild
dev-util/meson/meson-.ebuild
eclass/vim-doc.eclass
eclass/vim-plugin.eclass
eclass/vim-spell.eclass
net-analyzer/openvas-tools/openvas-tools-0_pre20512.ebuild
sys-apps/apparmor-utils/apparmor-utils-2.11.0-r1.ebuild
sys-apps/paludis/paludis-2.4.0-r1.ebuild
sys-apps/paludis/paludis-2.6.0.ebuild
sys-boot/netboot/netboot-0.10.2.ebuild
sys-devel/llvm-common/llvm-common-4.0.0.ebuild
sys-devel/llvm-common/llvm-common-4.0.1.ebuild
sys-devel/llvm-common/llvm-common-.ebuild
sys-devel/llvm/llvm-3.7.1-r3.ebuild
sys-devel/llvm/llvm-3.8.1-r2.ebuild
sys-devel/llvm/llvm-3.9.1-r1.ebuild



Re: [gentoo-dev] vim-syntax USE flag

2017-07-23 Thread Michał Górny
On nie, 2017-07-23 at 17:46 +0300, Andrew Savchenko wrote:
> On Sat, 22 Jul 2017 22:00:16 +0100 Sergei Trofimovich wrote:
> > On Sat, 22 Jul 2017 16:27:39 -0400
> > Mike Gilbert  wrote:
> > 
> > > Packages currently handle installation of vim syntax support files
> > > inconsistently. Some builds install the files if the "vim-syntax" USE
> > > flag is enabled, while others install them unconditionally.
> > > 
> > > Do these files fall into the "small text files" category for
> > > unconditional installation? If so, we should probably phase out the
> > > vim-syntax USE flag.
> > 
> > I'd say use flag is not needed as long as it does not slow vim startup
> > down by much and does not change editor behaviour for every single
> > edited file type.
> 
> The problem here is more complicated. What about 100 plugins from
> different packages which of them is fast enough, but together they
> are slowing vim down to unacceptable level? Such case is
> especially sensitive on slow hardware.
> 
> That's why fine control over vim files is mandatory. Yes, it
> requires to rebuild packages, but with ccache/distcc available this
> is not a huge issue. And if someone really want to avoid such
> rebuilds, vim files can always be put to a separated package;
> though I see no real reason to do this.
> 
> Using INSTALL_MASK here is not an option, because toggling of
> individual vim files using it will be a nightmare.
> 

The tool you're looking for is called eselect.

-- 
Best regards,
Michał Górny


signature.asc
Description: This is a digitally signed message part


Re: [gentoo-dev] vim-syntax USE flag

2017-07-23 Thread Andrew Savchenko
On Sat, 22 Jul 2017 22:00:16 +0100 Sergei Trofimovich wrote:
> On Sat, 22 Jul 2017 16:27:39 -0400
> Mike Gilbert  wrote:
> 
> > Packages currently handle installation of vim syntax support files
> > inconsistently. Some builds install the files if the "vim-syntax" USE
> > flag is enabled, while others install them unconditionally.
> > 
> > Do these files fall into the "small text files" category for
> > unconditional installation? If so, we should probably phase out the
> > vim-syntax USE flag.
> 
> I'd say use flag is not needed as long as it does not slow vim startup
> down by much and does not change editor behaviour for every single
> edited file type.

The problem here is more complicated. What about 100 plugins from
different packages which of them is fast enough, but together they
are slowing vim down to unacceptable level? Such case is
especially sensitive on slow hardware.

That's why fine control over vim files is mandatory. Yes, it
requires to rebuild packages, but with ccache/distcc available this
is not a huge issue. And if someone really want to avoid such
rebuilds, vim files can always be put to a separated package;
though I see no real reason to do this.

Using INSTALL_MASK here is not an option, because toggling of
individual vim files using it will be a nightmare.

Best regards,
Andrew Savchenko


pgpxlz5MXRPku.pgp
Description: PGP signature


Re: [gentoo-dev] vim-syntax USE flag

2017-07-23 Thread Patrice Clement
Hi Mike

Saturday 22 Jul 2017 16:27:39, Mike Gilbert wrote :
> Packages currently handle installation of vim syntax support files
> inconsistently. Some builds install the files if the "vim-syntax" USE
> flag is enabled, while others install them unconditionally.
> 
> Do these files fall into the "small text files" category for
> unconditional installation? If so, we should probably phase out the
> vim-syntax USE flag.
> 
> If we want to keep the USE flag, I would suggest documenting a global
> policy regarding its use. Should that live in the devmanual? Or maybe
> the Vim project page?
> 

Do you have a list handy of packages installing the vim syntax files
unconditionally? I can look into this issue.

-- 
Patrice Clement
Gentoo Linux developer
http://www.gentoo.org




Re: [gentoo-dev] vim-syntax USE flag

2017-07-22 Thread Daniel Campbell
On 07/22/2017 01:27 PM, Mike Gilbert wrote:
> Packages currently handle installation of vim syntax support files
> inconsistently. Some builds install the files if the "vim-syntax" USE
> flag is enabled, while others install them unconditionally.
> 
> Do these files fall into the "small text files" category for
> unconditional installation? If so, we should probably phase out the
> vim-syntax USE flag.
> 
> If we want to keep the USE flag, I would suggest documenting a global
> policy regarding its use. Should that live in the devmanual? Or maybe
> the Vim project page?
> 

I agree, a global policy should be established; whether it's "install
unconditionally" like we do with systemd units, openrc daemons, etc, or
a global USE. I'm unaware of any way to misinterpret what "vim-syntax"
means, and Vim itself already has a place it expects such files to go.
Installing a package without this USE flag requires a rebuild to get the
syntax file(s), so that's another reason to go unconditional. I have the
USE flag set globally and it hasn't created any blockers, so maybe it's
safe.

As for where documentation goes, I would expect a brief paragraph in the
devmanual mentioning the USE flag and linking to the Vim project page
that better explains usage and expectations. That way, changes in the
Vim project's way of development wouldn't require big rewrites in the
devmanual.

If we're shipping syntax for other editors as well, perhaps it's
deserving of its own devmanual page. Do we have a problem with
developers not shipping syntax files? (vim or otherwise)

--semi-offtopic--

When I first began using Gentoo in 2012, I was annoyed that Vim
remembered my cursor position for every file I opened. It took some
hunting to locate where this was set (/etc/vim/vimrc, owned by
app-editors/vim-core for the curious) and correct it with

g:leave_my_cursor_position_alone = 1

in my vimrc.

If we could document Gentoo-added Vim features like that, it'd be less
trouble for our newer users to configure Vim to their tastes. I
understand we're not a newbie distro, but unexpected behavior can be a
PITA to track down without documentation or trawling through `:script`
output. Searching the Web, our wiki, and even our GitHub account turned
up zero helpful results for this particular thing.

If the Vim team needs the help, I'd be glad to lend a hand where needed.

(also cc'ing vim@ to get an official opinion)
-- 
Daniel Campbell - Gentoo Developer
OpenPGP Key: 0x1EA055D6 @ hkp://keys.gnupg.net
fpr: AE03 9064 AE00 053C 270C  1DE4 6F7A 9091 1EA0 55D6



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-dev] vim-syntax USE flag

2017-07-22 Thread Sergei Trofimovich
On Sat, 22 Jul 2017 16:27:39 -0400
Mike Gilbert  wrote:

> Packages currently handle installation of vim syntax support files
> inconsistently. Some builds install the files if the "vim-syntax" USE
> flag is enabled, while others install them unconditionally.
> 
> Do these files fall into the "small text files" category for
> unconditional installation? If so, we should probably phase out the
> vim-syntax USE flag.

I'd say use flag is not needed as long as it does not slow vim startup
down by much and does not change editor behaviour for every single
edited file type.

Does vim@ (CCed) have an opinion?

> If we want to keep the USE flag, I would suggest documenting a global
> policy regarding its use. Should that live in the devmanual? Or maybe
> the Vim project page?

Any of two sounds OK. Which one would be easier to discover?
My guess is "both".

-- 

  Sergei


pgpgFP4SFy8V4.pgp
Description: Цифровая подпись OpenPGP