Bug 732608

Summary: $xml_lang/icons/icons.svg file misplaced when packaging translated books
Product: [Community] Publican Reporter: Ruediger Landmann <r.landmann>
Component: publicanAssignee: Jeff Fearn <jfearn>
Status: CLOSED CURRENTRELEASE QA Contact: Ruediger Landmann <rlandman>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.6CC: mmcallis, publican-list
Target Milestone: 2.7   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: 2.7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-09-05 23:56:50 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Ruediger Landmann 2011-08-23 01:32:25 EDT
Description of problem:
When I package a book that has an $xml_lang/icons/icons.svg file but no $xml_lang/images/icons.svg file, the $xml_lang/icons/ directory gets copied to the root directory of the book. Building a binary RPM then works only if Publican still has access to the $xml_lang/icons/icons.svg file. 

This is a problem when building translated books from Publican-generated SRPMs, because Publican no longer has access to the original $xml_lang/ directory.

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

How reproducible:

Steps to Reproduce:
1. Create a book with an $xml_lang/icons/icons.svg file but no $xml_lang/images/icons.svg file
2. Set up a translated language with update_pot and update_po
3. Generate an SRPM in the translated language with publican package
4. Unpack the SRPM and attempt to generate a binary RPM with publican package --binary
Actual results:
Packaging fails with: 

cp: cannot stat `ru-RU/images/icon.svg': No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.WqpFkF (%install)

RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.WqpFkF (%install)
/usr/bin/rpmbuild exited with value 1
 at /usr/bin/publican line 885

Expected results:
Packaging succeeds

Additional info:
Comment 1 Jeff Fearn 2011-08-23 01:37:11 EDT
icons dir was incorrectly being moved out of language directory when packaging, leading to it not being found when using the tar file for rebuilding. Correctly nested icons dir and made spec templates use correct path.

Applied fix to branches/publican-2x and trunk.

Committed revision 1868.
Comment 2 Jeff Fearn 2011-09-05 23:56:50 EDT
Publican 2.7 has been release and includes a fix for this issue.