GNOME Bugzilla – Bug 661705
OMF files not installed at the right place: yelp doesn't see them
Last modified: 2018-06-29 23:01:57 UTC
This is Debian bug http://bugs.debian.org/464587 The build system of the GnuCash documentation install OMF files under /usr/share/omf/gnucash-docs. As a consequence, the GNOME help browser (yelp version 2.30.1) won't display GnuCash documentation in the Help index. Yelp expects the OMF files for gnucash-guide to be under /usr/share/omf/gnucash-guide, and OMF files for gnucash-help to be under /usr/share/omf/gnucash-help. Please find attached a patch to omf.make which fixed the problem.
Created attachment 198965 [details] [review] Patch to build system
I've applied your patch to my local copy of the docs repo. All builds fine (gnucash-guide and gnucash-help installed on /usr/share/omf/ folder) but I'm not able to see the docs listed in yelp. I'm using ubuntu 11.04 and the others omf files of applications listed in /usr/share/omf/ are picked by yelp. Looking at a omf files and comparing it with others working on the omf folder I didn't notice any difference. Any idea what's missing?
Further investigation on the problem I have reported in the post above, gives me the opportunity to discover that on my system the GnuCash help and guide where not displayed in the yelp list because there is only a gnucash folder in the /usr/share/gnome/help path. If I copy this folder (containing the two help and guide xml file, and figures) two time and if I rename the two copies as gnucash-guide and gnucash-help, the files gets picked up by yelp. I don't know how to fix this...have you any idea?
I'm a bit surprised that my patch does not work for you, but basically the patch does what you did manually: it install the OMF files under /usr/share/omf/gnucash-guide and /usr/share/omf/gnucash-help (instead of everything under /usr/share/omf/gnucash-docs as is currently done). So the way to fix this issue is pretty simple (the install rules in the build system have to be modified), and I let you find the right way to fix it if my patch does not work for some reason (though it works on my system). Thanks,
Sorry I misunderstood your comment: actually my patch does not put *everything* under /usr/share/omf/gnucash-{guide,help}. It only puts the OMF files there. I don't know why on your system this is not enough.
After correcting a small typo, the patch is on the repo! thanks for providing it! > I don't know why on your system this is not enough. I also don't know. It seems that yelp doesn't want two omf files linking the same folder under /usr/share/gnome/help/ I'm facing another error: when running "sudo make uninstall" I get the following message ...... for file in gnucash-help-C.omf; do \ omfdir="/usr/share/omf/`echo $file | sed 's/-[^-]*\.omf$//'`"; \ if test "x" == "xtrue"; then \ scrollkeeper-uninstall -p "/usr/var/scrollkeeper" "$omfdir/$file"; \ fi; \ rm -f "$omfdir/$file"; \ rmdir "$omfdir"; \ done; rmdir: failed to remove `/usr/share/omf/gnucash-help': Directory not empty make[2]: *** [uninstall-local-omf] Error 1 make[2]: Leaving directory `/home/cristian/unstable/GNUCASH/gnucash-docs/help/C' make[1]: *** [uninstall-recursive] Error 1 make[1]: Leaving directory `/home/cristian/unstable/GNUCASH/gnucash-docs/help' make: *** [uninstall-recursive] Error 1 It seems that the omf files didn't get removed before removing the folder.
Thanks for your help. Actually I did not test the "uninstall" part of my patch, since for uninstallation I use the Debian packaging system and not the make rules. I provided the "uninstall" part in the patch mainly for consistency with the "install" part. I’m sorry if it does not work; hope it helps nevertheless.
Comment on attachment 198965 [details] [review] Patch to build system Committed in r21467 by Cristian.
(In reply to comment #6) > I'm facing another error: when running "sudo make uninstall" I get the > following message > > ...... > for file in gnucash-help-C.omf; do \ > omfdir="/usr/share/omf/`echo $file | sed 's/-[^-]*\.omf$//'`"; \ > if test "x" == "xtrue"; then \ > scrollkeeper-uninstall -p "/usr/var/scrollkeeper" "$omfdir/$file"; \ > fi; \ > rm -f "$omfdir/$file"; \ > rmdir "$omfdir"; \ > done; > rmdir: failed to remove `/usr/share/omf/gnucash-help': Directory not empty > make[2]: *** [uninstall-local-omf] Error 1 > make[2]: Leaving directory > `/home/cristian/unstable/GNUCASH/gnucash-docs/help/C' > make[1]: *** [uninstall-recursive] Error 1 > make[1]: Leaving directory `/home/cristian/unstable/GNUCASH/gnucash-docs/help' > make: *** [uninstall-recursive] Error 1 > > It seems that the omf files didn't get removed before removing the folder. This is because of how make works. The install and uninstall parts are called for each language we support. Each call only installs/uninstalls the omf file for that language. So if you have installed for example gnucash-guide for English and German, and then try to uninstall all, the uninstall part will first be run for the gnucash-guide-C.omf file only. It will start by removing the file and then attempt to remove the gnucash-guide directory with rmdir. At this point this directory is not empty (it still contains gnucash-guide-DE.omf). Hence rmdir will fail. I have slightly altered the uninstall part in r21531 such that rmdir will ignore errors due to the directory not being empty. This should ensure the uninstall part runs for all languages and only remove the directory when the last language file is removed. Some notes: - a side-effect of my fix is that the directory doesn't get removed at all if it should contain a file not managed by install/uninstall (for example if someone or some tool manually added a file in there). - I haven't actually run the make install and uninstall parts on my system, because I don't like to interfere with my package manager managed install. But the principle should work.
(In reply to comment #3) > Further investigation on the problem I have reported in the post above, gives > me the opportunity to discover that on my system the GnuCash help and guide > where not displayed in the yelp list because there is only a gnucash folder in > the /usr/share/gnome/help path. > If I copy this folder (containing the two help and guide xml file, and figures) > two time and if I rename the two copies as gnucash-guide and gnucash-help, the > files gets picked up by yelp. > I don't know how to fix this...have you any idea? Can you attach the omf files that got installed ?
Complement of information: The fix that I suggested corrects the problem for Yelp 2.30. But with a recent upgrade to Yelp 3.2, the problem has reappeared for me (therefore I reopened the Debian bug that I had initially closed). I may be experiencing the same problem than Cristian.
I found a workaround which works for Yelp 3.2: cd /usr/share/gnome/help ln -s gnucash gnucash-guide ln -s gnucash gnucash-help Looks like the latest Yelp wants that the directory name under /usr/share/gnome/help be the same than the name of the XML file. I implemented this workaround in the Debian package, until a better solution is found upstream.
Thanks for reporting this. I have now changed the build scripts so they will install the documentation as <docname>/<lang>/<docname>.xml, for example gnucash-guide/C/gnucash-guide.xml gnucash-help/de_DE/gnucash-help.xml and so on. The fix is in r22374. I intend to release a new gnucash-docs package soon for distro's to package. If the bug still appears after this fix, feel free to reopen the report.
I'm still seeing this bug on Ubuntu 12.4 LTS using GnuCash 2.6.3 gnucash --version GnuCash 2.6.3 This copy was built from rev 4e4a032+ on 2014-04-08. sudo su - cd /usr/share/gnome/help ln -s gnucash gnucash-help ln -s gnucash gnucash-guide exit yelp ghelp:gnucash-help #OK yelp ghelp:gnucash-guide #OK
(In reply to comment #14) > I'm still seeing this bug on Ubuntu 12.4 LTS using GnuCash 2.6.3 > > gnucash --version > GnuCash 2.6.3 > This copy was built from rev 4e4a032+ on 2014-04-08. > > sudo su - > cd /usr/share/gnome/help > ln -s gnucash gnucash-help > ln -s gnucash gnucash-guide > exit > > yelp ghelp:gnucash-help #OK > yelp ghelp:gnucash-guide #OK What version of the gnucash-docs package do you have installed ?
Reassign version to 2.4.x so that individual 2.4 versions can be retired.
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=661705. Please update any external references or bookmarks.