[Python-apps-commits] r7671 - in packages/discus/trunk/debian (16 files)

jwilk at users.alioth.debian.org jwilk at users.alioth.debian.org
Tue Oct 18 21:01:32 UTC 2011


    Date: Tuesday, October 18, 2011 @ 21:01:31
  Author: jwilk
Revision: 7671

debian/patches/*: get rid of executable bit and .dpatch extension.

Added:
  packages/discus/trunk/debian/patches/01_readme_change_url.diff
    (from rev 7670, packages/discus/trunk/debian/patches/01_readme_change_url.dpatch)
  packages/discus/trunk/debian/patches/02_manpage_pre-adoption.diff
    (from rev 7670, packages/discus/trunk/debian/patches/02_manpage_pre-adoption.dpatch)
  packages/discus/trunk/debian/patches/03_discusrc_labels.diff
    (from rev 7670, packages/discus/trunk/debian/patches/03_discusrc_labels.dpatch)
  packages/discus/trunk/debian/patches/04_discus_correct_mail_url.diff
    (from rev 7670, packages/discus/trunk/debian/patches/04_discus_correct_mail_url.dpatch)
  packages/discus/trunk/debian/patches/10_bts-291276_space_mountpoint.diff
    (from rev 7670, packages/discus/trunk/debian/patches/10_bts-291276_space_mountpoint.dpatch)
  packages/discus/trunk/debian/patches/20_bts-312262_reserved_space.diff
    (from rev 7670, packages/discus/trunk/debian/patches/20_bts-312262_reserved_space.dpatch)
  packages/discus/trunk/debian/patches/30_bts-224393_exclude_fs.diff
    (from rev 7670, packages/discus/trunk/debian/patches/30_bts-224393_exclude_fs.dpatch)
Modified:
  packages/discus/trunk/debian/changelog
  packages/discus/trunk/debian/patches/series
Deleted:
  packages/discus/trunk/debian/patches/01_readme_change_url.dpatch
  packages/discus/trunk/debian/patches/02_manpage_pre-adoption.dpatch
  packages/discus/trunk/debian/patches/03_discusrc_labels.dpatch
  packages/discus/trunk/debian/patches/04_discus_correct_mail_url.dpatch
  packages/discus/trunk/debian/patches/10_bts-291276_space_mountpoint.dpatch
  packages/discus/trunk/debian/patches/20_bts-312262_reserved_space.dpatch
  packages/discus/trunk/debian/patches/30_bts-224393_exclude_fs.dpatch

Modified: packages/discus/trunk/debian/changelog
===================================================================
--- packages/discus/trunk/debian/changelog	2011-10-18 20:58:15 UTC (rev 7670)
+++ packages/discus/trunk/debian/changelog	2011-10-18 21:01:31 UTC (rev 7671)
@@ -6,7 +6,7 @@
   * Add build-arch, build-indep and binary-arch targets to debian/rules.
   * Convert to source format 3.0 (quilt).
   * Exclude more filesystems by default (closes: #224393,
-    04_bts-224393_exclude_fs.dpatch).
+    04_bts-224393_exclude_fs.diff).
 
  -- Jakub Wilk <jwilk at debian.org>  Tue, 18 Oct 2011 22:56:53 +0200
 

Copied: packages/discus/trunk/debian/patches/01_readme_change_url.diff (from rev 7670, packages/discus/trunk/debian/patches/01_readme_change_url.dpatch)
===================================================================
--- packages/discus/trunk/debian/patches/01_readme_change_url.diff	                        (rev 0)
+++ packages/discus/trunk/debian/patches/01_readme_change_url.diff	2011-10-18 21:01:31 UTC (rev 7671)
@@ -0,0 +1,16 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 01_readme_change_url.dpatch by Sandro Tosi <matrixhasu at gmail.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Change url address to the new one
+
+ at DPATCH@
+
+--- discus.orig/README	2000-09-16 07:43:32.000000000 +0200
++++ discus/README	2006-10-08 19:30:00.000000000 +0200
+@@ -17,4 +17,4 @@
+ no, I didn't misspell discuss.  A discus is a round thingie people throw.
+ 
+ Newest versions of Discus may be found at:
+-http://www.futuresouth.com/~stormy/discus.shtml
++http://www.raincrazy.com/software/discus/

Deleted: packages/discus/trunk/debian/patches/01_readme_change_url.dpatch
===================================================================
--- packages/discus/trunk/debian/patches/01_readme_change_url.dpatch	2011-10-18 20:58:15 UTC (rev 7670)
+++ packages/discus/trunk/debian/patches/01_readme_change_url.dpatch	2011-10-18 21:01:31 UTC (rev 7671)
@@ -1,16 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 01_readme_change_url.dpatch by Sandro Tosi <matrixhasu at gmail.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Change url address to the new one
-
- at DPATCH@
-
---- discus.orig/README	2000-09-16 07:43:32.000000000 +0200
-+++ discus/README	2006-10-08 19:30:00.000000000 +0200
-@@ -17,4 +17,4 @@
- no, I didn't misspell discuss.  A discus is a round thingie people throw.
- 
- Newest versions of Discus may be found at:
--http://www.futuresouth.com/~stormy/discus.shtml
-+http://www.raincrazy.com/software/discus/

Copied: packages/discus/trunk/debian/patches/02_manpage_pre-adoption.diff (from rev 7670, packages/discus/trunk/debian/patches/02_manpage_pre-adoption.dpatch)
===================================================================
--- packages/discus/trunk/debian/patches/02_manpage_pre-adoption.diff	                        (rev 0)
+++ packages/discus/trunk/debian/patches/02_manpage_pre-adoption.diff	2011-10-18 21:01:31 UTC (rev 7671)
@@ -0,0 +1,51 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 02_manpage_pre-adoption.dpatch by Sandro Tosi <matrixhasu at gmail.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Modification done by previous maintainer
+
+ at DPATCH@
+diff -urNad discus~/discus.1 discus/discus.1
+--- discus~/discus.1	2000-09-14 01:49:15.000000000 +0200
++++ discus/discus.1	2007-12-22 00:40:40.368522312 +0100
+@@ -2,7 +2,7 @@
+ .\" DISCUS
+ .\" 1
+ .\" other parameters are allowed: see man(7), man(1)
+-.TH DISCUS 1 "September 12, 2000"
++.TH DISCUS 1 "October 20, 2003"
+ .\" Please adjust this date whenever revising the manpage.
+ .\"
+ .\" Some roff macros, for reference:
+@@ -26,11 +26,9 @@
+ and smart formatting of numbers (automatically choosing the most suitable
+ size from kilobytes, megabytes, gigabytes, or terabytes). Or choose your
+ own size, along with specifying the number of decimal places you'd like to
+-see. 
++see. You may also copy /etc/discusrc to $HOME/.discusrc and customize things to
++your preference. 
+ 
+-Updates may be found at the Discus home page:
+-.br
+-http://www.futuresouth.com/~stormy/discus.shtml
+ .SH OPTIONS
+ .TP
+ .B \-h, \-\-help
+@@ -50,7 +48,7 @@
+ .TP
+ .B \-t, \-g, \-m, \-k
+ Display sizes in terabytes, gigabytes, megabytes, or kilobytes, respectively. 
+-Assumes -s.
++Assumes \-s.
+ .TP
+ .B \-v, \-\-version
+ Show version of program.
+@@ -62,5 +60,6 @@
+ .BR pydf (1).
+ .br
+ .SH AUTHOR
+-This manual page was written by Stormy Henderson <stormy at futuresouth.com>,
+-for the Debian GNU/Linux system (but may be used by others).
++This manual page was adapted by Ron Farrer <rbf at debian.org> from one 
++written by Stormy Henderson <stormy at futuresouth.com> for the Debian 
++GNU/Linux system (but may be used by others).

Deleted: packages/discus/trunk/debian/patches/02_manpage_pre-adoption.dpatch
===================================================================
--- packages/discus/trunk/debian/patches/02_manpage_pre-adoption.dpatch	2011-10-18 20:58:15 UTC (rev 7670)
+++ packages/discus/trunk/debian/patches/02_manpage_pre-adoption.dpatch	2011-10-18 21:01:31 UTC (rev 7671)
@@ -1,51 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 02_manpage_pre-adoption.dpatch by Sandro Tosi <matrixhasu at gmail.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Modification done by previous maintainer
-
- at DPATCH@
-diff -urNad discus~/discus.1 discus/discus.1
---- discus~/discus.1	2000-09-14 01:49:15.000000000 +0200
-+++ discus/discus.1	2007-12-22 00:40:40.368522312 +0100
-@@ -2,7 +2,7 @@
- .\" DISCUS
- .\" 1
- .\" other parameters are allowed: see man(7), man(1)
--.TH DISCUS 1 "September 12, 2000"
-+.TH DISCUS 1 "October 20, 2003"
- .\" Please adjust this date whenever revising the manpage.
- .\"
- .\" Some roff macros, for reference:
-@@ -26,11 +26,9 @@
- and smart formatting of numbers (automatically choosing the most suitable
- size from kilobytes, megabytes, gigabytes, or terabytes). Or choose your
- own size, along with specifying the number of decimal places you'd like to
--see. 
-+see. You may also copy /etc/discusrc to $HOME/.discusrc and customize things to
-+your preference. 
- 
--Updates may be found at the Discus home page:
--.br
--http://www.futuresouth.com/~stormy/discus.shtml
- .SH OPTIONS
- .TP
- .B \-h, \-\-help
-@@ -50,7 +48,7 @@
- .TP
- .B \-t, \-g, \-m, \-k
- Display sizes in terabytes, gigabytes, megabytes, or kilobytes, respectively. 
--Assumes -s.
-+Assumes \-s.
- .TP
- .B \-v, \-\-version
- Show version of program.
-@@ -62,5 +60,6 @@
- .BR pydf (1).
- .br
- .SH AUTHOR
--This manual page was written by Stormy Henderson <stormy at futuresouth.com>,
--for the Debian GNU/Linux system (but may be used by others).
-+This manual page was adapted by Ron Farrer <rbf at debian.org> from one 
-+written by Stormy Henderson <stormy at futuresouth.com> for the Debian 
-+GNU/Linux system (but may be used by others).

Copied: packages/discus/trunk/debian/patches/03_discusrc_labels.diff (from rev 7670, packages/discus/trunk/debian/patches/03_discusrc_labels.dpatch)
===================================================================
--- packages/discus/trunk/debian/patches/03_discusrc_labels.diff	                        (rev 0)
+++ packages/discus/trunk/debian/patches/03_discusrc_labels.diff	2011-10-18 21:01:31 UTC (rev 7671)
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 03_discusrc_labels.dpatch by Sandro Tosi <matrixhasu at gmail.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Changes to display label
+
+ at DPATCH@
+
+--- discus.orig/discusrc	2000-09-16 04:32:08.000000000 +0200
++++ discus/discusrc		2006-10-05 23:41:56.000000000 +0200
+@@ -10,7 +10,7 @@
+ ##  commas.  String values must be quoted.
+ 
+ ##  Labels to display next to numbers.  Thanks to Frank Elsner.
+-opts["akabytes"] = ["KB", "meg", "gig", "TB"]
++opts["akabytes"] = ["KB", "MB", "GB", "TB", "PB", "EB"]
+ opts["color"] = 1
+ opts["divisor"] = 1
+ opts["graph"] = 1

Deleted: packages/discus/trunk/debian/patches/03_discusrc_labels.dpatch
===================================================================
--- packages/discus/trunk/debian/patches/03_discusrc_labels.dpatch	2011-10-18 20:58:15 UTC (rev 7670)
+++ packages/discus/trunk/debian/patches/03_discusrc_labels.dpatch	2011-10-18 21:01:31 UTC (rev 7671)
@@ -1,19 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 03_discusrc_labels.dpatch by Sandro Tosi <matrixhasu at gmail.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Changes to display label
-
- at DPATCH@
-
---- discus.orig/discusrc	2000-09-16 04:32:08.000000000 +0200
-+++ discus/discusrc		2006-10-05 23:41:56.000000000 +0200
-@@ -10,7 +10,7 @@
- ##  commas.  String values must be quoted.
- 
- ##  Labels to display next to numbers.  Thanks to Frank Elsner.
--opts["akabytes"] = ["KB", "meg", "gig", "TB"]
-+opts["akabytes"] = ["KB", "MB", "GB", "TB", "PB", "EB"]
- opts["color"] = 1
- opts["divisor"] = 1
- opts["graph"] = 1

Copied: packages/discus/trunk/debian/patches/04_discus_correct_mail_url.diff (from rev 7670, packages/discus/trunk/debian/patches/04_discus_correct_mail_url.dpatch)
===================================================================
--- packages/discus/trunk/debian/patches/04_discus_correct_mail_url.diff	                        (rev 0)
+++ packages/discus/trunk/debian/patches/04_discus_correct_mail_url.diff	2011-10-18 21:01:31 UTC (rev 7671)
@@ -0,0 +1,21 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 04_discus_correct_mail_url.dpatch by Sandro Tosi <matrixhasu at gmail.com>
+##
+## DP: Fix email and website addresses
+
+ at DPATCH@
+diff -urNad discus~/discus discus/discus
+--- discus~/discus	2006-10-05 23:41:56.000000000 +0200
++++ discus/discus	2006-10-09 20:56:05.000000000 +0200
+@@ -243,9 +243,9 @@
+ 
+ ##  Print version.
+ def version():
+-	print "Discus version %s by Stormy Henderson (stormy at futuresouth.com)." % \
++	print "Discus version %s by Stormy Henderson (stormy at raincrazy.com)." % \
+ 		VERSION
+-	print "Home page: http://www.futuresouth.com/~stormy/discus.shtml"
++	print "Home page: http://www.raincrazy.com/software/discus/"
+ 	raise SystemExit
+ 
+ 

Deleted: packages/discus/trunk/debian/patches/04_discus_correct_mail_url.dpatch
===================================================================
--- packages/discus/trunk/debian/patches/04_discus_correct_mail_url.dpatch	2011-10-18 20:58:15 UTC (rev 7670)
+++ packages/discus/trunk/debian/patches/04_discus_correct_mail_url.dpatch	2011-10-18 21:01:31 UTC (rev 7671)
@@ -1,21 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 04_discus_correct_mail_url.dpatch by Sandro Tosi <matrixhasu at gmail.com>
-##
-## DP: Fix email and website addresses
-
- at DPATCH@
-diff -urNad discus~/discus discus/discus
---- discus~/discus	2006-10-05 23:41:56.000000000 +0200
-+++ discus/discus	2006-10-09 20:56:05.000000000 +0200
-@@ -243,9 +243,9 @@
- 
- ##  Print version.
- def version():
--	print "Discus version %s by Stormy Henderson (stormy at futuresouth.com)." % \
-+	print "Discus version %s by Stormy Henderson (stormy at raincrazy.com)." % \
- 		VERSION
--	print "Home page: http://www.futuresouth.com/~stormy/discus.shtml"
-+	print "Home page: http://www.raincrazy.com/software/discus/"
- 	raise SystemExit
- 
- 

Copied: packages/discus/trunk/debian/patches/10_bts-291276_space_mountpoint.diff (from rev 7670, packages/discus/trunk/debian/patches/10_bts-291276_space_mountpoint.dpatch)
===================================================================
--- packages/discus/trunk/debian/patches/10_bts-291276_space_mountpoint.diff	                        (rev 0)
+++ packages/discus/trunk/debian/patches/10_bts-291276_space_mountpoint.diff	2011-10-18 21:01:31 UTC (rev 7671)
@@ -0,0 +1,32 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 10_bts-291276_space_mountpoint.dpatch by Sandro Tosi <matrixhasu at gmail.com>
+##
+## DP: Convert escaped octal values into real char
+
+ at DPATCH@
+diff -urNad discus~/discus discus/discus
+--- discus~/discus	2007-12-21 23:51:21.595911471 +0100
++++ discus/discus	2007-12-21 23:53:22.470799739 +0100
+@@ -33,7 +33,7 @@
+ 
+ ##  Import modules used.
+ 
+-import commands, getopt, os, string, sys
++import commands, getopt, os, string, sys, re
+ try:
+ 	from statvfs import *
+ except ImportError:
+@@ -383,6 +383,13 @@
+ 		entry = string.split(entry)
+ 		device = entry[0]
+ 		mount = entry[1]
++
++		# Sandro Tosi - to fix Debian bug 291276, convert escaped octal values
++		# from /etc/mtab (or /proc/mounts) to real characters
++		mount = mount.encode('utf-8')
++		for octc in re.findall(r'\\(\d{3})', mount):
++		    mount = mount.replace(r'\%s' % octc, chr(int(octc, 8)))
++		mount = mount.decode('utf8')
+ 		
+ 		##  Skip entries we aren't interested in.
+ 

Deleted: packages/discus/trunk/debian/patches/10_bts-291276_space_mountpoint.dpatch
===================================================================
--- packages/discus/trunk/debian/patches/10_bts-291276_space_mountpoint.dpatch	2011-10-18 20:58:15 UTC (rev 7670)
+++ packages/discus/trunk/debian/patches/10_bts-291276_space_mountpoint.dpatch	2011-10-18 21:01:31 UTC (rev 7671)
@@ -1,32 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 10_bts-291276_space_mountpoint.dpatch by Sandro Tosi <matrixhasu at gmail.com>
-##
-## DP: Convert escaped octal values into real char
-
- at DPATCH@
-diff -urNad discus~/discus discus/discus
---- discus~/discus	2007-12-21 23:51:21.595911471 +0100
-+++ discus/discus	2007-12-21 23:53:22.470799739 +0100
-@@ -33,7 +33,7 @@
- 
- ##  Import modules used.
- 
--import commands, getopt, os, string, sys
-+import commands, getopt, os, string, sys, re
- try:
- 	from statvfs import *
- except ImportError:
-@@ -383,6 +383,13 @@
- 		entry = string.split(entry)
- 		device = entry[0]
- 		mount = entry[1]
-+
-+		# Sandro Tosi - to fix Debian bug 291276, convert escaped octal values
-+		# from /etc/mtab (or /proc/mounts) to real characters
-+		mount = mount.encode('utf-8')
-+		for octc in re.findall(r'\\(\d{3})', mount):
-+		    mount = mount.replace(r'\%s' % octc, chr(int(octc, 8)))
-+		mount = mount.decode('utf8')
- 		
- 		##  Skip entries we aren't interested in.
- 

Copied: packages/discus/trunk/debian/patches/20_bts-312262_reserved_space.diff (from rev 7670, packages/discus/trunk/debian/patches/20_bts-312262_reserved_space.dpatch)
===================================================================
--- packages/discus/trunk/debian/patches/20_bts-312262_reserved_space.diff	                        (rev 0)
+++ packages/discus/trunk/debian/patches/20_bts-312262_reserved_space.diff	2011-10-18 21:01:31 UTC (rev 7671)
@@ -0,0 +1,112 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 20_bts-312262_reserved_space.dpatch by Sandro Tosi <matrixhasu at gmail.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix to take into account even the reserved space to root 
+
+ at DPATCH@
+diff -urNad discus~/discus discus/discus
+--- discus~/discus	2007-12-22 17:31:51.661982289 +0100
++++ discus/discus	2007-12-22 17:32:18.727524666 +0100
+@@ -28,7 +28,7 @@
+ ##  Define version number and create options object with internal settings.
+ 
+ VERSION = "0.2.9"
+-opts = {"placing": 0, "vfsing": 1}
++opts = {"placing": 0, "vfsing": 1, "reserved": 0}
+ 
+ 
+ ##  Import modules used.
+@@ -156,7 +156,7 @@
+ 
+ 	def percentage(self):
+ 		try:
+-			percent = (1.0 - (1.0 * self.free_root / self.total)) * 100
++			percent = (1.0 - (1.0 * self.free / self.total)) * 100
+ 		except ZeroDivisionError:
+ 			percent = 0.0
+ 		
+@@ -209,8 +209,14 @@
+ 			stats = os.statvfs(mount)
+ 			blocksize = int(stats[F_FRSIZE])
+ 			self.total = int(stats[F_BLOCKS]) * (blocksize / 1024.0)
+-			self.free_root = int(stats[F_BFREE]) * (blocksize / 1024.0)
+-			self.free = int(stats[F_BAVAIL]) * (blocksize / 1024.0)
++			# if we have to take care of reserved space for root, then use
++			# available blocks (but keep counting free space with all free blocks)
++			if opts["reserved"]:
++				self.free = int(stats[F_BAVAIL]) * (blocksize / 1024.0)
++				self.used = self.total - int(stats[F_BFREE]) * (blocksize / 1024.0)
++			else:
++				self.free = int(stats[F_BFREE]) * (blocksize / 1024.0)
++				self.used = self.total - int(stats[F_BFREE]) * (blocksize / 1024.0)
+ 		else:
+ 
+ 			##  External stat program.
+@@ -223,10 +229,12 @@
+ 			stats = string.split(stats)
+ 			blocksize = int(stats[8])
+ 			self.total = int(stats[5]) * (blocksize / 1024.0)
+-			self.free_root = int(stats[6]) * (blocksize / 1024.0)
+-			self.free = int(stats[7]) * (blocksize / 1024.0)
+-
+-		self.used = self.total - self.free_root
++			if opts["reserved"]:
++				self.free = int(stats[7]) * (blocksize / 1024.0)
++				self.used = self.total - int(stats[7]) * (blocksize / 1024.0)
++			else:
++				self.free = int(stats[6]) * (blocksize / 1024.0)
++				self.used = self.total - int(stats[7]) * (blocksize / 1024.0)
+ 
+ 
+ 	##  Don't let long names mess up the display: shorten them
+@@ -266,6 +274,7 @@
+                     assumes -s
+  -d              show device instead of graph
+  -c              disable color
++ -r              count reserved space as used
+ """ % VERSION
+ 
+ 	else:
+@@ -282,7 +291,7 @@
+ 	##  Read the command line options provided by the user.
+ 
+ 	try:
+-		options, args = getopt.getopt(sys.argv[1:], "p:tgmksdcvh",
++		options, args = getopt.getopt(sys.argv[1:], "p:tgmksdcrvh",
+ 			["help", "version"])
+ 	except:
+ 		help()
+@@ -356,6 +365,9 @@
+ 
+ 		if option in ["-h", "--help"]:
+ 			help()
++
++		if option == "-r":
++			opts["reserved"] = 1
+ 	
+ 
+ 
+@@ -429,7 +441,7 @@
+ 		mount,
+ 		"Total",
+ 		"Used",
+-		"Free",
++		"Avail",
+ 		"Prcnt",
+ 		graph
+ 	) + color("clear")
+diff -urNad discus~/discus.1 discus/discus.1
+--- discus~/discus.1	2007-12-22 17:31:51.629980462 +0100
++++ discus/discus.1	2007-12-22 17:33:56.973123363 +0100
+@@ -52,6 +52,10 @@
+ .TP
+ .B \-v, \-\-version
+ Show version of program.
++.TP
++.B \-r
++Takes into account even the reserved space to root; it will be counted in percentage and in available columns only (Used is for real used space).
++.SH FILES
+ .SH FILES
+ .BR /etc/discusrc,
+ .BR $HOME/.discusrc

Deleted: packages/discus/trunk/debian/patches/20_bts-312262_reserved_space.dpatch
===================================================================
--- packages/discus/trunk/debian/patches/20_bts-312262_reserved_space.dpatch	2011-10-18 20:58:15 UTC (rev 7670)
+++ packages/discus/trunk/debian/patches/20_bts-312262_reserved_space.dpatch	2011-10-18 21:01:31 UTC (rev 7671)
@@ -1,112 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 20_bts-312262_reserved_space.dpatch by Sandro Tosi <matrixhasu at gmail.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Fix to take into account even the reserved space to root 
-
- at DPATCH@
-diff -urNad discus~/discus discus/discus
---- discus~/discus	2007-12-22 17:31:51.661982289 +0100
-+++ discus/discus	2007-12-22 17:32:18.727524666 +0100
-@@ -28,7 +28,7 @@
- ##  Define version number and create options object with internal settings.
- 
- VERSION = "0.2.9"
--opts = {"placing": 0, "vfsing": 1}
-+opts = {"placing": 0, "vfsing": 1, "reserved": 0}
- 
- 
- ##  Import modules used.
-@@ -156,7 +156,7 @@
- 
- 	def percentage(self):
- 		try:
--			percent = (1.0 - (1.0 * self.free_root / self.total)) * 100
-+			percent = (1.0 - (1.0 * self.free / self.total)) * 100
- 		except ZeroDivisionError:
- 			percent = 0.0
- 		
-@@ -209,8 +209,14 @@
- 			stats = os.statvfs(mount)
- 			blocksize = int(stats[F_FRSIZE])
- 			self.total = int(stats[F_BLOCKS]) * (blocksize / 1024.0)
--			self.free_root = int(stats[F_BFREE]) * (blocksize / 1024.0)
--			self.free = int(stats[F_BAVAIL]) * (blocksize / 1024.0)
-+			# if we have to take care of reserved space for root, then use
-+			# available blocks (but keep counting free space with all free blocks)
-+			if opts["reserved"]:
-+				self.free = int(stats[F_BAVAIL]) * (blocksize / 1024.0)
-+				self.used = self.total - int(stats[F_BFREE]) * (blocksize / 1024.0)
-+			else:
-+				self.free = int(stats[F_BFREE]) * (blocksize / 1024.0)
-+				self.used = self.total - int(stats[F_BFREE]) * (blocksize / 1024.0)
- 		else:
- 
- 			##  External stat program.
-@@ -223,10 +229,12 @@
- 			stats = string.split(stats)
- 			blocksize = int(stats[8])
- 			self.total = int(stats[5]) * (blocksize / 1024.0)
--			self.free_root = int(stats[6]) * (blocksize / 1024.0)
--			self.free = int(stats[7]) * (blocksize / 1024.0)
--
--		self.used = self.total - self.free_root
-+			if opts["reserved"]:
-+				self.free = int(stats[7]) * (blocksize / 1024.0)
-+				self.used = self.total - int(stats[7]) * (blocksize / 1024.0)
-+			else:
-+				self.free = int(stats[6]) * (blocksize / 1024.0)
-+				self.used = self.total - int(stats[7]) * (blocksize / 1024.0)
- 
- 
- 	##  Don't let long names mess up the display: shorten them
-@@ -266,6 +274,7 @@
-                     assumes -s
-  -d              show device instead of graph
-  -c              disable color
-+ -r              count reserved space as used
- """ % VERSION
- 
- 	else:
-@@ -282,7 +291,7 @@
- 	##  Read the command line options provided by the user.
- 
- 	try:
--		options, args = getopt.getopt(sys.argv[1:], "p:tgmksdcvh",
-+		options, args = getopt.getopt(sys.argv[1:], "p:tgmksdcrvh",
- 			["help", "version"])
- 	except:
- 		help()
-@@ -356,6 +365,9 @@
- 
- 		if option in ["-h", "--help"]:
- 			help()
-+
-+		if option == "-r":
-+			opts["reserved"] = 1
- 	
- 
- 
-@@ -429,7 +441,7 @@
- 		mount,
- 		"Total",
- 		"Used",
--		"Free",
-+		"Avail",
- 		"Prcnt",
- 		graph
- 	) + color("clear")
-diff -urNad discus~/discus.1 discus/discus.1
---- discus~/discus.1	2007-12-22 17:31:51.629980462 +0100
-+++ discus/discus.1	2007-12-22 17:33:56.973123363 +0100
-@@ -52,6 +52,10 @@
- .TP
- .B \-v, \-\-version
- Show version of program.
-+.TP
-+.B \-r
-+Takes into account even the reserved space to root; it will be counted in percentage and in available columns only (Used is for real used space).
-+.SH FILES
- .SH FILES
- .BR /etc/discusrc,
- .BR $HOME/.discusrc

Copied: packages/discus/trunk/debian/patches/30_bts-224393_exclude_fs.diff (from rev 7670, packages/discus/trunk/debian/patches/30_bts-224393_exclude_fs.dpatch)
===================================================================
--- packages/discus/trunk/debian/patches/30_bts-224393_exclude_fs.diff	                        (rev 0)
+++ packages/discus/trunk/debian/patches/30_bts-224393_exclude_fs.diff	2011-10-18 21:01:31 UTC (rev 7671)
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 04_bts-224393_exclude_fs.dpatch by Sandro Tosi <matrixhasu at gmail.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+diff -urNad discus~/discusrc discus/discusrc
+--- discus~/discusrc	2000-09-16 04:32:08.000000000 +0200
++++ discus/discusrc	2006-10-08 20:49:30.000000000 +0200
+@@ -26,7 +26,7 @@
+ opts["places"] = 1
+ 
+ ##  Filesystems to ignore.
+-opts["skip_list"] = ["/dev/pts", "/proc"]
++opts["skip_list"] = ["/dev/pts", "/proc", "/dev", "/proc/usb", "/sys"]
+ 
+ ##  Use smart formatting of numbers.
+ opts["smart"] = 1

Deleted: packages/discus/trunk/debian/patches/30_bts-224393_exclude_fs.dpatch
===================================================================
--- packages/discus/trunk/debian/patches/30_bts-224393_exclude_fs.dpatch	2011-10-18 20:58:15 UTC (rev 7670)
+++ packages/discus/trunk/debian/patches/30_bts-224393_exclude_fs.dpatch	2011-10-18 21:01:31 UTC (rev 7671)
@@ -1,19 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 04_bts-224393_exclude_fs.dpatch by Sandro Tosi <matrixhasu at gmail.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-diff -urNad discus~/discusrc discus/discusrc
---- discus~/discusrc	2000-09-16 04:32:08.000000000 +0200
-+++ discus/discusrc	2006-10-08 20:49:30.000000000 +0200
-@@ -26,7 +26,7 @@
- opts["places"] = 1
- 
- ##  Filesystems to ignore.
--opts["skip_list"] = ["/dev/pts", "/proc"]
-+opts["skip_list"] = ["/dev/pts", "/proc", "/dev", "/proc/usb", "/sys"]
- 
- ##  Use smart formatting of numbers.
- opts["smart"] = 1

Modified: packages/discus/trunk/debian/patches/series
===================================================================
--- packages/discus/trunk/debian/patches/series	2011-10-18 20:58:15 UTC (rev 7670)
+++ packages/discus/trunk/debian/patches/series	2011-10-18 21:01:31 UTC (rev 7671)
@@ -1,7 +1,7 @@
-01_readme_change_url.dpatch
-02_manpage_pre-adoption.dpatch
-03_discusrc_labels.dpatch
-04_discus_correct_mail_url.dpatch
-10_bts-291276_space_mountpoint.dpatch
-20_bts-312262_reserved_space.dpatch
-30_bts-224393_exclude_fs.dpatch
+01_readme_change_url.diff
+02_manpage_pre-adoption.diff
+03_discusrc_labels.diff
+04_discus_correct_mail_url.diff
+10_bts-291276_space_mountpoint.diff
+20_bts-312262_reserved_space.diff
+30_bts-224393_exclude_fs.diff




More information about the Python-apps-commits mailing list