Bug 744964 - Empty fields in packaged version of publian.cfg file corrupt ToC on website when repackaged
Summary: Empty fields in packaged version of publian.cfg file corrupt ToC on website w...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Publican
Classification: Community
Component: publican
Version: 2.8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 3.0
Assignee: Jeff Fearn 🐞
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-11 01:35 UTC by Ruediger Landmann
Modified: 2012-10-31 03:11 UTC (History)
4 users (show)

Fixed In Version: 3.0.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-10-31 03:11:36 UTC


Attachments (Terms of Use)

Description Ruediger Landmann 2011-10-11 01:35:45 UTC
Description of problem:
When Publican packages a document, it includes a version of the publican.cfg file that combines values from the author's version of the file with values that Publican supplies automatically. 

In an untranslated book, these Publican-supplied values include blank entries for web_name_label and web_product_label.

If you open up a Publican-generated SRPM and then repackage the contents, these blank entries lead to values like these getting set in the %post section of the spec file:

 --name_label="ARRAY(0x388baf8)"  --product_label="ARRAY(0x388be40)

If you install the repackaged doc on a website, these labels get used in the site ToC.

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

How reproducible:
100%

Steps to Reproduce:
1. Package an untranslated document
2. open up the Publican-generated SRPM -- rpm2cpio *.src.rpm | cpio -vid ; tar -xf *.tgz
3. change into the expanded directory and run "publican package --lang en-US --binary"
4. install the Publican-generated RPM

Actual results:
Note the "ARRAY" entries in the spec file in tmp/rpm; then see these entries faithfully used as labels on the website.

Expected results:
No "ARRAY" entries in spec file or on website.

Additional info:

Comment 2 Jeff Fearn 🐞 2011-10-11 03:25:31 UTC
Added code to detect and ignore empty fields from config files.

Added code to detect and ignore blank labels.

Applied to branches/publican-2x and trunk.

Committed revision 1914.

Comment 3 Michael Hideo 2012-06-08 01:43:56 UTC
package a publican book, unzip the book, wipe out some values in the publican.cfg file, repackage the book and then verify that there are no array hashes in the spec file of the repackaged book.

Comment 4 Cheryn Tan 2012-06-16 02:01:15 UTC
Checked on publican-3.0-0.fc16.t180

Added the web_name_label and web_product_label parameters to the publican.cfg file and left the values blank. Ran "publican package --lang en-US --binary" from the trunk directory. Spec file of the packaged book does not contain "ARRAY" entries.


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