Bug 957956 - get_keywords always looks for a file named <type>_Info.xml even when info_file set.
Summary: get_keywords always looks for a file named <type>_Info.xml even when info_fil...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Publican
Classification: Community
Component: publican
Version: 3.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 3.2
Assignee: Jeff Fearn 🐞
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-30 01:47 UTC by Stephen Gordon
Modified: 2013-08-09 04:47 UTC (History)
4 users (show)

Fixed In Version: 3.2.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-09 04:47:42 UTC
Embargoed:


Attachments (Terms of Use)

Description Stephen Gordon 2013-04-30 01:47:17 UTC
Description of problem:

My book uses the info_file directive in publican.cfg to set an info file other than Book_Info.xml:

info_file: bk_openstackinstallguide.xml

When I do a PDF build (this doesn't seem to impact other formats) I get this:

keyword list can not be calculated before building. at /usr/share/perl5/vendor_perl/Publican/Builder.pm line 1123.

Looking in lib/Publican.pm I can see that the error appears to come from this logic in the get_keywords sub:

1298     my @keywords;                                                               
1299                                                                                 
1300     my $tmp_dir = $self->param('tmp_dir');                                      
1301     my $file    = "$tmp_dir/$lang/xml/" . $self->param('type') . '_Info.xml';   
1302                                                                                 
1303     croak( maketext("keyword list can not be calculated before building.") )    
1304         unless ( -f $file );                                                    

As above it appears when calculating the keyword list the info_file directive isn't taken into account. Copying my actual "book" file (which includes the info and is the one I set info_file to) to Book_Info.xml gets me past this error (I run into a later failure in wkhtmltopdf but I am still investigating that).

Version-Release number of selected component (if applicable):

publican-3.1.5-0.fc18.noarch

Comment 1 Jeff Fearn 🐞 2013-07-09 03:10:44 UTC
To ssh://git.fedorahosted.org/git/publican.git
   af686e4..8ba4ff6  HEAD -> devel

Comment 2 HSS Product Manager 2013-07-09 03:17:32 UTC
HSS-QE has reviewed and declined this request. QE for this bug will be handled by IED.

Comment 3 Petr Bokoc 2013-07-22 12:35:26 UTC
Verified in publican-3.1.5-0.fc17.t62.noarch.

Comment 4 Jeff Fearn 🐞 2013-08-09 04:47:42 UTC
The fix for this bug has been shipped in publican 3.2.0


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