Summary: | app-dicts/myspell-ru-20150711: should create ru_RU.{dic,aff} symlinks | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Igor Poboiko <igor.poboiko> |
Component: | Current packages | Assignee: | Perfect Gentleman <perfect007gentleman> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | proxy-maint, v_2e |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://github.com/gentoo/gentoo/pull/1418 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | myspell-ru-20150711-r1.ebuild |
Description
Igor Poboiko
2016-04-04 22:31:32 UTC
(In reply to Igor Poboiko from comment #0) > Currently app-dicts/myspell-ru installs "russian-aot.dic" and > "russian-aot.aff" files into /usr/share/myspell/ directory. With that setup > hunspell cannot find it by default: > > Can't open affix or dictionary files for dictionary named "ru_RU". > > Hunspell is not the only one who is affected with that; e.g. > app-office/libreoffice-5.1.1.3 cannot find it too; neither does > app-office/lyx-2.1.4. > Making ru_RU.{dic,aff} symlinks fixes the problem for everyone. > I believe ebuild should do this. > > > hunspell does, however, find it via "hunspell -D": > > AVAILABLE DICTIONARIES (path is not mandatory for -d option): > > [...] > > /usr/share/myspell/russian-aot > > Also KDE software does find it too (e.g kde-apps/kwrite-15.12.3). > Pretty weird though. where should be symlinks created? Creating symlinks in "/usr/share/myspell" did the trick for me. (In reply to Igor Poboiko from comment #2) > Creating symlinks in "/usr/share/myspell" did the trick for me. honestly, i don't know how to implement that feature. it is needed to modify myspell-r2.eclass because creating symlink is implemented there (In reply to Perfect Gentleman from comment #3) > (In reply to Igor Poboiko from comment #2) > > Creating symlinks in "/usr/share/myspell" did the trick for me. > > honestly, i don't know how to implement that feature. it is needed to modify > myspell-r2.eclass because creating symlink is implemented there You can create symlinks during src_install() using dosym [0] which operates effectively the same as `ln -s`. 0: https://devmanual.gentoo.org/function-reference/install-functions/ (In reply to Sam Jorna (wraeth) from comment #4) > (In reply to Perfect Gentleman from comment #3) > > (In reply to Igor Poboiko from comment #2) > > > Creating symlinks in "/usr/share/myspell" did the trick for me. > > > > honestly, i don't know how to implement that feature. it is needed to modify > > myspell-r2.eclass because creating symlink is implemented there > > You can create symlinks during src_install() using dosym [0] which operates > effectively the same as `ln -s`. > > 0: https://devmanual.gentoo.org/function-reference/install-functions/ I tried that, but the symlinks were the only things installed. (In reply to Perfect Gentleman from comment #5) > I tried that, but the symlinks were the only things installed. When not defined, src_install() calls a default definition for the phase. If you then define src_install() in the ebuild, you overwrite that default and then need to either write a manual install process in src_install() or (preferrably) call the relevant 'default' install function in addition to the bits you're adding: > src_install() { > default > dosym /my_path /my_link > } Note that which default you use depends on the build system and eclasses - 'default' calls src_install() as defined by PMS [0] whereas eclasses often export an '${eclass_name}-src_install' phase function. 0: https://projects.gentoo.org/pms/6/pms.html#x1-1030009.1.9 (In reply to Sam Jorna (wraeth) from comment #6) > (In reply to Perfect Gentleman from comment #5) > > I tried that, but the symlinks were the only things installed. > > When not defined, src_install() calls a default definition for the phase. If > you then define src_install() in the ebuild, you overwrite that default and > then need to either write a manual install process in src_install() or > (preferrably) call the relevant 'default' install function in addition to > the bits you're adding: > > > src_install() { > > default > > dosym /my_path /my_link > > } > > Note that which default you use depends on the build system and eclasses - > 'default' calls src_install() as defined by PMS [0] whereas eclasses often > export an '${eclass_name}-src_install' phase function. > > 0: https://projects.gentoo.org/pms/6/pms.html#x1-1030009.1.9 tried that too, the result was the same as in message above. (In reply to Perfect Gentleman from comment #7) > (In reply to Sam Jorna (wraeth) from comment #6) > > (In reply to Perfect Gentleman from comment #5) > > > I tried that, but the symlinks were the only things installed. > > > > When not defined, src_install() calls a default definition for the phase. If > > you then define src_install() in the ebuild, you overwrite that default and > > then need to either write a manual install process in src_install() or > > (preferrably) call the relevant 'default' install function in addition to > > the bits you're adding: > > > > > src_install() { > > > default > > > dosym /my_path /my_link > > > } > > > > Note that which default you use depends on the build system and eclasses - > > 'default' calls src_install() as defined by PMS [0] whereas eclasses often > > export an '${eclass_name}-src_install' phase function. > > > > 0: https://projects.gentoo.org/pms/6/pms.html#x1-1030009.1.9 > > tried that too, the result was the same as in message above. src_install() { default dosym /usr/share/hunspell/russian-aot.dic /usr/share/myspell/ru_RU.dic dosym /usr/share/hunspell/russian-aot.aff /usr/share/myspell/ru_RU.aff } $ sudo ls /tmp/portage/app-dicts/myspell-ru-20150711/image/usr/share/myspell ru_RU.aff ru_RU.dic It is not clear what your previous comment is illustrating here. It appears to me that these are proving the links were in fact created. What is the current state here? (In reply to Ian Delaney from comment #9) > It is not clear what your previous comment is illustrating here. It appears > to me that these are proving the links were in fact created. > > What is the current state here? as i wrote above, the symlinks are the only instances that are created with modified ebuild, i.e. no files at all, only these two symlinks. (In reply to Sam Jorna (wraeth) from comment #6) > Note that which default you use depends on the build system and eclasses - > 'default' calls src_install() as defined by PMS [0] whereas eclasses often > export an '${eclass_name}-src_install' phase function. (In reply to Perfect Gentleman from comment #10) > as i wrote above, the symlinks are the only instances that are created with > modified ebuild, i.e. no files at all, only these two symlinks. It seems I gave some incorrect information here - my apologies. The `default` keyword calls the PMS defined default implementation of a phase function, which in this case is not what you want. Instead, src_install() should call `myspell-r2_src_install` to perform the normal installation that would be done if src_install() wasn't defined at all, and then create the symlinks. In short, replace `default` with `myspell-r2_src_install`. correct ebuild Created attachment 432884 [details]
myspell-ru-20150711-r1.ebuild
myspell-ru-20150711-r1.ebuild
commit 4b734c15c4edb28f5baaacc9dfd0828e85ab6151 Author: Ian Delaney <idella4@gentoo.org> Date: Tue May 10 14:10:16 2016 +0800 app-dicts/myspell-ru: rebump -> myspell-ru-20150711-r1.ebuild upgrade src_install, add symlinks to the dictionary files patch supplied by proxied maintainer via the gentoo bug Gentoo-bug: #579054 |