diff options
author | Joe Marcus Clarke <marcus@FreeBSD.org> | 2004-05-01 02:01:17 +0000 |
---|---|---|
committer | Joe Marcus Clarke <marcus@FreeBSD.org> | 2004-05-01 02:01:17 +0000 |
commit | 6a404a01d7722692d187bd3a3b689bc9ca8d48e2 (patch) | |
tree | 0fca4d429bb79800290a02025cb5d5ee47d5fff8 /deskutils/gdesklets | |
parent | 959fa0ab76cf72193024e2f3895ede07c59136ec (diff) | |
download | ports-6a404a01d7722692d187bd3a3b689bc9ca8d48e2.tar.gz ports-6a404a01d7722692d187bd3a3b689bc9ca8d48e2.zip |
Notes
Diffstat (limited to 'deskutils/gdesklets')
-rw-r--r-- | deskutils/gdesklets/Makefile | 3 | ||||
-rw-r--r-- | deskutils/gdesklets/distinfo | 4 | ||||
-rw-r--r-- | deskutils/gdesklets/files/patch-libdesklets::Disk.py | 38 |
3 files changed, 37 insertions, 8 deletions
diff --git a/deskutils/gdesklets/Makefile b/deskutils/gdesklets/Makefile index ed7afdd3a153..342e9fda1658 100644 --- a/deskutils/gdesklets/Makefile +++ b/deskutils/gdesklets/Makefile @@ -6,8 +6,7 @@ # PORTNAME= gdesklets -PORTVERSION= 0.26.1 -PORTREVISION= 1 +PORTVERSION= 0.26.2 CATEGORIES= deskutils gnome MASTER_SITES= http://www.pycage.de/download/${PORTNAME}/ DISTNAME= gDesklets-${PORTVERSION} diff --git a/deskutils/gdesklets/distinfo b/deskutils/gdesklets/distinfo index 4994111924d8..51ab45df44e2 100644 --- a/deskutils/gdesklets/distinfo +++ b/deskutils/gdesklets/distinfo @@ -1,2 +1,2 @@ -MD5 (gDesklets-0.26.1.tar.bz2) = bae8006b869c6fb05064579f7593d449 -SIZE (gDesklets-0.26.1.tar.bz2) = 339474 +MD5 (gDesklets-0.26.2.tar.bz2) = c001e527a4ed4fe2b66d71df9b8b21ab +SIZE (gDesklets-0.26.2.tar.bz2) = 401097 diff --git a/deskutils/gdesklets/files/patch-libdesklets::Disk.py b/deskutils/gdesklets/files/patch-libdesklets::Disk.py index 0b4a640d965a..077f487b6178 100644 --- a/deskutils/gdesklets/files/patch-libdesklets::Disk.py +++ b/deskutils/gdesklets/files/patch-libdesklets::Disk.py @@ -1,14 +1,15 @@ ---- libdesklets/Disk.py.orig Mon Feb 23 10:52:50 2004 -+++ libdesklets/Disk.py Mon Feb 23 10:54:31 2004 -@@ -1,6 +1,6 @@ +--- libdesklets/Disk.py.orig Fri Feb 20 14:29:07 2004 ++++ libdesklets/Disk.py Fri Apr 30 15:50:42 2004 +@@ -1,6 +1,7 @@ import glibtop import polling - +import os ++import statvfs class Disk: -@@ -21,14 +21,19 @@ +@@ -21,14 +22,19 @@ # def __poll_partitions(self): @@ -35,3 +36,32 @@ return partitions +@@ -43,15 +49,19 @@ + #:/function + # + def __poll_size(self, partition): +- +- blocks, bfree, bavail, files, ffree = glibtop.get_fsusage(partition) +- free = float(bfree * 512) +- total = float(blocks * 512) +- used = total - free +- +- return (total, used)#, free) +- +- ++ ++ try: ++ statvfs_data = os.statvfs(partition) ++ free = float(statvfs_data[statvfs.F_BFREE] * statvfs_data[statvfs.F_FRSIZE]) ++ total = float(statvfs_data[statvfs.F_BLOCKS] * statvfs_data[statvfs.F_FRSIZE]) ++ except: ++ blocks, bfree, bavail, files, ffree = glibtop.get_fsusage(partition) ++ free = float(bfree * 512) ++ total = float(blocks * 512) ++ ++ used = total - free ++ ++ return (total, used)#, free) + + # + #:function get_fs | partition | Returns the filesystem for the given |