Source: debian-edu-doc
Severity: normal
Tags: patch pending

The binary packages use a common 'images' directory for all included 
manuals causing the jessie and wheezy HTML manuals to show wrong images 
(jessie images in wheezy manual) or wrongly linking to an (en) image 
although a 'localized' image is available (jessie manual).

Storing the images in manual specific directories avoids this issue.

The fix has been tested and committed to git.


diff --git a/documentation/common/Makefile.common 
b/documentation/common/Makefile.common
index 807d2c2..369f1e2 100644
--- a/documentation/common/Makefile.common
+++ b/documentation/common/Makefile.common
@@ -99,16 +99,17 @@ install: build
                if [ -e $(name).$$f.html ] ; then \
                        cp $(name).$$f.html $$LANGPATH/$(name).html ; \
                        sed -i 
"s/href=\"$(name).$$f.html/href=\"$(name).html/g" $$LANGPATH/$(name).html ; \
+                       sed -i "s#./images#./$(name)-images#g" 
$$LANGPATH/$(name).html ; \
                        if [ "$$f" = "en" ] ; then \
                          for i in images/*.png ; \
                                do convert -units PixelsPerCentimeter -density 
42x42 $$i $${i%.png}.pdf ; \
                          done ; \
-                         mkdir -p $$LANGPATH/images/ ; \
-                         find images -maxdepth 1 -type f -exec cp \{\} 
$$LANGPATH/images/ \; ; \
+                         mkdir -p $$LANGPATH/$(name)-images/ ; \
+                         find images -maxdepth 1 -type f -exec cp \{\} 
$$LANGPATH/$(name)-images/ \; ; \
                          sed s/\.png"/.pdf"/g $(name).xml > $(name).$$f.xml ; \
                          $(DBLATEX) -o $$LANGPATH/$(name).pdf $(name).$$f.xml 
--param=lingua=$$f ; \
                        else \
-                               mkdir -p $$LANGPATH/images ; \
+                               mkdir -p $$LANGPATH/$(name)-images ; \
                                cd images ; \
                                if [ -d $$f ] ; then \
                                        for i in $$f/*.png ; \
@@ -117,14 +118,15 @@ install: build
                                fi ; \
                                for i in *.* ; do \
                                        if [ -e $$f/$$i ] ; then \
-                                               cp -v $$f/$$i 
$$LANGPATH/images/ ; \
+                                               cp -v $$f/$$i 
$$LANGPATH/$(name)-images/ ; \
                                        else \
-                                               ln -sf 
../../debian-edu-doc-en/images/$$i $$LANGPATH/images/$$i ; \
+                                               ln -sf 
../../debian-edu-doc-en/$(name)-images/$$i $$LANGPATH/$(name)-images/$$i ; \
                                        fi ; done ; \
                                cd .. ; \
                                sed -i s/\.png"/.pdf"/g $(name).$$f.xml ; \
+                               sed -i "s#./images#./$(name)-images#g" 
$(name).$$f.xml ; \
                          mv images images_tmp_away ; $(DBLATEX) -I $$LANGPATH/ 
-I $(DESTDIR)/debian-edu-doc-en/$(DESTPATH)/debian-edu-doc-en/ -o 
$$LANGPATH/$(name).pdf $(name).$$f.xml --param=lingua=$$f ; mv images_tmp_away 
images ; \
-                         rm $$LANGPATH/images/*.pdf ; \
+                         rm $$LANGPATH/$(name)-images/*.pdf ; \
                        fi ; \
                fi ; \
                if [ -e $(name).epub ] ; then \
@@ -134,7 +136,7 @@ install: build
                        cp $(name).$$f.epub $$LANGPATH/$(name).epub ; \
                fi ; \
        done            
-       rm 
$(DESTDIR)/debian-edu-doc-en/$(DESTPATH)/debian-edu-doc-en/images/*.pdf ; \
+       rm 
$(DESTDIR)/debian-edu-doc-en/$(DESTPATH)/debian-edu-doc-en/$(name)-images/*.pdf 
; \
 
 clean:
        rm -f *.pdf images/*.pdf images/*/*.pdf


Wolfgang

Attachment: signature.asc
Description: Digital signature

Reply via email to