Bug 2416

Summary: xmlto/xsltproc stylesheets cannot be found even when they are installed in sysroot
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Martin Jansa <Martin.Jansa>
Component: devtools / tool chainAssignee: Hongxu Jia <hongxu.jia>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: Medium CC: hongxu.jia, meta.mr.watcher, meta.watcher, poky.bs.watcher, poky.watcher, richard.purdie, ross.burton, sgw
Version: 1.3   
Target Milestone: 1.7 M2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Martin Jansa 2012-05-04 06:05:48 UTC
When autotools detect that xmlto or xstlproc available then it usually doesn't check if there are working stylesheets for it, so many recipes with enabled doc/man building fail like this:
http://lists.linuxtogo.org/pipermail/openembedded-devel/2011-December/037066.html

or newer example:
http://lists.linuxtogo.org/pipermail/openembedded-core/2012-May/021942.html

would be nice to provide working xmlto-native/xsltproc-native/stylesheets-native and then enable doc/man building in recipes where we had to explicitly disable it.

meta/recipes-support/libxslt/libxslt_1.1.26.bb already provides native version
xmlto can be imported from meta-oe/recipes-support/xmlto/xmlto_0.0.25.bb
docbook-sgml-dtd-4.3-native.bb can be imported from oe-core-contrib/jansa/test

more info:
http://lists.linuxtogo.org/pipermail/openembedded-devel/2011-December/037106.html
Comment 1 Martin Jansa 2014-05-03 18:23:58 UTC
Old links to oe-devel/oe-core ML are not working anymore, here are the right ones

"[oe] [PATCH v2 meta-oe 1/7] xmlto: add version 0.0.25"
http://lists.openembedded.org/pipermail/openembedded-devel/2011-December/082225.html

"[OE-core] [PATCHv3] xserver-xorg-lite: disable xmlto like full	xserver-xorg does"
http://lists.openembedded.org/pipermail/openembedded-core/2012-May/061330.html

"[oe] [PATCH v2 meta-oe 1/7] xmlto: add version 0.0.25"
http://lists.openembedded.org/pipermail/openembedded-devel/2011-December/082264.html

Before enabling the docs we should make sure that the -native tools are fixes to look for stylesheets in sysroot and only in sysroot, because otherwise it will work for most people (stylesheets are usually installed in host distro) and especially when upgrading some recipe, people won't notice that upstream updated docs to use dtd-4.4 instead of dtd-4.3.
Comment 2 Hongxu Jia 2014-07-10 02:46:24 UTC
Test Steps:

1. vim local.conf
...
IMAGE_FEATURES += "ssh-server-dropbear"
PACKAGECONFIG_pn-alsa-utils = "xmlto"
IMAGE_INSTALL_append = " xmlto"
...

2. bitbake alsa-utils
If the build is ok, it means xmlto-native could work.

3. bitbake core-image-minimal

4. start qemu target and ssh the target

5. copy a manual source to target
   ssh tmp/work/i586-poky-linux/alsa-utils/1.0.27.2-r0/alsa-utils-1.0.27.2/alsactl/alsactl_init.xml root@192.168.7.2:/home/root

6. on target
   root@qemux86:~# xmlto man alsactl_init.xml 
   Note: Writing alsactl_init.7

//Hongxu
Comment 3 Hongxu Jia 2014-07-17 05:46:24 UTC
Merged into master

    xserver-xorg.inc: add PACKAGECONFIG for xmlto
    
    Support xmlto for documentation generation and disable it by default.
    
    [YOCTO #2416]
    
    (From OE-Core rev: c2d8322b3e3d1c2cb1ed7ccff59c7e86ab7af751)