Red Hat Bugzilla – Bug 999994
The publican print_tree command lists source files not actually included in the book
Last modified: 2013-09-23 02:41:11 EDT
When using the publican print_tree command with an alternate configuration file, the output includes source files which are not actually in the book. Possible problem is that the print_tree command ignores conditions.
I have a repository from which two distinct books are built, depending on which configuration file is used. The default publican.cfg builds the Installation Guide and using --config=quickstart.cfg builds a Installation Quick Start Guide, which is much shorter, but uses some of the source files from the former book.
Which parts are included in which book is decided by conditionals - if a tag has "condition="install-guide"", it only appears in the Installation Guide; if a tag has "condition="quick-start"", it's specific to the Installation Quick Start Guide, and if there's no condition present, it can go into both.
When I run publican print_tree --config=quickstart.cfg, the output includes files which are included with "condition="install-guide"", which means they are not actually in this version of the guide. For example:
$ publican print_tree --config=quickstart.cfg
The last two entries are wrong. The Key_Board_Configuration-x86.xml file contains:
<xi:include href="Key_Board_Configuration_x86_ppc-para-1.xml" xmlns:xi="http://www.w3.org/2001/XInclude" condition="install-guide" />
<xi:include href="Key_Board_Configuration_x86_ppc-para-2.xml" xmlns:xi="http://www.w3.org/2001/XInclude" condition="install-guide" />
Note the condition="install-guide" in the includes; this means these two files should not appear in the output when building with --config=quickstart.cfg.
I'm not sure if I'm explaining this in a way that's possible to understand; I'll be happy to provide additional information as needed.
This is working as intended, is a file used at all or isn't it? i.e. can you safely delete it from your source repository?