summaryrefslogtreecommitdiffstats
path: root/deskutils
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2004-05-01 02:01:17 +0000
committermarcus <marcus@FreeBSD.org>2004-05-01 02:01:17 +0000
commitf954bce7898a555d5119d87cecc0c3bc106676d7 (patch)
tree688d57cc78bec3569b3ae7e8df7e11a5f247ecfe /deskutils
parentb011dcd686b4325c4d8e764c2b5907bf8d6c2251 (diff)
downloadFreeBSD-ports-f954bce7898a555d5119d87cecc0c3bc106676d7.zip
FreeBSD-ports-f954bce7898a555d5119d87cecc0c3bc106676d7.tar.gz
Update to 0.26.2, and use statvfs() instead of libgtop.get_fsusage() as
the latter has a bug with block vs. I/O size on FreeBSD. PR: 66115 Submitted by: maintainer
Diffstat (limited to 'deskutils')
-rw-r--r--deskutils/gdesklets/Makefile3
-rw-r--r--deskutils/gdesklets/distinfo4
-rw-r--r--deskutils/gdesklets/files/patch-libdesklets::Disk.py38
3 files changed, 37 insertions, 8 deletions
diff --git a/deskutils/gdesklets/Makefile b/deskutils/gdesklets/Makefile
index ed7afdd..342e9fd 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 4994111..51ab45d 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 0b4a640..077f487 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
OpenPOWER on IntegriCloud