This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 860438

Summary: Sorting of revisions when packaging translations appears to be incorrect?
Product: [Community] Publican Reporter: Stephen Gordon <sgordon>
Component: publicanAssignee: Jeff Fearn <jfearn>
Status: CLOSED DUPLICATE QA Contact: Ruediger Landmann <rlandman>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.0CC: mospina, rlandman
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-09-25 17:46:56 EDT Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Stephen Gordon 2012-09-25 15:56:50 EDT
Description of problem:

I am working with a book that defines the following revisions in the en-US/Revision_History.xml:

<revnumber>0-12</revnumber>
<revnumber>0-11</revnumber>
<revnumber>0-10</revnumber>
<revnumber>0-9</revnumber>
<revnumber>0-8</revnumber>
<revnumber>0-7</revnumber>
<revnumber>0-6</revnumber>
<revnumber>0-5</revnumber>
<revnumber>0-3</revnumber>
<revnumber>0-3</revnumber>
<revnumber>0-2</revnumber>
<revnumber>0-1</revnumber>

When I look at the translation for this book I see there is a ja-JP/Revision_History.xml file with the following revision in it for the translator credits:

<revnumber>0-12.1</revnumber>

When I attempt to package the ja-JP translation using rhpkg publican-build --lang=ja-JP or publican package --lang=ja-JP I get the following error from rpmbuild:

error: %changelog not in descending chronological order

When I look in tmp/ja-JP/xml_tmp/Revision_History.xml I can see that this is because of the way the revisions are being ordered:

$ grep -o '<revnumber.*' tmp/ja-JP/xml_tmp/Revision_History.xml
<revnumber>0-9</revnumber>
<revnumber>0-8</revnumber>
<revnumber>0-7</revnumber>
<revnumber>0-6</revnumber>
<revnumber>0-5</revnumber>
<revnumber>0-3</revnumber>
<revnumber>0-3</revnumber>
<revnumber>0-2</revnumber>
<revnumber>0-12.1</revnumber>
<revnumber>0-12</revnumber>
<revnumber>0-11</revnumber>
<revnumber>0-10</revnumber>
<revnumber>0-1</revnumber>

Not only is the single revision added by the translators listed out of order, so are some of the English revisions. I would have expected the sorting of these revisions to be as follows:

<revnumber>0-12.1</revnumber>
<revnumber>0-12</revnumber>
<revnumber>0-11</revnumber>
<revnumber>0-10</revnumber>
<revnumber>0-9</revnumber>
<revnumber>0-8</revnumber>
<revnumber>0-7</revnumber>
<revnumber>0-6</revnumber>
<revnumber>0-5</revnumber>
<revnumber>0-3</revnumber>
<revnumber>0-3</revnumber>
<revnumber>0-2</revnumber>
<revnumber>0-1</revnumber>

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

publican-3.0-0.fc17.t216.noarch

How reproducible:


Steps to Reproduce:

This will reproduce the sorting of the revisions I describe above, all the revisions being added have the same date so it won't reproduce the rpmbuild error but if you tweak the 0-10 or 0-11 revision to be one day after the rest before step 4 then you will get that as well.

1. publican create --name "Test"
2. cd Test
3. for I in 1 2 3 4 5 6 7 8 9 10 11; do publican add_revision --lang=en-US --revnumber="0-${I}" --member="TEST" --firstname="Dude" --surname="McPants" --email="dude@mcpants.com"; done
4. publican update_pot
5. publican update_po --langs=ja-JP
6. publican build --langs=ja-JP --formats=html

Actual results:

Revision history is sorted as follows...

$ grep -o '<revnumber.*' tmp/ja-JP/xml_tmp/Revision_History.xml 
<revnumber>0.0-0</revnumber>
<revnumber>0-9</revnumber>
<revnumber>0-8</revnumber>
<revnumber>0-7</revnumber>
<revnumber>0-6</revnumber>
<revnumber>0-5</revnumber>
<revnumber>0-4</revnumber>
<revnumber>0-3</revnumber>
<revnumber>0-2</revnumber>
<revnumber>0-11.1</revnumber>
<revnumber>0-11</revnumber>
<revnumber>0-10</revnumber>
<revnumber>0-1</revnumber>

Expected results:

Revision history sorted as follows...

<revnumber>0-11.1</revnumber>
<revnumber>0-11</revnumber>
<revnumber>0-10</revnumber>
<revnumber>0-9</revnumber>
<revnumber>0-8</revnumber>
<revnumber>0-7</revnumber>
<revnumber>0-6</revnumber>
<revnumber>0-5</revnumber>
<revnumber>0-4</revnumber>
<revnumber>0-3</revnumber>
<revnumber>0-2</revnumber>
<revnumber>0-1</revnumber>
<revnumber>0.0-0</revnumber>
Comment 1 Jeff Fearn 2012-09-25 17:46:56 EDT

*** This bug has been marked as a duplicate of bug 845432 ***