Bug 9622 - build.sh: error trying to generate doc for adt-manual
Summary: build.sh: error trying to generate doc for adt-manual
Status: RESOLVED FIXED
Alias: None
Product: Eclipse Plugin
Classification: Yocto Project Subprojects
Component: eclipse-plugin (show other bugs)
Version: 2.2
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.2
Assignee: Tim Orling
QA Contact: Libertad
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-05-11 16:18 UTC by Humberto Ibarra
Modified: 2016-06-13 18:06 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Humberto Ibarra 2016-05-11 16:18:56 UTC
I ran the build.sh to create the plugin and in the first lines I saw an error with generating the adt-manual documentation:

$ ECLIPSE_HOME=/home/humberto/eclipse-poky/scripts/eclipse ./build.sh -l master master master 2>&1 | tee -a build.log
Cloning into '/home/humberto/eclipse-poky/scripts/master_build_201605111108/src'...

Checking out master

Already on 'master'
Your branch is up-to-date with 'origin/master'.

Generate Yocto documentation

Cloning into '/home/humberto/eclipse-poky/scripts/master_build_201605111108/src/docs'...
Already on 'master'
Your branch is up-to-date with 'origin/master'.
 
******** Building eclipse help of yocto-project-qs
 
cd yocto-project-qs && \
	xsltproc --xinclude \
			--stringparam base.dir 'html/yocto-project-qs/' \
			-o eclipse/yocto-project-qs.html \
			yocto-project-qs-eclipse-customization.xsl yocto-project-qs.xml && \
	mv eclipse/toc.xml eclipse/yocto-project-qs-toc.xml && \
	cp -rf figures eclipse/html/yocto-project-qs/ && \
	cd ..;
 
******** Using eclipse-help.sed to process external links
 
 
ERROR: You can only create eclipse documentation
       of the following documentation parts:
       - sdk-manual
       - bsp-guide
       - dev-manual
       - kernel-dev
       - profile-manual
       - ref-manual
       - yocto-project-qs
 
 
******** Using eclipse-help.sed to process external links
 
cp: cannot stat ‘adt-manual/eclipse/html/*’: No such file or directory
cp: cannot stat ‘adt-manual/eclipse/adt-manual-toc.xml’: No such file or directory

.
.
.


Checked a bit into this and seems like the generate-doc.sh script is explicitly trying to generate the docs:

DOCS="yocto-project-qs adt-manual kernel-dev \
      bsp-guide ref-manual dev-manual profile-manual"

Even so, the docs have stopped supporting the adt-manual documentation with commit 	d2084cc95ac185d7e4e19b633739c8ea27cd268a. The make file for the docs no longer includes adt-manual.

This specific error can be fixed, but some other similar errors might come out later. It seems to me that the best way to go would be for generate-docs.sh to dynamically retrieve the available docs, and only attempt to make those documentations that are available in the documentation branch given.
Comment 1 Tim Orling 2016-05-26 23:09:36 UTC
In addition, the generate-doc.sh script should be building sdk-manual now (since commit ab591831a97a97d405d13ed75e9fb01e0452c292)
Comment 2 Tim Orling 2016-05-27 00:22:39 UTC
The references to "adt-manual" in plugins/org.yocto.doc.user/plugin.xml, toc.xml and about.html.in will also have be changed. This means we will have to change those files before the plugin is built. Luckily generate-doc.sh runs at the right time for this. For older releases, generate-doc.sh will need to patch the files. The default for "master", "krogoth" and "yocto-2.1" (planned) branches/tags will be sdk-manual.
Comment 3 Tim Orling 2016-06-01 17:21:09 UTC
This approach of whitelisting the branches/tags which build sdk-manual is brittle. Every time a new tag or branch for yocto-docs is created the check would have to be updated. If we only had branches to worry about, we could 'git branch -r --contains <commitish>', but this won't be valid for tags or cherry-picks. Humberto's original idea of checking the output of the make command probably makes the most sense, assuming the check in the Makefile exists of course.
Comment 5 Tim Orling 2016-06-13 18:06:00 UTC
Merged.