Red Hat Bugzilla – Full Text Bug Listing
|Summary:||publican package does not work with conditional book_info.xml|
|Product:||[Community] Publican||Reporter:||Laura Bailey <lbailey>|
|Component:||publican||Assignee:||Jeff Fearn <jfearn>|
|Status:||CLOSED NOTABUG||QA Contact:||Ruediger Landmann <rlandman>|
|Fixed In Version:||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|Last Closed:||2011-04-07 23:43:07 EDT||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
Description Laura Bailey 2011-02-16 01:59:13 EST
Description of problem: I have two products to document, which are so similar that I decided to use conditional tags and one source document instead of making two books. To do so, I made separate Book_Info.xml files - Book_Info_A.xml and Book_Info_B.xml. Publican builds these books just fine for either product, but the "publican package" command complains of a lack of Book_Info.xml. Is it possible to get the package command to check for the <bookinfo> element instead of the Book_Info.xml file? --- Workarounds Attempted: First, I tried adding <phrase condition="a">A</phrase><phrase condition="b">B</phrase> to the subtitle, productname, etc. tags. This results in an incorrect packagename: JBoss_Enterprise_ApplicationWeb_Platform-6.0.0_Release_Notes-6-web-en-US-6.0.0-1.el5 instead of JBoss_Enterprise_Application_Platform-6.0.0_Release_Notes-6-web-en-US-6.0.0-1.el5 or JBoss_Enterprise_Web_Platform-6.0.0_Release_Notes-6-web-en-US-6.0.0-1.el5 depending on the condition set in publican.cfg. Next I tried adding the condition to the productname tag, but in this case publican package just grabs the content of whichever <productname> comes first in the file, regardless of the condition that is set. Of the two workarounds, I think this one makes the most sense, if we absolutely must use Book_Info.xml as the container for the <bookinfo> element. --- Version-Release number of selected component (if applicable): publican-2.5-1.fc13.noarch --- How reproducible: Every time. --- Steps to Reproduce: Try to brew a book whose <productname> is conditional. Examples here: https://svn.devel.redhat.com/repos/ecs/JBoss_Enterprise_Application_Platform/trunk/6/ --- Actual results: Incorrect packagename. --- Expected results: Correct packagename.
Comment 1 Laura Bailey 2011-02-16 02:05:37 EST
On closer inspection, publican build doesn't work without a Book_Info.xml either, even if it's not required.
Comment 2 Jeff Fearn 2011-02-16 17:23:13 EST
Publican only uses <type>_Info.xml to source variables from. If you want to do non-standard things, then you have to use the configuration files for that. If you set product, version, release, etc, in the cfg files then publican should not use <type>_Info.xml at all, so you can have any structure you like for your bookinfo.
Comment 3 Laura Bailey 2011-02-16 19:25:28 EST
Awesome, thanks Jeff. :)
Comment 4 Laura Bailey 2011-02-16 20:02:54 EST
Setting the product in the cfg file solves the initial problem, but I have discovered a related issue: the PDF name and brew package name is still based on the bookname.xml filename, instead of the title given in the bookinfo element. Defining the bookname in the cfg file makes Publican search for a file of that name. This means that I need a separate bookname.xml for each conditional book, which somewhat defeats the purpose of having a single source. Any ideas?
Comment 5 Laura Bailey 2011-02-16 20:25:25 EST
I tell a lie: packagename and PDF name are based on the first <title> element discovered in Book_Info.xml, regardless of conditions.
Comment 6 Jeff Fearn 2011-04-07 22:57:25 EDT
Can you include a link to the book in question? I can't really work out what the problem is from the description.
Comment 7 Laura Bailey 2011-04-07 23:43:07 EDT
Sorry, Jeff, I think the bug was that I was DOINGITWRONG. Closing NOTABUG.