Bug 999994 - The publican print_tree command lists source files not actually included in the book
The publican print_tree command lists source files not actually included in t...
Status: CLOSED NOTABUG
Product: Publican
Classification: Community
Component: publican (Show other bugs)
3.1
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: PnT DevOps Devs
tools-bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-22 09:49 EDT by Petr Bokoc
Modified: 2013-09-23 02:41 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-23 02:41:11 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Petr Bokoc 2013-08-22 09:49:35 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.

More info:
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
<parts omitted>
Key_Board_Configuration-x86.xml
      Key_Board_Configuration_x86_ppc-title-1.xml
      Key_Board_Configuration_x86_ppc-indexterm-1.xml
      Key_Board_Configuration_x86_ppc-indexterm-2.xml
      Key_Board_Configuration_x86_ppc-para-1.xml
      Key_Board_Configuration_x86_ppc-para-2.xml
<parts omitted>

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.
Comment 2 Jeff Fearn 2013-09-23 02:41:11 EDT
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?

Note You need to log in before you can comment on or make changes to this bug.