(after merging myspell-cs and reemerging openoffice) openoffice use myspell czech-language spell-checker, but not use myspell czech-language hyphenation included in myspell-cs package
That's expected, the myspell work is not finished yet (and we didn't announce it cause of that), the official way to install OOo-dictionaries is still through the wizard in OOo. But I agree, this should be solved soonish, @kevquinn: Maybe we should continue our discussion from bug #125306 here? So, what we need is a way to keep dictionary.lst (or regenerate it after) an openoffice-upgrade. @Roman: Short term solution: Just reemerge myspell-cs, after that it should work fine
(In reply to comment #1) > But I agree, this should be solved soonish, @kevquinn: Maybe we should > continue our discussion from bug #125306 here? Yes, good idea. I'll summarise our earlier discussions in another comment. > @Roman: Short term solution: Just reemerge myspell-cs, after that it should > work fine and let us know if that works - just to be sure we understand the problem properly :)
(In reply to comment #16) - Andreas > (In reply to comment #15) - Kevin > > I'll have to think a bit about what happens when openoffice is installed later > > (e.g. when upgraded). Ideally, openoffice installation shouldn't overwrite the > > dictionary.lst file as it's a system config file. Adding > > /usr/lib/openoffice/share/dict/ooo to CONFIG_PROTECT is probably the most > > proper approach; alternatively you could remove > > ${D}/usr/lib/openoffice/share/dict/ooo/dictionary.lst if > > ${ROOT}/usr/lib/openoffice/share/dict/ooo/dictionary.lst exists, in > > src_install. > > I don't think this is a good solution, for instance between 2.0.1 and 2.0.2 > some dictionaries have been added to the default install, this way we would > loose these change. What do you think about using CONFIG_PROTECT? > > The easiest thing to do if dictionary.lst does get wiped out is: > > > > cat /usr/share/myspell/dictionary.lst.* >> \ > > /usr/lib/openoffice/share/dict/ooo/dictionary.lst > > sounds reasonable > > > but I will think properly about an eselect module (ultimately I would change > > myspell.eclass to use that). > > Which problem do you want to solve by an eselect module? I was thinking of something like: $ eselect oodict relink myspell to relink any myspell dictionaries into the OOo dictionary area and perhaps $ eselect oodict set cs myspell to select the source of a specific language, where 'oodict' is a module for managing the OpenOffice.org dictionary configuration. Maybe such an eselect module would be too much, but the idea of using eselect was to avoid installing yet another uniquely named management script in /usr/bin - eselect is becoming a natural place for people to look for system configuration management. We could just provide a script to install the myspell dictionaries into OOo, provided with the OOo build, and run in the OOo postinstall. The 'cat' command I mentioned above is a quick hack, but isn't really good enough to cope with openoffice-supplied dictionaries that conflict with myspell ones. However I don't think it's much effort to provide the same script as an eselect module, even if there's only the "relink myspell" command available. In the long term I'm thinking that perhaps OOo might support other language tools; perhaps aspell etc - in which case it would be easy (from the users' perspective) to expand the eselect module to deal with that.
(In reply to comment #3) > > What do you think about using CONFIG_PROTECT? My opinion on this is: Don't use it if we don't need it ;) The thing is: dictionary.lst should never be manipulated by hand, so there are no changes to protect, by using CONFIG_PROTECT we are just adding a step for the users while this really should be done automatically. > > I was thinking of something like: > > $ eselect oodict relink myspell I think the only use for that should be to use it from pkg_postinstall, a user should never have to use such a thing himself > to relink any myspell dictionaries into the OOo dictionary area and perhaps > > $ eselect oodict set cs myspell That sounds useful in theory, but I'm not quite sure what the use-case is here. If someone wants to use the OOo-provided dictionary instead of the myspell-ebuild, why have both installed? I might also point out, that my plan is that OOo is not going to provide any dictionaries itself anymore in the near future, that's the way all the others distros do it and I agree with them, that there should be one sole source for installing / getting dictionaries, everything else is just plain confusing. Next step after that will be to disable the dic-install-wizard, but first we have to have myspell-dictionaries in the tree for everything the wizard can install (not sure how much - or anything at all - is missing for that ;) > We could just provide a script to install the myspell dictionaries into OOo, > provided with the OOo build, and run in the OOo postinstall. The 'cat' command > I mentioned above is a quick hack, but isn't really good enough to cope with > openoffice-supplied dictionaries that conflict with myspell ones. Which should never happen anyway, see above. So the cat-hack (or something similar simple) might even be sufficient > In the long term I'm thinking that perhaps OOo might support other language > tools; perhaps aspell etc - in which case it would be easy (from the users' > perspective) to expand the eselect module to deal with that. I wouldn't bet on this, really ;)
So I've played around with the "simple" idea now a little bit. Adding the following to pkg_postinstall in openoffice-bin if [ -e /usr/share/myspell ] && [ `ls /usr/share/myspell/ | grep dictionary.lst | wc -l` -gt 0 ]; then cat /usr/share/myspell/dictionary.lst.* >> \ /usr/lib/openoffice/share/dict/ooo/dictionary.lst fi works perfectly here, for every testcase but one: If a user installs the myspell dictionaries before openoffice the correct symlinks to the dictionaries won't be in /usr/lib/openoffice/share/dict/ooo/ so we'd have to find a solution for this, too.
I confirm that if myspell-cs emerged after openoffice, both spellchecker and hyphenation work correctly :-)
@Kevin: Any progress on this? Would be great to have a real working / official solution to this soonish, just to make your ebuilds a little bit more useful ;)
Created attachment 87809 [details] oodict eselect module, take 1 Andreas - here's my first attempt at a little eselect module; let me know what you think :) We can call out to this in myspell and openoffice ebuilds to manage the softlinks and dictionary.lst. Actions are: set - for setting a single dictionary (e.g. myspell-de) unset - for undoing set update - for magically installing everything it can find. where I expect to use unset/set in myspell.eclass preinst/postinst respectively, and you'd use update in openoffice.ebuild postinst.
Created attachment 87816 [details] oodict eselect module, take 2 Whoops - attached a slightly out-of-date version. This is a little tidier.
Looks very good to me, works exactly as announced ;) Great work, Kevin! The only minor thing: I would make the warnings like !!! Warning: File /usr/lib/openoffice/share/dict/ooo/de_AT.aff is not a softlink so left untouched a little bit less dramatic, but that's more a matter of personal taste and I plan to remove the default dictionaries in the not-so-distant future anyway. So would be great if you could push the eselect-module in portage, so that I could add this stuff to OOo P.S.: A little bit unrelated, but I don't want to open a whole new bug for this: I think the myspell-dictionaries shouldn't depend on hunspell, this should be done by the apps which use them. Why? For instance openoffice-bin has its own builtin hunspell, so it will be installed twice. Also this might be true for Thunderbird and the upcoming Firefox 2.0 (which both use myspell-dictionaries)
Just to make clear, why I'm pushing this a little bit ;) OOo 2.0.3 ist coming out in a few days and I'd really would like to have the myspell-integration from the start, and as we are THAT close...
ok; just committed app-admin/eselect-oodict - sorry for the delay but I wanted to run it by the eselect people first to ensure consistency with other eselect modules. It's package.mask'ed initially, as per eselect team request.
(In reply to comment #12) > ok; just committed app-admin/eselect-oodict - sorry for the delay but I wanted > to run it by the eselect people first to ensure consistency with other eselect > modules. It's package.mask'ed initially, as per eselect team request. > Works perfectly for me, so I'm going to depend on it in OOo 2.0.3, which also means it would have to get out of package.mask in the next few days. Last remaining step from my point of view is the discussion about the hunspell-dependency in the myspell-ebuilds, see above.
both openoffice and openoffice-bin 2.0.3 are in the tree and using myspell-dics, so closing this