Bug 912985

Summary: Encountered problem during building
Product: [Community] Publican Reporter: Terry CHUANG <tchuang>
Component: publicanAssignee: Jeff Fearn 🐞 <jfearn>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.1CC: dayleparker, rglasz, rlandman, xma
Target Milestone: 3.2   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: 3.1.3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-05 02:16:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Terry CHUANG 2013-02-20 06:00:45 UTC
Description of problem:
Issues encountered while running publican update_po, publican update_pot and publican add_revision --member "message"

Version-Release number of selected component (if applicable):
publican-3.1.2-0.el6eng.noarch

How reproducible:


Steps to Reproduce:
1. publican update_po
2. publican update_pot
3. publican add_revision --member "message"
  

Actual results:
1:
WARNING: Unknow config key git_branch, ignoring.

DEBUG: Publican: config loaded
Modification of non-creatable array value attempted, subscript -1 at /usr/share/perl5/vendor_perl/XML/TreeBuilder.pm line 49, <FH> line 6.
skipping non existent directory: pot[tchuang@ccheng Client_Configuration_Guide]$ publican update_po --langs zh-TW
WARNING: Unknow config key git_branch, ignoring.

DEBUG: Publican: config loaded
Modification of non-creatable array value attempted, subscript -1 at /usr/share/perl5/vendor_perl/XML/TreeBuilder.pm line 49, <FH> line 6.


2:
WARNING: Unknow config key git_branch, ignoring.

DEBUG: Publican: config loaded
	Processing file en-US/Book_Info.xml
	Processing file en-US/Bootstrap.xml
	Processing file en-US/Certificates.xml
	Processing file en-US/Client_Configuration_Guide.xml
	Processing file en-US/GPG_Keys.xml
	Processing file en-US/Introduction.xml
	Processing file en-US/Kickstart.xml
	Processing file en-US/Latest_Clients.xml
	Processing file en-US/Revision_History.xml
	Processing file en-US/Sample_Bootstrap_Script.xml
	Processing file en-US/Scripting.xml
[tchuang@ccheng Client_Configuration_Guide]$ publican update_po --langs zh-TW
WARNING: Unknow config key git_branch, ignoring.

DEBUG: Publican: config loaded
	Processing file pot/Book_Info.pot -> zh-TW/Book_Info.po
	Processing file pot/Bootstrap.pot -> zh-TW/Bootstrap.po
	Processing file pot/Certificates.pot -> zh-TW/Certificates.po
	Processing file pot/Client_Configuration_Guide.pot -> zh-TW/Client_Configuration_Guide.po
	Processing file pot/GPG_Keys.pot -> zh-TW/GPG_Keys.po
	Processing file pot/Introduction.pot -> zh-TW/Introduction.po
	Processing file pot/Kickstart.pot -> zh-TW/Kickstart.po
	Processing file pot/Latest_Clients.pot -> zh-TW/Latest_Clients.po
	Processing file pot/Revision_History.pot -> zh-TW/Revision_History.po
	Processing file pot/Sample_Bootstrap_Script.pot -> zh-TW/Sample_Bootstrap_Script.po
	Processing file pot/Scripting.pot -> zh-TW/Scripting.po
Modification of non-creatable array value attempted, subscript -1 at /usr/share/perl5/vendor_perl/XML/TreeBuilder.pm line 49.


3:
WARNING: Unknow config key git_branch, ignoring.

DEBUG: Publican: config loaded
Modification of non-creatable array value attempted, subscript -1 at /usr/share/perl5/vendor_perl/XML/TreeBuilder.pm line 49, <FH> line 6.



Expected results:


Additional info:

Comment 1 Ruediger Landmann 2013-02-21 03:12:13 UTC
Revision_Histories in translated languages that have been affected by this bug contain the whole contents of the book's Entity file; these need to be removed manually or with:

perl -p -i -e 's/^\<\!ENT.*\n//mg' Revision_History.xml

(run in the language directory)

Comment 2 Ruediger Landmann 2013-02-21 06:41:48 UTC
tested in 3.1.2.t2; works as expected.

Comment 4 Terry CHUANG 2013-02-26 05:53:47 UTC
Installed publican-3.1.3-0.el6eng.noarch

After the update, add_revision, update_po issues are now solved, books can be built locally but still have problem with brewing, the output are as follow:

$ rhpkg publican-build --lang zh-TW --message "translation completed for zh-TW"

WARNING: Unknow config key git_branch, ignoring.

