1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-29 01:13:08 +00:00

- Update to 7

PR:		ports/136788
Submitted by:	Jochen Neumeister <jochen@daten-chaos.de>
Approved by:	Baptiste Grenier <gwarf@gwarf.org> (maintainer)
This commit is contained in:
Wesley Shields 2009-07-19 01:38:38 +00:00
parent 738ea91181
commit 49865433cb
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=238036
3 changed files with 22 additions and 20 deletions

View File

@ -6,7 +6,7 @@
#
PORTNAME= pydf
PORTVERSION= 6
PORTVERSION= 7
CATEGORIES= sysutils
MASTER_SITES= http://kassiopeia.juls.savba.sk/~garabik/software/pydf/
DISTNAME= ${PORTNAME}_${PORTVERSION}

View File

@ -1,3 +1,3 @@
MD5 (pydf_6.tar.gz) = b71572cc111a8f68edc876351b0f7733
SHA256 (pydf_6.tar.gz) = 4202b4cbbd631b40f6e2fbd73bf0a6397899e6acf148e84864731a92cfa5cb80
SIZE (pydf_6.tar.gz) = 12140
MD5 (pydf_7.tar.gz) = 54c631b1bf8d00111d49567b2e83d718
SHA256 (pydf_7.tar.gz) = ce09e48bf6d03d4128c3dfbbe4cdd093ac533006440cc6aa239592e0af223c23
SIZE (pydf_7.tar.gz) = 12487

View File

@ -1,21 +1,23 @@
--- pydf.original Tue Dec 4 23:02:26 2007
+++ pydf Tue Dec 4 23:02:14 2007
--- pydf.orig 2009-04-10 13:00:07.000000000 +0000
+++ pydf 2009-07-15 12:54:08.000000000 +0000
@@ -1,4 +1,4 @@
-#! /usr/bin/python
+#! %%PYTHON_CMD%%
import sys, os, string, types, commands, struct
from optparse import OptionParser
@@ -166,7 +166,7 @@
@@ -169,8 +169,8 @@
#end of default definitions
# read configuration file
-for i in ["/etc/pydfrc", os.environ['HOME']+"/.pydfrc"]:
- if os.path.isfile(i):
+for i in ["%%PREFIX%%/etc/pydfrc", os.environ['HOME']+"/.pydfrc"]:
if os.path.isfile(i):
+ if os.path.isfile(i):
execfile(i)
@@ -336,9 +336,9 @@
@@ -344,9 +344,9 @@
except OSError, IOError:
status = 10*[0]
@ -25,18 +27,18 @@
- fs_blocksize = status[F_FRSIZE]
+ fs_blocksize = status[F_BSIZE]
free = status[F_BFREE]
used = long(status[F_BLOCKS]-free)
size = status[F_BLOCKS]
@@ -351,7 +351,7 @@
avail_f = myformat(avail, sizeformat, fs_blocksize)
try:
- perc = round(100.*used/size, 1)
+ perc = round(100.*used/(avail+used), 1)
except ZeroDivisionError:
perc = 0
perc_f = str(perc)
@@ -419,7 +419,7 @@
avail = status[F_BAVAIL]
@@ -375,7 +375,7 @@
used_f = myformat(used, sizeformat, fs_blocksize)
avail_f = myformat(avail, sizeformat, fs_blocksize)
try:
- perc = round(100.*used/size, 1)
+ perc = round(100.*used/(avail+used), 1)
perc_f = str(perc)
except ZeroDivisionError:
perc = 0
@@ -444,7 +444,7 @@
"test if fs (as type) is a special one"
"in addition, a filesystem is special if it has number of blocks equal to 0"
fs = fs.lower()