Bug 540685 - condition: parameter in .cfg does not work as expected
condition: parameter in .cfg does not work as expected
Status: CLOSED ERRATA
Product: Publican
Classification: Community
Component: publican (Show other bugs)
1.6
All Linux
low Severity high
: ---
: ---
Assigned To: Jeff Fearn
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 540691
  Show dependency treegraph
 
Reported: 2009-11-23 18:02 EST by Jared MORGAN
Modified: 2015-08-09 21:21 EDT (History)
7 users (show)

See Also:
Fixed In Version: 1.3-0.fc12
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-12-09 23:15:00 EST
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 Jared MORGAN 2009-11-23 18:02:43 EST
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 18:28:41 EST
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-23 19:16:12 EST
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-23 19:39:43 EST
(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-23 19:50:43 EST
No problem Jeff.  Thanks for the heads-up. And thanks for fixing it so quickly.
Comment 5 Fedora Update System 2009-12-07 21:15:05 EST
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-07 21:18:25 EST
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-09 23:14:02 EST
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-09 23:26:54 EST
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.