Bug 540685 - condition: parameter in .cfg does not work as expected
Summary: condition: parameter in .cfg does not work as expected
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Publican
Classification: Community
Component: publican
Version: 1.6
Hardware: All
OS: Linux
low
high
Target Milestone: ---
Assignee: Jeff Fearn 🐞
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 540691
TreeView+ depends on / blocked
 
Reported: 2009-11-23 23:02 UTC by Jared MORGAN
Modified: 2015-08-10 01:21 UTC (History)
7 users (show)

Fixed In Version: 1.3-0.fc12
Clone Of:
Environment:
Last Closed: 2009-12-10 04:15:00 UTC
Embargoed:


Attachments (Terms of Use)

Description Jared MORGAN 2009-11-23 23:02:43 UTC
Description of problem:

The condition: parameter in the publican.cfg file does not allow conditional content to be output.  

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

Publican 1.1

How reproducible:

100%

Steps to Reproduce:
1. svn co https://svn.devel.redhat.com/repos/ecs/JBoss_Documentation_Guide/
2. Specify condition: ent in the .cfg file
3. publican build --formats html-single --langs en-US
  
Actual results:

In the Preface.xml, there are two feedback.xml xi:includes that have the condition attribute set.  One has condition="ent" and the other has condition="comm".  

When you execute the publish command, both are excluded from the publish

Expected results:

The Feedback.xml with condition="comm" is excluded from the publish, and the condition="ent" is included in the publish.

Additional info:

I have also tried removing the conditional elements from the xi:includes, and applying the conditional attributes to two separate <para> tags in the single Feedback.xml.  Because of the current behaviour, this results in both tags being excluded at parse time, and Publican reports an invalid strucutre error.

Comment 1 Jeff Fearn 🐞 2009-11-23 23:28:41 UTC
When you set a condition there is a dirty big error message:

Use of uninitialized value in regexp compilation at /usr/lib/perl5/vendor_perl/5.8.8/Publican/XmlClean.pm line 469.

Bug in XmlClean checking wrong parameter list, made it use the right one.

Comment 2 Jared MORGAN 2009-11-24 00:16:12 UTC
Did you want me to test the functionality "in the field" Jeff?  If not, when would 1.3 be available in the wild?

Comment 3 Jeff Fearn 🐞 2009-11-24 00:39:43 UTC
(In reply to comment #2)
> Did you want me to test the functionality "in the field" Jeff?

You can feel free to check out the code and compile from source if you want.

svn co http://svn.fedorahosted.org/svn/publican/trunk/publican
cd publican
perl Build.pl
./Build local

Assumes you ahve sudo setup. You may need to install deps when running perl Build.pl

>  If not, when
> would 1.3 be available in the wild?  

We don't have time tables, when release when it feels right or when enough cider has been consumed.

Comment 4 Jared MORGAN 2009-11-24 00:50:43 UTC
No problem Jeff.  Thanks for the heads-up. And thanks for fixing it so quickly.

Comment 5 Fedora Update System 2009-12-08 02:15:05 UTC
publican-1.3-0.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/publican-1.3-0.fc12

Comment 6 Fedora Update System 2009-12-08 02:18:25 UTC
publican-1.3-0.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/publican-1.3-0.fc11

Comment 7 Fedora Update System 2009-12-10 04:14:02 UTC
publican-1.3-0.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2009-12-10 04:26:54 UTC
publican-1.3-0.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.


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