[Python-apps-commits] r2025 - in packages/pkpgcounter/trunk/debian (6 files)

akumar at users.alioth.debian.org akumar at users.alioth.debian.org
Thu Dec 4 13:51:14 UTC 2008


    Date: Thursday, December 4, 2008 @ 13:51:13
  Author: akumar
Revision: 2025

  + switch Vcs-Browser field to viewsvn
  + Use standards version 3.8.0 (no changes needed).
  + Use quilt for patches.
  + Don't depend obsolete gs, gs-esp.
  + Recommend texlive-latex-bin instead of tetex-bin.
* debian/rules:
  + Adapt for use with quilt.
  + Remove ugly rmdir hack.
* debian/patches/01_fix_tempfile.diff
  + Ensure temporary files are closed. (Closes: #507770)

Added:
  packages/pkpgcounter/trunk/debian/patches/
  packages/pkpgcounter/trunk/debian/patches/01_fix_tempfile.diff
  packages/pkpgcounter/trunk/debian/patches/series
Modified:
  packages/pkpgcounter/trunk/debian/changelog
  packages/pkpgcounter/trunk/debian/control
  packages/pkpgcounter/trunk/debian/rules

Modified: packages/pkpgcounter/trunk/debian/changelog
===================================================================
--- packages/pkpgcounter/trunk/debian/changelog	2008-12-04 03:20:26 UTC (rev 2024)
+++ packages/pkpgcounter/trunk/debian/changelog	2008-12-04 13:51:13 UTC (rev 2025)
@@ -1,7 +1,16 @@
 pkpgcounter (3.50-3) UNRELEASED; urgency=low
 
   * debian/control
-    - switch Vcs-Browser field to viewsvn
+    + switch Vcs-Browser field to viewsvn
+    + Use standards version 3.8.0 (no changes needed).
+    + Use quilt for patches.
+    + Don't depend obsolete gs, gs-esp.
+    + Recommend texlive-latex-bin instead of tetex-bin.
+  * debian/rules:
+    + Adapt for use with quilt.
+    + Remove ugly rmdir hack.
+  * debian/patches/01_fix_tempfile.diff
+    + Ensure temporary files are closed. (Closes: #507770)
 
  -- Sandro Tosi <morph at debian.org>  Mon, 03 Nov 2008 22:47:47 +0100
 

Modified: packages/pkpgcounter/trunk/debian/control
===================================================================
--- packages/pkpgcounter/trunk/debian/control	2008-12-04 03:20:26 UTC (rev 2024)
+++ packages/pkpgcounter/trunk/debian/control	2008-12-04 13:51:13 UTC (rev 2025)
@@ -4,8 +4,8 @@
 Maintainer: Python Applications Packaging Team <python-apps-team at lists.alioth.debian.org>
 Uploaders: Kumar Appaiah <akumar at ee.iitm.ac.in>, Jerome Alet <alet at librelogiciel.com>
 Build-Depends-Indep: python, python-central (>= 0.5), python-imaging
-Build-Depends: debhelper (>= 5.0.37.3)
-Standards-Version: 3.7.3
+Build-Depends: debhelper (>= 5.0.37.3), quilt
+Standards-Version: 3.8.0
 XS-Python-Version: current
 Vcs-Svn: svn://svn.debian.org/python-apps/packages/pkpgcounter/trunk
 Vcs-Browser: http://svn.debian.org/viewsvn/python-apps/packages/pkpgcounter/trunk/
@@ -13,9 +13,9 @@
 
 Package: pkpgcounter
 Architecture: all
-Depends: ${python:Depends}, ${misc:Depends}, python-imaging (>= 1.1.2-3.2), ghostscript | gs | gs-esp
+Depends: ${python:Depends}, ${misc:Depends}, python-imaging (>= 1.1.2-3.2), ghostscript
 Recommends: python-psyco [i386 hurd-i386 netbsd-i386 kfreebsd-i386],  
- imagemagick, xvfb, xauth, abiword, tetex-bin 
+ imagemagick, xvfb, xauth, abiword, texlive-latex-bin
 Suggests: ghostpcl | gspcl | ghostpdl | pcl6 
 XB-Python-Version: ${python:Versions}
 Description: Computes number of pages or quantity of ink needed to print documents

Added: packages/pkpgcounter/trunk/debian/patches/01_fix_tempfile.diff
===================================================================
--- packages/pkpgcounter/trunk/debian/patches/01_fix_tempfile.diff	                        (rev 0)
+++ packages/pkpgcounter/trunk/debian/patches/01_fix_tempfile.diff	2008-12-04 13:51:13 UTC (rev 2025)
@@ -0,0 +1,55 @@
+Index: pkpgcounter-3.50/pkpgpdls/analyzer.py
+===================================================================
+--- pkpgcounter-3.50.orig/pkpgpdls/analyzer.py	2008-12-04 07:35:51.000000000 -0600
++++ pkpgcounter-3.50/pkpgpdls/analyzer.py	2008-12-04 07:37:31.000000000 -0600
+@@ -55,7 +55,6 @@
+         self.options = options
+         self.filename = filename
+         self.workfile = None 
+-        self.mustclose = None
+         
+     def getJobSize(self) :    
+         """Returns the job's size."""
+@@ -97,7 +96,6 @@
+         
+     def openFile(self) :    
+         """Opens the job's data stream for reading."""
+-        self.mustclose = False  # by default we don't want to close the file when finished
+         if hasattr(self.filename, "read") and hasattr(self.filename, "seek") :
+             # filename is in fact a file-like object 
+             infile = self.filename
+@@ -107,7 +105,6 @@
+         else :    
+             # normal file
+             self.workfile = open(self.filename, "rb")
+-            self.mustclose = True
+             return
+             
+         # Use a temporary file, always seekable contrary to standard input.
+@@ -123,8 +120,7 @@
+             
+     def closeFile(self) :        
+         """Closes the job's data stream if we have to."""
+-        if self.mustclose :
+-            self.workfile.close()    
++        self.workfile.close()    
+         
+     def readFirstAndLastBlocks(self, inputfile) :
+         """Reads the first and last blocks of data."""
+--- pkpgcounter-3.50.orig/pkpgpdls/pjl.py
++++ pkpgcounter-3.50/pkpgpdls/pjl.py
+@@ -129,12 +129,12 @@
+         klass = PJLParser
+         if arg == "-" :
+             infile = sys.stdin
+-            mustclose = 0
++            mustclose = False
+         else :    
+             if arg.endswith(".ejl") :
+                 klass = EJLParser
+             infile = open(arg, "rb")
+-            mustclose = 1
++            mustclose = True
+         try :
+             parser = klass(infile.read(), debug=1)
+         except PJLParserError, msg :    

Added: packages/pkpgcounter/trunk/debian/patches/series
===================================================================
--- packages/pkpgcounter/trunk/debian/patches/series	                        (rev 0)
+++ packages/pkpgcounter/trunk/debian/patches/series	2008-12-04 13:51:13 UTC (rev 2025)
@@ -0,0 +1 @@
+01_fix_tempfile.diff

Modified: packages/pkpgcounter/trunk/debian/rules
===================================================================
--- packages/pkpgcounter/trunk/debian/rules	2008-12-04 03:20:26 UTC (rev 2024)
+++ packages/pkpgcounter/trunk/debian/rules	2008-12-04 13:51:13 UTC (rev 2025)
@@ -5,14 +5,16 @@
 # The versions of python currently supported
 PYTHON=$(shell pyversions -r)
 
+include /usr/share/quilt/quilt.make
+
 build: build-stamp
 
-build-stamp:
+build-stamp: patch
 	dh_testdir
 	$(PYTHON) setup.py build
 	touch $@
 
-clean:
+clean: unpatch
 	dh_testdir
 	dh_testroot
 	rm -f *-stamp
@@ -26,7 +28,7 @@
 	dh_testdir
 	dh_testroot
 	$(PYTHON) setup.py install --root `pwd`/debian/pkpgcounter/
-	find ./debian/pkpgcounter/usr/lib/ -name '*\.py' | xargs sed -i -e '1 s|^#\!.*python.*||'
+	find ./debian/pkpgcounter/usr/lib -name '*\.py' | xargs sed -i -e '1 s|^#\!.*python.*||'
 	sed -i -e '1 s|^#\!.*python.*|#!/usr/bin/python|' ./debian/pkpgcounter/usr/bin/pkpgcounter
 	rm ./debian/pkpgcounter/usr/share/doc/pkpgcounter/COPYING
 
@@ -39,7 +41,6 @@
 	dh_installexamples
 	dh_installchangelogs
 	dh_pycentral
-	-rmdir ./debian/pkpgcounter/usr/lib
 	dh_compress -X.py
 	dh_fixperms
 	dh_installdeb




More information about the Python-apps-commits mailing list