Bug 875125
Summary: | epub output includes files that are not needed (and not listed in the OPF file) | ||
---|---|---|---|
Product: | [Community] Publican | Reporter: | Raphaël Hertzog <raphael> |
Component: | publican | Assignee: | Jeff Fearn 🐞 <jfearn> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | tools-bugs <tools-bugs> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 3.0 | CC: | rlandman+disabled, rlandman |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | 4.0.0 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-12-19 02:46:37 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Raphaël Hertzog
2012-11-09 15:20:11 UTC
We used to have a feature that removed the non referenced images from the output and it resulted in a lot of complaining. So much so we reduced it to: $ publican print_unused_images List of unused Image files in en-US images/drupal_add_user.png pondering ... I don't know what those complaints were… but if they were legitimate, then maybe it means that we need some options? In the specific case of epubs the inclusion is invalid and unused files should be excluded. (In reply to Jeff Fearn from comment #3) > In the specific case of epubs the inclusion is invalid and unused files > should be excluded. In the specific case of epubs the inclusion is invalid and unused images should be excluded. FTFM The approach I'm going to take here is to add every file in the OEBPS directory to the manifest. To remove the files we'd need to parse every XML, CSS, and jscript file. I don't think that is realistic. HSS-QE has reviewed and declined this request. QE for this bug will be handled by IED. Made code include all files in list. Excluding unused content from output is a more generic problem as it affects all HTML output. To ssh://git.fedorahosted.org/git/publican.git 8711fbe..9d087c5 HEAD -> devel Unused images still seem to get included by publican-3.9.9-0.fc19.t4.noarch This images directory contains two images, one used and one not. Both of them get included in the .epub: $ ls en-US/images/ powertop.png Sun_Conure_on_perch.jpg $ publican build --formats epub --langs en-US $ ls tmp/en-US/epub/OEBPS/images/ powertop.png Sun_Conure_on_perch.jpg $ unzip -l tmp/en-US/Red_Hat_Enterprise_Linux-6-Power_Management_Guide-en-US.epub |grep OEBPS/images 125512 10-11-2013 11:10 OEBPS/images/powertop.png 3362485 10-11-2013 11:10 OEBPS/images/Sun_Conure_on_perch.jpg To clarify on #7, the fix in this bug is to correctly list all files shipped. A fix for shipping unused files is a much larger issue and covers more than epubs, nd won't be addressed in this bug. In that case, in an EPUB built with publican-3.9.9-0.fc19.t4.noarch with an usused image: $ unzip -l tmp/en-US/Red_Hat_Enterprise_Linux-6-Power_Management_Guide-en-US.epub |grep OEBPS/images 125512 10-12-2013 13:41 OEBPS/images/powertop.png 3362485 10-12-2013 13:41 OEBPS/images/Sun_Conure_on_perch.jpg $ grep powertop tmp/en-US/epub/OEBPS/content.opf and $ grep perch tmp/en-US/epub/OEBPS/content.opf confirm both these files in the OPF file; and $ $ java -jar epubcheck-3.0.1.jar /home/rlandmann/Documents/books/rhel/Power_Management_Guide/trunk/6-trunk/tmp/en-US/Red_Hat_Enterprise_Linux-6-Power_Management_Guide-en-US.epub is clean |