Bug 744964 - Empty fields in packaged version of publian.cfg file corrupt ToC on website when repackaged
Empty fields in packaged version of publian.cfg file corrupt ToC on website w...
Status: CLOSED CURRENTRELEASE
Product: Publican
Classification: Community
Component: publican (Show other bugs)
2.8
Unspecified Unspecified
unspecified Severity unspecified
: 3.0
: ---
Assigned To: Jeff Fearn
tools-bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-10 21:35 EDT by Ruediger Landmann
Modified: 2012-10-30 23:11 EDT (History)
4 users (show)

See Also:
Fixed In Version: 3.0.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-10-30 23:11:36 EDT
Type: ---
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 Ruediger Landmann 2011-10-10 21:35:45 EDT
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-10 23:25:31 EDT
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-07 21:43:56 EDT
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-15 22:01:15 EDT
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.