Here's the fix

Attached is the debdiff
http://mentors.debian.net/debian/pool/main/c/chm2pdf/

diff -u chm2pdf-0.9/debian/changelog chm2pdf-0.9/debian/changelog
--- chm2pdf-0.9/debian/changelog
+++ chm2pdf-0.9/debian/changelog
@@ -1,3 +1,11 @@
+chm2pdf (0.9-2) unstable; urgency=low
+
+  * Added patch for htmldoc error (Closes: #477390)
+  * Debian/rules: Added simple patchsystem to cdbs
+  * Added watch file
+
+ -- Steve Stalcup <[EMAIL PROTECTED]>  Wed, 07 May 2008 18:22:19 -0400
+
 chm2pdf (0.9-1) unstable; urgency=low
 
   * Initial release (Closes: #469289)  
diff -u chm2pdf-0.9/debian/rules chm2pdf-0.9/debian/rules
--- chm2pdf-0.9/debian/rules
+++ chm2pdf-0.9/debian/rules
@@ -3,6 +3,7 @@
 DEB_PYTHON_SYSTEM=pysupport
 
 include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/rules/simple-patchsys.mk
 include /usr/share/cdbs/1/class/python-distutils.mk
 
 
only in patch2:
unchanged:
--- chm2pdf-0.9.orig/debian/patches/htmldoc.patch
+++ chm2pdf-0.9/debian/patches/htmldoc.patch
@@ -0,0 +1,36 @@
+diff -Nurp old/chm2pdf new/chm2pdf
+--- old/chm2pdf        2008-05-07 18:15:44.000000000 -0400
++++ new/chm2pdf        2008-05-07 18:15:14.000000000 -0400
+@@ -143,14 +143,8 @@ def correct_file(input_file, output_file
+ 
+     f=open(output_file,'w')
+     f.write(page)
+-    f.close
+-    #hack to guarantee that the file has been wholly written
+-    f=open(output_file,'r')
+-    while len(f.read()) < len(page):
+-        pass
+     f.close()
+-
+-
++    
+ def convert_to_pdf(cfile, filename, outputfilename, options):
+     '''
+     Performs actual converting.
+@@ -416,9 +410,14 @@ def convert_to_pdf(cfile, filename, outp
+             elif key=='webpage': htmldoc_opts += ' ' + value
+            
+     print 'htmldoc' + htmldoc_opts + ' ' + htmlout_filename_list + " -f "+ 
outputfilename + " > /dev/null"
+-    os.system ('htmldoc' + htmldoc_opts + ' ' + htmlout_filename_list + " -f 
"+ outputfilename + " > /dev/null")
++    exit_value=os.system ('htmldoc' + htmldoc_opts + ' ' + 
htmlout_filename_list + " -f "+ outputfilename + " > /dev/null")
+ 
+-    print 'Written file ' + outputfilename
++    if exit_value != 0:
++        print 'Something wrong happened when launching htmldoc.'
++        print 'exit value: ',exit_value
++        print 'Check if output exists or if it is good.'
++    else:
++        print 'Written file ' + outputfilename
+     print 'Done.'
+     
+ 
only in patch2:
unchanged:
--- chm2pdf-0.9.orig/debian/watch
+++ chm2pdf-0.9/debian/watch
@@ -0,0 +1,6 @@
+version=3
+http://code.google.com/p/chm2pdf/downloads/list \
+http://chm2pdf.googlecode.com/files/chm2pdf-([\d.]+)\.tar\.gz
+
+
+

Reply via email to