DEBUG: Publican: config loaded
Running clean process to ensure stale content is not bundled in packages.
Clean: Removing tmp and publish directories.
Setting up zh-TW
	Merging zh-TW/Book_Info.po >> en-US/Book_Info.xml -> tmp/zh-TW/xml_tmp//Book_Info.xml
	Merging zh-TW/Channel_Management_Guide.po >> en-US/Channel_Management_Guide.xml -> tmp/zh-TW/xml_tmp//Channel_Management_Guide.xml
	Merging zh-TW/Channel_and_Package_Management.po >> en-US/Channel_and_Package_Management.xml -> tmp/zh-TW/xml_tmp//Channel_and_Package_Management.xml
	Merging zh-TW/Errata_Management.po >> en-US/Errata_Management.xml -> tmp/zh-TW/xml_tmp//Errata_Management.xml
	Merging zh-TW/Introduction.po >> en-US/Introduction.xml -> tmp/zh-TW/xml_tmp//Introduction.xml
	Merging zh-TW/Package_Creation.po >> en-US/Package_Creation.xml -> tmp/zh-TW/xml_tmp//Package_Creation.xml
WARNING: Fuzzy message in PO file.
352: "\n	gpg (GnuPG) 1.2.6; Copyright (C) 2004 Free Software\n	Founda...

	Merging zh-TW/Package_Maintenance.po >> en-US/Package_Maintenance.xml -> tmp/zh-TW/xml_tmp//Package_Maintenance.xml
	Merging zh-TW/Preface.po >> en-US/Preface.xml -> tmp/zh-TW/xml_tmp//Preface.xml
	Merging zh-TW/Revision_History.po >> en-US/Revision_History.xml -> tmp/zh-TW/xml_tmp//Revision_History.xml
	Processing file tmp/zh-TW/xml/Common_Content/Conventions.xml -> tmp/zh-TW/xml/Common_Content/Conventions.xml
	Processing file tmp/zh-TW/xml/Common_Content/Feedback.xml -> tmp/zh-TW/xml/Common_Content/Feedback.xml
	Processing file tmp/zh-TW/xml/Common_Content/Legal_Notice.xml -> tmp/zh-TW/xml/Common_Content/Legal_Notice.xml
	Processing file tmp/zh-TW/xml/Common_Content/Program_Listing.xml -> tmp/zh-TW/xml/Common_Content/Program_Listing.xml
	Processing file tmp/zh-TW/xml/Common_Content/Revision_History.xml -> tmp/zh-TW/xml/Common_Content/Revision_History.xml
	Processing file tmp/zh-TW/xml_tmp/Book_Info.xml -> tmp/zh-TW/xml/Book_Info.xml
	Processing file tmp/zh-TW/xml_tmp/Channel_Management_Guide.xml -> tmp/zh-TW/xml/Channel_Management_Guide.xml
	Processing file tmp/zh-TW/xml_tmp/Channel_and_Package_Management.xml -> tmp/zh-TW/xml/Channel_and_Package_Management.xml
	Processing file tmp/zh-TW/xml_tmp/Errata_Management.xml -> tmp/zh-TW/xml/Errata_Management.xml
	Processing file tmp/zh-TW/xml_tmp/Introduction.xml -> tmp/zh-TW/xml/Introduction.xml
	Processing file tmp/zh-TW/xml_tmp/Package_Creation.xml -> tmp/zh-TW/xml/Package_Creation.xml
	Processing file tmp/zh-TW/xml_tmp/Package_Maintenance.xml -> tmp/zh-TW/xml/Package_Maintenance.xml
	Processing file tmp/zh-TW/xml_tmp/Preface.xml -> tmp/zh-TW/xml/Preface.xml
	Processing file tmp/zh-TW/xml_tmp/Revision_History.xml -> tmp/zh-TW/xml/Revision_History.xml
Wide character in print at /usr/share/perl5/Config/Simple.pm line 582.
Modification of non-creatable array value attempted, subscript -1 at /usr/share/perl5/vendor_perl/XML/TreeBuilder.pm line 49.
Could not execute publican_build: Command '['publican', 'package', '--config', 'publican.cfg', '--lang', 'zh-TW']' returned non-zero exit status 255

Comment 6 Ruediger Landmann 2013-02-26 06:09:04 UTC
When I run "publican package" with 3.1.3, all the files in tmp/<lang>/xml/ contain the full set of book entities. This happens in the original language as well as in translation. The command then fails as described in comment 4.

