Bug 539741 - Can't call method "as_trimmed_text"
Summary: Can't call method "as_trimmed_text"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Publican
Classification: Community
Component: publican
Version: 1.6
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Ruediger Landmann
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-11-20 22:40 UTC by eric
Modified: 2010-11-24 04:18 UTC (History)
5 users (show)

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


Attachments (Terms of Use)

Description eric 2009-11-20 22:40:30 UTC
Description of problem: When trying to build a SRPM package I receive the following error:
Can't call method "as_trimmed_text" on an undefined value at /usr/lib/perl5/vendor_perl/5.10.0/Publican/Builder.pm line 1291.


Version-Release number of selected component (if applicable): 1.2-0.fc12


How reproducible: Always


Steps to Reproduce:
1. publican package --lang=en-US --short_sighted --binary --desktop
  
Actual results:
Receive error above.

Expected results:
Builds the SRPM and associated files.

Additional info:

Comment 1 Jeff Fearn 🐞 2009-11-21 02:21:43 UTC
This is due to the Revision_History file being incorrectly formatted and the code not catching this and notifying the user.

I modified the RPM spec file creation code to validate fields and generate messages when the format is incorrect.

e.g.

Missing mandatory field 'revnumber' in revision history. at /usr/bin/publican line 469


Rudi, Section 3.1.8. of the Users Guide needs to be updated with what the mandatory Revision History format is for building RPMs. It is not possible to generate valid spec files without this information. There must be at least one valid revision to generate a valid spec file.

Here are the rules:

* There must exist a file <xml_lang>/Revision_History.xml
* This file must contain a valid DocBook revhistory
* In addition each revision must contain
* * revnumber
* * date
* * author
* * * firstname
* * * surname
* * * email
* * revdescription
* * * simplelist
* * * * member

This is the minimum structure, there can be multiple revisions, members etc. The User Guide has a very good example of this format in it's own Revision_History.xml.

Cheers, Jeff.

Comment 2 eric 2009-11-21 05:15:48 UTC
Hmmm... so here is the top revision in my Revision History...

<revhistory>
        <revision>
                <revnumber>12.1-1</revnumber>
                <date>Fri Nov 20 2009</date>
                <author>
                        <firstname>Eric</firstname>
                        <surname>Christensen</surname>
                        <email>sparks</email>
                </author>
                <revdescription>
                        <simplelist>
                                <member>Official F12 version.</member>
                        </simplelist>
                </revdescription>
        </revision>

I checked my Book_Info.xml to make sure it matched as well.  I've had this problem before, iirc.  I did do a test build on the accessibility guide and it worked fine so it's definitely me and not Publican.

Comment 3 Jeff Fearn 🐞 2009-11-23 00:28:23 UTC
(In reply to comment #2)
> I checked my Book_Info.xml to make sure it matched as well.

Just to clarify, the Revison History needs to be in en-US/Revision_History.xml and not in Book_Info.xml. It doesn't make a difference if this Revision_History.xml is not xi:included anywhere. The file is accessed directly.

This is change in behavior from the publican 0.x, which would search for the file the Revision History was in.

Cheers, Jeff.

Comment 4 Ruediger Landmann 2009-11-23 01:22:32 UTC
(In reply to comment #3)

> This is change in behavior from the publican 0.x, which would search for the
> file the Revision History was in.

Oh! Which means that section 3.1.8 of the User Guide is now incorrect. I'll fix this.

Comment 5 Fedora Update System 2009-12-08 02:14:55 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:15 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:13:53 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:45 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.