Comment 7 Dayle Parker 2013-02-26 07:09:32 UTC
Testing steps from Comment 0 on 
publican-3.1.3-0.fc17.noarch
wkhtmltopdf-0.10.0_rc2-6.el6eng.x86_64

1, 2. publican update_po and publican update_pot work ok. 
- then executed perl command from Comment 1

3. this command has trouble on my system:

publican add_revision --member "message"
WARNING: Unknow config key git_branch, ignoring.

DEBUG: Publican: config loaded
	Processing file en-US/Revision_History.xml -> en-US/Revision_History.xml
Modification of non-creatable array value attempted, subscript -1 at /usr/share/perl5/vendor_perl/XML/TreeBuilder.pm line 49.


======
Also - publican builds for html and html-single, but has trouble with PDF:

[dayparke@localhost Channel_Management_Guide]$ publican build --langs en-US --formats pdf
WARNING: Unknow config key git_branch, ignoring.

DEBUG: Publican: config loaded
Setting up en-US
	Processing file tmp/en-US/xml/Common_Content/Conventions.xml -> tmp/en-US/xml/Common_Content/Conventions.xml
	Processing file tmp/en-US/xml/Common_Content/Feedback.xml -> tmp/en-US/xml/Common_Content/Feedback.xml
	Processing file tmp/en-US/xml/Common_Content/Legal_Notice.xml -> tmp/en-US/xml/Common_Content/Legal_Notice.xml
	Processing file tmp/en-US/xml/Common_Content/Program_Listing.xml -> tmp/en-US/xml/Common_Content/Program_Listing.xml
	Processing file tmp/en-US/xml/Common_Content/Revision_History.xml -> tmp/en-US/xml/Common_Content/Revision_History.xml
	Processing file tmp/en-US/xml_tmp/Book_Info.xml -> tmp/en-US/xml/Book_Info.xml
	Processing file tmp/en-US/xml_tmp/Channel_Management_Guide.xml -> tmp/en-US/xml/Channel_Management_Guide.xml
	Processing file tmp/en-US/xml_tmp/Channel_and_Package_Management.xml -> tmp/en-US/xml/Channel_and_Package_Management.xml
	Processing file tmp/en-US/xml_tmp/Errata_Management.xml -> tmp/en-US/xml/Errata_Management.xml
	Processing file tmp/en-US/xml_tmp/Introduction.xml -> tmp/en-US/xml/Introduction.xml
	Processing file tmp/en-US/xml_tmp/Package_Creation.xml -> tmp/en-US/xml/Package_Creation.xml
	Processing file tmp/en-US/xml_tmp/Package_Maintenance.xml -> tmp/en-US/xml/Package_Maintenance.xml
	Processing file tmp/en-US/xml_tmp/Preface.xml -> tmp/en-US/xml/Preface.xml
	Processing file tmp/en-US/xml_tmp/Revision_History.xml -> tmp/en-US/xml/Revision_History.xml
Beginning work on en-US
DTD Validation OK
	Starting pdf
	Using XML::LibXSLT on /usr/share/publican/xsl/html-pdf.xsl

DEBUG: Publican::Builder: TODO: adjustColumnWidths function is not fully implemented!

DEBUG: Publican::Builder: TODO: adjustColumnWidths function is not fully implemented!
ERROR: Cannot find Author file Author_Group.xml. at /usr/share/perl5/vendor_perl/Publican/Builder.pm line 1099

* Create a new bug for this?

Comment 8 Dayle Parker 2013-02-26 07:11:05 UTC
This fails for me also - same fail message as Comment 4:

$ rhpkg publican-build --lang zh-TW --message "translation completed for zh-TW"

Comment 9 Ruediger Landmann 2013-02-27 00:51:24 UTC
Build 3.1.3.t2 works as expected on F18

Comment 10 Ruediger Landmann 2013-02-27 00:54:26 UTC
Sorry, that was supposed to say .t1 :)

Comment 11 Ruediger Landmann 2013-02-27 01:28:31 UTC
Note to testers: we should check (at least): build, update_pot/update_po, add_revision, and package

Comment 12 Dayle Parker 2013-02-28 05:42:57 UTC
Build, update_pot/update_po, add_revision, and package work fine now in:

publican-3.1.3-0.fc17.t3.noarch

Tested the Channel_Management_Guide as above.

Comment 13 Jeff Fearn 🐞 2013-03-05 02:16:24 UTC
This bug has been fixed in Publican 3.1.3